扫二维码与项目经理沟通
我们在微信上24小时期待你的声音
解答本文疑问/技术咨询/运营咨询/技术建议/互联网交流
[TOC]
创新互联建站主要从事做网站、成都做网站、网页设计、企业做网站、公司建网站等业务。立足成都服务宁安,10年网站建设经验,价格优惠、服务专业,欢迎来电咨询建站服务:18980820575
lance, a simple version of the vulnerability detection framework based on Python3.
基于Python3的简单版漏洞检测框架 -- lance
可以自定义poc或exp插件,可以指定要加载的poc或exp。
代码已经上传到Github : https://github.com/b4zinga/lance
python3
def loadPlugin(url, poc=None):
"""load all plugins.
"""
if "://" not in url:
url = "http://" + url
url = url.strip("/")
print("[*] Target url: %s" % url)
plugin_path = os.path.join(os.path.dirname(os.path.dirname(os.path.realpath(__file__))),"plugins")
if not os.path.isdir(plugin_path):
print("[!] %s is not a directory! " % plugin_path)
raise EnvironmentError
print("[*] Plugin path: %s " % plugin_path)
items = os.listdir(plugin_path)
if poc:
print("[*] Loading %s plugins." % poc)
for item in items:
if item.endswith(".py") and not item.startswith('__'):
plugin_name = item[:-3]
if poc in plugin_name:
print("[*] Loading plugin: %s" % plugin_name)
module = importlib.import_module("plugins." + plugin_name)
try:
result = module.run(url)
if result:
print("[+] " + result)
else:
print("[-] Not Vulnerable %s " % plugin_name)
except:
print("[!] ConnectionError ")
else:
continue
else:
for item in items:
if item.endswith(".py") and not item.startswith('__'):
plugin_name = item[:-3]
print("[*] Loading plugin: %s" % plugin_name)
module = importlib.import_module("plugins." + plugin_name)
try:
result = module.run(url)
if result:
print("[+] " + result)
else:
print("[-] Not Vulnerable %s " % plugin_name)
except:
print("[!] ConnectionError ")
print("[*] Finished")
please run python3 lance.py -h
for help.
root@kali:~/lance# python3 lance.py
usage: python lance.py
lance. By b4zinga@outlook.com
optional arguments:
-h, --help show this help message and exit
Target:
-u URL target url.
Module:
-m module poc or exp to be loaded. defaul is all.
说明文档 : https://github.com/b4zinga/lance/blob/master/README.md
Guide : https://github.com/b4zinga/lance/blob/master/docs/Guide.md
ChangeLog : https://github.com/b4zinga/lance/blob/master/docs/ChangeLog.md
TODOList : https://github.com/b4zinga/lance/blob/master/docs/TODOList.md
Please mail to b4zinga@outlook.com
代码已经上传到Github : https://github.com/b4zinga/lance
我们在微信上24小时期待你的声音
解答本文疑问/技术咨询/运营咨询/技术建议/互联网交流