我有一個使用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