由于 burpsuite 自带的 intruder 没有按照特定的条件进行重放请求的设置。所以使用 Trubo Intruder 来定制爆破脚本。
以下脚本是在 Turbo Intruder v1.40 下编写
import string
#26个小写字母
payloads = list(string.ascii_lowercase)
#26个大写字母
#payloads += list(string.ascii_uppercase)
#数字列表0-9
for i in range(0,10):
payloads.append(str(i))
#特殊字符
payloads += ['@','_', '.', '-']
#长度
length = 10
def queueRequests(target, wordlists):
engine = RequestEngine(endpoint=target.endpoint)
#类似 burpsuite Intruder Cluster Bomb 模式
for num in range(1,length+1):
for word in payloads:
#多参数传入列表
engine.queue(target.req, [num,word.rstrip()])
def handleResponse(req, interesting):
table.add(req)
#如果返回包中出现以下字符串就重试,多个参数同样传入列表,如果单个参数可以直接req.engine.queue(req.template, req.words[0])
#req.status, req.wordcount, req.length and req.response
if 'what you need' in req.response:
req.engine.queue(req.template, [req.words[0],req.words[1]])
#类是 Intruder 中的grep
if 'xxxx' in req.response:
req.label = 'hit'
标签:engine,req,重试,length,payloads,Trubo,Intruder
From: https://www.cnblogs.com/depycode/p/17728992.html