加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
index.py 1.95 KB
一键复制 编辑 原始数据 按行查看 历史
jian.song 提交于 2020-01-15 19:34 . fixed Bug and add print dif word
from Public.Public import *
from Public.Gethack import *
from Public.ResRet import *
from Public.Posthack import *
import argparse
def head():
print('''
-----
|
Permission defect vulnerability
PDV - Vulnerability detection
-w WORD -f FILE
|
-----
''')
def userinput():
parser = argparse.ArgumentParser(description='PDV')
parser.add_argument("-w", help="差异字符", required=True)
parser.add_argument("-f", help="burp xml file", required=True)
args = parser.parse_args()
return args
def Getcheck(date,word):
printmsg('GetHacking...')
for item in date:
if len(item[1]) > 0:
for url in item[1]:
if GetReq(url,word,header=item[0]):
printmsg('Congratulations! url : {} Loopholes (yes headers)'.format(url))
if GetReq(url,word):
printmsg('Congratulations! url : {} Loopholes (no headers)'.format(url))
def Postcheck(date,word):
printmsg('PostHacking...')
for item in date:
if item[1]:
if len(item[1]) > 0:
for date in item[1]:
if PostReq(item[0],date,word,header=item[2]):
printmsg('Congratulations! url : {} Loopholes (yes headers)'.format(item[0]))
printmsg('request date: {}'.format(date))
if PostReq(item[0],date,word):
printmsg('Congratulations! url : {} Loopholes (no headers)'.format(item[0]))
printmsg('request date: {}'.format(date))
if __name__ == "__main__":
head()
args = userinput()
word = args.w
printmsg('Your different words:{}'.format(word))
date = GetreadXML(args.f)
Getcheck(date,word)
date = PostreadXML(args.f)
Postcheck(date,word)
printmsg('All items tested! If there is a vulnerability, it will output.')
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化