我正在寻找一种调用 Hashcat 并使用创建随机字符串的函数作为破解哈希的可能选项的方法。不知道是否可以创建一个不存在的文件并让 Hashcat 使用该文件。从那里我每分钟清理几行。
有什么帮助吗?
到目前为止我制作的代码花了我很长时间:
import sys
import itertools
import string
import random
import subprocess
def rnd():
l = list(string.ascii_lowercase) + list(string.ascii_uppercase) + list(string.digits) + list(string.punctuation)
k = ''.join(random.sample(l, 12))
return k
for lines in itertools.count(start=1):
hashcat = subprocess.Popen(hashcat)
print(rnd())
Thanks in advance