python3扫描_Python3漏洞扫描工具 ( Python3 插件式框架 )

Python3 漏洞检测工具 -- lance

lance, a simple version of the vulnerability detection framework based on Python3.

基于Python3的简单版漏洞检测框架 -- lance

可以自定义poc或exp插件,可以 指定 要加载的poc或exp。

再次添加了logging模块来控制输出,同时也支持Linux平台的彩色输出提示。

screenshot

requirements

python

关键代码

def loadPlugin(url, poc=None):

"""load all plugins.

"""

if "://" not in url:

url = "http://" + url

url = url.strip("/")

logger.info("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):

logger.warning("%s is not a directory! " % plugin_path)

raise EnvironmentError

logger.info("Plugin path: %s " % plugin_path)

items = os.listdir(plugin_path)

if poc:

logger.infxito("Loading %s plugins." % poc)

else:

poc=""

for item in items:

if item.endswith(".py") and not item.startswith('__'):

plugin_name = item[:-3]

if poc in plugin_name:

logger.info("Loading plugin: %s" % plugin_name)

module = importlib.import_module("plugins." + plugin_name)

try:

result = module.run(url)

if result:

logger.success(result)

else:

logger.error("Not Vulnerable %s " % plugin_name)

except:

logger.warning("ConnectionError ")

else:

continue

logger.info("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

README

Guide

Change Log

2018/07/20

- 添加logging模块,支持日志

- 添加彩色输出(目前支持Linux下Py3,Win下的Py3暂不支持颜色)

2018/07/18

- 程序基本功能实现, 可以运行

- 可以实现`-u URL`指定URl, `-m plugin`指定只加载含有"plugin"关键字的插件, 如"weblogic"

TODO list

[] 添加多线程

[x] 终端颜色区分结果

[x] 添加日志

[] more...

Any advice or sugggestions

Please mail to b4zinga@outlook.com

if you have poc or exp , mail me.

目录结构

lance

│ lance.py

│ README.md

├─docs

│ ChangeLog.md

│ Guide.md

│ screenshot1.png

│ screenshot2.png

│ TODOList.md

├─lib

│ ansistrm.py

│ cli.py

│ cmdline.py

│ convert.py

│ data.py

│ loader.py

│ log.py

│ __init__.py

└─plugins

activemq_movefile.py

activemq_putfile.py

activemq_weakpwd.py

discuz_faqsql.py

elasticSearch_dir_traversal.py

elasticSearch_dir_traversal2.py

elasticSearch_remote_code_exec.py

elasticSearch_remote_code_exec2.py

redis_unauth.py

struts2_053.py

weblogic_ssrf.py

weblogic_weakpasswd.py

weblogic_xmldecoder.py

__init__.py

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值