update v2.1

This commit is contained in:
RabbitMask
2022-04-15 11:16:07 +08:00
parent a9d9fd0df5
commit 0959340ee8
8 changed files with 45 additions and 21 deletions

View File

@@ -65,6 +65,6 @@ def Save_Csv(fun):
# 写入多行数据
for i in result:
writer.writerow(list(i.values()))
status_print('结果已保存至:'+filename,1)
status_print('全部结果已保存至:'+filename,1)
# return fun(*args, **kwargs)
return work

View File

@@ -16,7 +16,10 @@
from Config.config_banner import Banner
from flask import Flask
from gevent import pywsgi
from flask import request
from Config.config_print import status_print
from Framework.console_attack import run_poc_api
from Tools.ReBuild import get_moudle, get_payload
@@ -50,7 +53,11 @@ def list():
res[i]=get_payload(i)
return res
def run(port=1988):
status_print('服务已启动:'+'0.0.0.0:'+str(port))
server = pywsgi.WSGIServer(('0.0.0.0', port), app)
server.serve_forever()
if __name__ == '__main__':
Banner()
app.run(host='0.0.0.0', port=1988, debug=False)
app.run(host='0.0.0.0', port=1988, debug=False)

View File

@@ -12,6 +12,7 @@ import argparse
from Config.config_api import FOFA_API_KEY, SHODAN_API_KEY, HUNTER_API_KEY
from Config.config_print import status_print
from Framework import console_attack
from Framework import console_api
from Seek import fofaapi, shodanapi, hunterapi
from Framework.console_attack import get_urls
from Framework.console_list import moudle_list, payload_list, payload_list_all
@@ -23,6 +24,7 @@ def Console():
parser = argparse.ArgumentParser()
M_POC = parser.add_argument_group('漏洞检测模块')
M_SEEK = parser.add_argument_group('资产爬取模块')
M_API = parser.add_argument_group('API服务模块')
########################################################################################################################
parser.add_argument("-l", dest='list',help="list",action='store_true')
@@ -42,6 +44,10 @@ def Console():
M_SEEK.add_argument("-shodan", dest='shodan',help="资产爬取")
M_SEEK.add_argument("-num", dest='num',help="资产数量")
#API服务模块
M_API.add_argument("-server", help="启动API服务", action='store_true')
M_API.add_argument("-port", dest='port',help="监听端口")
args = parser.parse_args()
########################################################################################################################
@@ -111,21 +117,28 @@ def Console():
moudle_list()
elif args.listall:
payload_list_all()
elif args.server:
if args.port:
console_api.run(args.port)
else:
console_api.run()
else:
status_print("Usage:"
"\n\tpython Meppo.py -l\t\t\t\tList All Moudles"
"\n\tpython Meppo.py -ll\t\t\t\tList All Payloads"
"\n\tpython Meppo.py -m xxx -l\t\t\tList Payload Of The Moudle"
"\n\tpython Meppo.py -poc xxx -u target\t\t单目标 单POC监测"
"\n\tpython Meppo.py -poc xxx -f targets.txt\t\t多目标 单POC监测"
"\n\tpython Meppo.py -m xxx -u target\t\t单目标 模块监测"
"\n\tpython Meppo.py -m xxx -f targets.txt\t\t多目标 模块监测"
"\n\tpython Meppo.py -fofa APP=\"DEMO\"\t\tFOFA API 报告导出 num默认1000"
"\n\tpython Meppo.py -fofa APP=\"DEMO\" -num 100\tFOFA API 报告导出 自定义数量"
"\n\tpython Meppo.py -hunter APP=\"DEMO\"\t\tHUNTER API 报告导出 num默认1000"
"\n\tpython Meppo.py -hunter APP=\"DEMO\" -num 100\tSHODAN HUNTER 报告导出 自定义数量"
"\n\tpython Meppo.py -shodan APP=\"DEMO\"\t\tSHODAN API 报告导出 num默认1000"
"\n\tpython Meppo.py -shodan APP=\"DEMO\" -num 100\tSHODAN API 报告导出 自定义数量",5)
"\n\tpython Meppo.py -l\t\t\t\tList All Moudles"
"\n\tpython Meppo.py -ll\t\t\t\tList All Payloads"
"\n\tpython Meppo.py -m xxx -l\t\t\tList Payload Of The Moudle"
"\n\tpython Meppo.py -poc xxx -u target\t\t单目标 单POC监测"
"\n\tpython Meppo.py -poc xxx -f targets.txt\t\t多目标 单POC监测"
"\n\tpython Meppo.py -m xxx -u target\t\t单目标 模块监测"
"\n\tpython Meppo.py -m xxx -f targets.txt\t\t多目标 模块监测"
"\n\tpython Meppo.py -fofa APP=\"DEMO\"\t\tFOFA API 报告导出 num默认1000"
"\n\tpython Meppo.py -fofa APP=\"DEMO\" -num 100\tFOFA API 报告导出 自定义数量"
"\n\tpython Meppo.py -hunter APP=\"DEMO\"\t\tHUNTER API 报告导出 num默认1000"
"\n\tpython Meppo.py -hunter APP=\"DEMO\" -num 100\tSHODAN HUNTER 报告导出 自定义数量"
"\n\tpython Meppo.py -shodan APP=\"DEMO\"\t\tSHODAN API 报告导出 num默认1000"
"\n\tpython Meppo.py -shodan APP=\"DEMO\" -num 100\tSHODAN API 报告导出 自定义数量"
"\n\tpython Meppo.py -server\t\t\t\t启动API服务 默认1988端口"
"\n\tpython Meppo.py -server -port 1988\t\t启动API服务 自定义端口",5)
########################################################################################################################

View File

@@ -6,6 +6,7 @@ import re
import urllib
import binascii
from Config.config_requests import headers
requests.packages.urllib3.disable_warnings()
########################################################################################################################

View File

@@ -2,11 +2,10 @@
# _*_ coding:utf-8 _*_
import requests
import requests.packages.urllib3
from Config.config_requests import ua
from requests.packages.urllib3.exceptions import InsecureRequestWarning
requests.packages.urllib3.disable_warnings(InsecureRequestWarning)
requests.packages.urllib3.disable_warnings()
# 脚本信息

View File

@@ -2,8 +2,6 @@
# _*_ coding:utf-8 _*_
import requests
import requests.packages.urllib3
requests.packages.urllib3.disable_warnings()

View File

@@ -43,7 +43,8 @@ Usage:
python Meppo.py -hunter APP="DEMO" -num 100 SHODAN HUNTER 报告导出 自定义数量
python Meppo.py -shodan APP="DEMO" SHODAN API 报告导出 num默认1000
python Meppo.py -shodan APP="DEMO" -num 100 SHODAN API 报告导出 自定义数量
python Meppo.py -server 启动API服务 默认1988端口
python Meppo.py -server -port 1988 启动API服务 自定义端口
```
```angular2html
@@ -75,6 +76,10 @@ options:
-shodan SHODAN 资产爬取
-num NUM 资产数量
API服务模块:
-server 启动API服务
-port PORT 监听端口
```
```angular2html
_____

View File

@@ -27,6 +27,7 @@ def fofaapi(keyword,num):
dic['server'] = i[5]
dic['title'] = i[6]
reslist.append(dic)
hosts.append(i[0])
print(dic)
gethosts(hosts)
return reslist