[TOC]
Python3 Vulnerability Detection Tool--lance
Lance, a simple version of the vulnerability detection framework based on PYTHON3.
A simple version of vulnerability detection framework based on PYTHON3--Lance
You can customize the POC or exp plug-in to specify the POC or exp to be loaded.
The code has been uploaded to Github:https://github.com/b4zinga/lance
Screenshot
Requirements
Python3
Key code
def loadplugin (URL, poc=none): "" "Load all plugins. "" "If"://"not in Url:url =" http:/"+ URL url = url.strip ("/") Print (" [*] Target URL:%s "% URL) p Lugin_path = Os.path.join (Os.path.dirname (Os.path.dirname (Os.path.realpath)), "__file__") 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." + PLU Gin_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 PL Ugin:%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 for help python3 lance.py -h
.
[email protected]:~/lance# python3 lance.py usage: python lance.pylance. By [email protected]optional arguments: -h, --help show this help message and exitTarget: -u URL target url.Module: -m module poc or exp to be loaded. defaul is all.
Documents
Description Document: 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 [email protected]
The code has been uploaded to Github:https://github.com/b4zinga/lance
Python3-Based vulnerability detection Tool (PYTHON3 plug-in framework)