update v2.1
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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,6 +53,10 @@ 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()
|
||||
@@ -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,6 +117,11 @@ 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"
|
||||
@@ -125,7 +136,9 @@ def Console():
|
||||
"\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 -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)
|
||||
|
||||
|
||||
########################################################################################################################
|
||||
|
||||
@@ -6,6 +6,7 @@ import re
|
||||
import urllib
|
||||
import binascii
|
||||
from Config.config_requests import headers
|
||||
|
||||
requests.packages.urllib3.disable_warnings()
|
||||
|
||||
########################################################################################################################
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
# 脚本信息
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
# _*_ coding:utf-8 _*_
|
||||
|
||||
import requests
|
||||
import requests.packages.urllib3
|
||||
|
||||
requests.packages.urllib3.disable_warnings()
|
||||
|
||||
|
||||
|
||||
@@ -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
|
||||
_____
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user