Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Python3-based vulnerability detection tool (Python3 plug-in framework)

2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)06/01 Report--

[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, and you can specify which poc or exp to load.

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) plugin_path = os.path.join (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.pylance. By b4zinga@outlook.comoptional 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 b4zinga@outlook.com

The code has been uploaded to Github: https://github.com/b4zinga/lance

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Network Security

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report