Exemplo n.º 1
0
 def __init__(self):
     self.requestdict = {}
     self.responsedict = {}
     self.mysqlutil = mysqlutil()
     self.dealrequest = dealrequest()
     self.encryutils = encryutils()
     self.check_result = {}
     self.tempresult = {}
     self.result_data = ""
     self.req_param = ""  # 请求参数
     self.uniq_request = ""
Exemplo n.º 2
0
 def __init__(self):
     # 初始化扫描功能
     # app  启动写在构造函数中
     self.judge_out_of_access = Judge_out_of_access()
     self.payloadlist_xss = Payloadlist_xss()
     self.check_sensitive_info = Check_sensitive_info()
     self.segment = Segment()
     self.monitor = Monitor()
     self.mysqlutil = mysqlutil()
     self.global_data = myData()
     self.proxyList = "test"
     self.requestdict = {}
     self.finishdict = {}
     self.origin_requestdict = {}  # 原始字典,包含id
Exemplo n.º 3
0
@app.route('/')
def index():
    return render_template("index.html")


@app.route('/test_nginx')
def test_nginx():
    return json.dumps({"code": 20000, "data": "test_nginx"})


api = Api(app)
# CORS(app, resources=r'/*')
CORS(app, resources=r'/*', supports_credentials=True)

mysqlutil = mysqlutil()
myencryutils = encryutils()
mydbconfig = dbconfig()


def get_post_data():
    """
    从请求中获取参数
    :return:
    """
    data = {}
    if request.content_type.startswith('application/json'):
        # data = request.get_data()
        data = request.get_data(as_text=True)
        print(type(data))
        print(data)
Exemplo n.º 4
0
 def __init__(self):
     self.requestdict = {}
     self.mysqlutil = mysqlutil()
     self.check_result = {}
     self.result_data = ""
Exemplo n.º 5
0
# coding:utf8
from components.vul_scan import Vul_scan
import time
from utils.mysqlutils import mysqlutil

if __name__ == '__main__':
    flag = False
    vul_scan = Vul_scan()
    mysqlutil = mysqlutil()  # 每次实例化一个对象,防止类成员变量重复

    while 1:
        print("开始循环监听扫描")
        # 监听事件,或者读数据库字段
        # 标记启动那里需要的是写入数据库值
        # 循环读取扫描状态表
        resultlist = mysqlutil.get_project_status("scanning")
        if len(resultlist) == 0 or resultlist is None:
            flag = False
        else:
            flag = True
        if flag:
            print("开始执行")
            for resultline in resultlist:
                # 扫描需要id  用户名 项目名参数 OK  顺序
                print("vul_scan")
                vul_scan.work(resultline)
        resultlist.clear()
        time.sleep(3)
 def __init__(self):
     self.requestdict = {}
     self.mysqlutil = mysqlutil()