基于Python3的漏洞檢測工具(Python3插件式框架)-創(chuàng)新互聯(lián)

[TOC]

創(chuàng)新互聯(lián)公司專注為客戶提供全方位的互聯(lián)網(wǎng)綜合服務(wù),包含不限于成都網(wǎng)站設(shè)計、網(wǎng)站建設(shè)、外貿(mào)網(wǎng)站建設(shè)、化隆網(wǎng)絡(luò)推廣、微信平臺小程序開發(fā)、化隆網(wǎng)絡(luò)營銷、化隆企業(yè)策劃、化隆品牌公關(guān)、搜索引擎seo、人物專訪、企業(yè)宣傳片、企業(yè)代運營等,從售前售中售后,我們都將竭誠為您服務(wù),您的肯定,是我們大的嘉獎;創(chuàng)新互聯(lián)公司為所有大學生創(chuàng)業(yè)者提供化隆建站搭建服務(wù),24小時服務(wù)熱線:18982081108,官方網(wǎng)址:muchs.cn

Python3 漏洞檢測工具 -- lance

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

基于Python3的簡單版漏洞檢測框架 -- lance

可以自定義poc或exp插件,可以指定要加載的poc或exp。

代碼已經(jīng)上傳到Github : https://github.com/b4zinga/lance

screenshot

基于Python3的漏洞檢測工具 ( Python3 插件式框架 )

requirements

python3

關(guān)鍵代碼

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

代碼已經(jīng)上傳到Github : https://github.com/b4zinga/lance

另外有需要云服務(wù)器可以了解下創(chuàng)新互聯(lián)scvps.cn,海內(nèi)外云服務(wù)器15元起步,三天無理由+7*72小時售后在線,公司持有idc許可證,提供“云服務(wù)器、裸金屬服務(wù)器、高防服務(wù)器、香港服務(wù)器、美國服務(wù)器、虛擬主機、免備案服務(wù)器”等云主機租用服務(wù)以及企業(yè)上云的綜合解決方案,具有“安全穩(wěn)定、簡單易用、服務(wù)可用性高、性價比高”等特點與優(yōu)勢,專為企業(yè)上云打造定制,能夠滿足用戶豐富、多元化的應(yīng)用場景需求。

網(wǎng)站題目:基于Python3的漏洞檢測工具(Python3插件式框架)-創(chuàng)新互聯(lián)
URL網(wǎng)址:http://muchs.cn/article12/deicdc.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供靜態(tài)網(wǎng)站、企業(yè)建站、網(wǎng)站建設(shè)、動態(tài)網(wǎng)站、外貿(mào)網(wǎng)站建設(shè)、域名注冊

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)

成都網(wǎng)站建設(shè)