Python3-Based vulnerability detection Tool (PYTHON3 plug-in framework)

Source: Internet
Author: User

[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)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.