update v2.1
This commit is contained in:
@@ -65,6 +65,6 @@ def Save_Csv(fun):
|
|||||||
# 写入多行数据
|
# 写入多行数据
|
||||||
for i in result:
|
for i in result:
|
||||||
writer.writerow(list(i.values()))
|
writer.writerow(list(i.values()))
|
||||||
status_print('结果已保存至:'+filename,1)
|
status_print('全部结果已保存至:'+filename,1)
|
||||||
# return fun(*args, **kwargs)
|
# return fun(*args, **kwargs)
|
||||||
return work
|
return work
|
||||||
|
|||||||
@@ -16,7 +16,10 @@
|
|||||||
|
|
||||||
from Config.config_banner import Banner
|
from Config.config_banner import Banner
|
||||||
from flask import Flask
|
from flask import Flask
|
||||||
|
from gevent import pywsgi
|
||||||
from flask import request
|
from flask import request
|
||||||
|
|
||||||
|
from Config.config_print import status_print
|
||||||
from Framework.console_attack import run_poc_api
|
from Framework.console_attack import run_poc_api
|
||||||
from Tools.ReBuild import get_moudle, get_payload
|
from Tools.ReBuild import get_moudle, get_payload
|
||||||
|
|
||||||
@@ -50,7 +53,11 @@ def list():
|
|||||||
res[i]=get_payload(i)
|
res[i]=get_payload(i)
|
||||||
return res
|
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__':
|
if __name__ == '__main__':
|
||||||
Banner()
|
Banner()
|
||||||
app.run(host='0.0.0.0', port=1988, debug=False)
|
app.run(host='0.0.0.0', port=1988, debug=False)
|
||||||
@@ -12,6 +12,7 @@ import argparse
|
|||||||
from Config.config_api import FOFA_API_KEY, SHODAN_API_KEY, HUNTER_API_KEY
|
from Config.config_api import FOFA_API_KEY, SHODAN_API_KEY, HUNTER_API_KEY
|
||||||
from Config.config_print import status_print
|
from Config.config_print import status_print
|
||||||
from Framework import console_attack
|
from Framework import console_attack
|
||||||
|
from Framework import console_api
|
||||||
from Seek import fofaapi, shodanapi, hunterapi
|
from Seek import fofaapi, shodanapi, hunterapi
|
||||||
from Framework.console_attack import get_urls
|
from Framework.console_attack import get_urls
|
||||||
from Framework.console_list import moudle_list, payload_list, payload_list_all
|
from Framework.console_list import moudle_list, payload_list, payload_list_all
|
||||||
@@ -23,6 +24,7 @@ def Console():
|
|||||||
parser = argparse.ArgumentParser()
|
parser = argparse.ArgumentParser()
|
||||||
M_POC = parser.add_argument_group('漏洞检测模块')
|
M_POC = parser.add_argument_group('漏洞检测模块')
|
||||||
M_SEEK = 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')
|
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("-shodan", dest='shodan',help="资产爬取")
|
||||||
M_SEEK.add_argument("-num", dest='num',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()
|
args = parser.parse_args()
|
||||||
|
|
||||||
########################################################################################################################
|
########################################################################################################################
|
||||||
@@ -111,21 +117,28 @@ def Console():
|
|||||||
moudle_list()
|
moudle_list()
|
||||||
elif args.listall:
|
elif args.listall:
|
||||||
payload_list_all()
|
payload_list_all()
|
||||||
|
elif args.server:
|
||||||
|
if args.port:
|
||||||
|
console_api.run(args.port)
|
||||||
|
else:
|
||||||
|
console_api.run()
|
||||||
else:
|
else:
|
||||||
status_print("Usage:"
|
status_print("Usage:"
|
||||||
"\n\tpython Meppo.py -l\t\t\t\tList All Moudles"
|
"\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 -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 -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 -u target\t\t单目标 单POC监测"
|
||||||
"\n\tpython Meppo.py -poc xxx -f targets.txt\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 -u target\t\t单目标 模块监测"
|
||||||
"\n\tpython Meppo.py -m xxx -f targets.txt\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\"\t\tFOFA API 报告导出 num默认1000"
|
||||||
"\n\tpython Meppo.py -fofa APP=\"DEMO\" -num 100\tFOFA API 报告导出 自定义数量"
|
"\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\"\t\tHUNTER API 报告导出 num默认1000"
|
||||||
"\n\tpython Meppo.py -hunter APP=\"DEMO\" -num 100\tSHODAN HUNTER 报告导出 自定义数量"
|
"\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\"\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 urllib
|
||||||
import binascii
|
import binascii
|
||||||
from Config.config_requests import headers
|
from Config.config_requests import headers
|
||||||
|
|
||||||
requests.packages.urllib3.disable_warnings()
|
requests.packages.urllib3.disable_warnings()
|
||||||
|
|
||||||
########################################################################################################################
|
########################################################################################################################
|
||||||
|
|||||||
@@ -2,11 +2,10 @@
|
|||||||
# _*_ coding:utf-8 _*_
|
# _*_ coding:utf-8 _*_
|
||||||
|
|
||||||
import requests
|
import requests
|
||||||
import requests.packages.urllib3
|
|
||||||
from Config.config_requests import ua
|
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 _*_
|
# _*_ coding:utf-8 _*_
|
||||||
|
|
||||||
import requests
|
import requests
|
||||||
import requests.packages.urllib3
|
|
||||||
|
|
||||||
requests.packages.urllib3.disable_warnings()
|
requests.packages.urllib3.disable_warnings()
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -43,7 +43,8 @@ Usage:
|
|||||||
python Meppo.py -hunter APP="DEMO" -num 100 SHODAN HUNTER 报告导出 自定义数量
|
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" SHODAN API 报告导出 num默认1000
|
||||||
python Meppo.py -shodan APP="DEMO" -num 100 SHODAN API 报告导出 自定义数量
|
python Meppo.py -shodan APP="DEMO" -num 100 SHODAN API 报告导出 自定义数量
|
||||||
|
python Meppo.py -server 启动API服务 默认1988端口
|
||||||
|
python Meppo.py -server -port 1988 启动API服务 自定义端口
|
||||||
|
|
||||||
```
|
```
|
||||||
```angular2html
|
```angular2html
|
||||||
@@ -75,6 +76,10 @@ options:
|
|||||||
-shodan SHODAN 资产爬取
|
-shodan SHODAN 资产爬取
|
||||||
-num NUM 资产数量
|
-num NUM 资产数量
|
||||||
|
|
||||||
|
API服务模块:
|
||||||
|
-server 启动API服务
|
||||||
|
-port PORT 监听端口
|
||||||
|
|
||||||
```
|
```
|
||||||
```angular2html
|
```angular2html
|
||||||
_____
|
_____
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ def fofaapi(keyword,num):
|
|||||||
dic['server'] = i[5]
|
dic['server'] = i[5]
|
||||||
dic['title'] = i[6]
|
dic['title'] = i[6]
|
||||||
reslist.append(dic)
|
reslist.append(dic)
|
||||||
|
hosts.append(i[0])
|
||||||
print(dic)
|
print(dic)
|
||||||
gethosts(hosts)
|
gethosts(hosts)
|
||||||
return reslist
|
return reslist
|
||||||
|
|||||||
Reference in New Issue
Block a user