пятница, 9 марта 2018 г.

Немного автоматизации в генерации словарей с паролями.

Телефонный словарик для Ставропольского края.

import subprocess

array = [865,879,900,901,903,905,906,909,918,919,923,928,929,938,958,961,962,963,968,988,989,991,994,995,996,999]

for i in range(len(array)):
    print (array[i])
#    print("crunch 10 10 1234567890 -t "+str(array)+"%%%%%%% -o "+str(array)+".txt")
    one = ("crunch 10 10 1234567890 -t "+str(array[i])+"%%%%%%% -o "+str(array[i])+".txt")
    subprocess.call(one, shell=True)
    two = ("crunch 11 11 1234567890 -t 7"+str(array[i])+"%%%%%%% -o 7"+str(array[i])+".txt")
    subprocess.call(two, shell=True)
    three = ("crunch 11 11 1234567890 -t 8"+str(array[i])+"%%%%%%% -o 8"+str(array[i])+".txt")
    subprocess.call(three, shell=True)
    print ("Complite")

Имена + даты.
import subprocess

array = [ivan, vanya]

for i in range(len(array)):
    print (array[i])
    num = len(array[i])+6
    numm = len(array[i])+8
    one = ("crunch "+num+" "+num+" 1234567890 -t "+str(array[i])+"%%%%%%% -o "+str(array[i])+".txt")
    subprocess.call(one, shell=True)
    two = ("crunch "+numm+" "+numm+" 1234567890 -t "+str(array[i])+"%%%%%%% -o 7"+str(array[i])+".txt")
    subprocess.call(two, shell=True)
    print ("Complite")

Отделить пароль от e-mail в базе указанные через двоеточие:
line = "example@elample.domain:1qa2ws3ed"

sline = line.split(':', 1)

print (sline[1])

import re
input = open('email', 'r')
output = open('passwd', 'w')
linesarray = input.readlines()
input.close
seen = []
for line in range(len(linesarray)):
    print(linesarray[line])
    sline = linesarray[line].split(':', 1)
    output.write(sline[1])
    print("password "+sline[1]+" write")

Комментариев нет:

Отправить комментарий