def scanner(request): request_info = get_request_info(request) print 'xss request info' if request_info['method'] == "GET": scan_get_request(request_info) elif request_info['method'] == "POST": scan_post_request(request_info)
def scanner(request): sqlmapapi_servers = [] sqlmaps = fetch_sqlmap() for sqlmap in sqlmaps: sqlmap_info = get_sqlmap_info(sqlmap) sqlmapapi = "http://{}:{}/".format(sqlmap_info['ip'], sqlmap_info['port']) sqlmapapi_servers.append(sqlmapapi) if len(sqlmapapi_servers) > 0: sqlmapapi_server = random.sample(sqlmapapi_servers, 1)[0] else: sqlmapapi_server = 'http://127.0.0.1:8775/' request_info = get_request_info(request) scan_sqli_request(request_info, sqlmapapi_server)
def scanner(request): request_info = get_request_info(request) if request_info['method'] == "GET": scan_get_request(request_info) elif request_info['method'] == "POST": scan_post_request(request_info)