基于Python3的漏洞检测工具(Python3插件式框架)-创新互联
[TOC]
创新互联公司专注为客户提供全方位的互联网综合服务,包含不限于成都网站设计、网站建设、外贸网站建设、化隆网络推广、微信平台小程序开发、化隆网络营销、化隆企业策划、化隆品牌公关、搜索引擎seo、人物专访、企业宣传片、企业代运营等,从售前售中售后,我们都将竭诚为您服务,您的肯定,是我们大的嘉奖;创新互联公司为所有大学生创业者提供化隆建站搭建服务,24小时服务热线:18982081108,官方网址:www.cdcxhl.comPython3 漏洞检测工具 -- lance
lance, a simple version of the vulnerability detection framework based on Python3.
基于Python3的简单版漏洞检测框架 -- lance
可以自定义poc或exp插件,可以指定要加载的poc或exp。
代码已经上传到Github : https://github.com/b4zinga/lance
screenshot
requirements
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")
usage
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.
documents
说明文档 : 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
Any advice or sugggestions
Please mail to b4zinga@outlook.com
代码已经上传到Github : https://github.com/b4zinga/lance
另外有需要云服务器可以了解下创新互联scvps.cn,海内外云服务器15元起步,三天无理由+7*72小时售后在线,公司持有idc许可证,提供“云服务器、裸金属服务器、高防服务器、香港服务器、美国服务器、虚拟主机、免备案服务器”等云主机租用服务以及企业上云的综合解决方案,具有“安全稳定、简单易用、服务可用性高、性价比高”等特点与优势,专为企业上云打造定制,能够满足用户丰富、多元化的应用场景需求。
网站题目:基于Python3的漏洞检测工具(Python3插件式框架)-创新互联
文章源于:http://cdiso.cn/article/deicdc.html