diff --git a/app/controller/route.py b/app/controller/route.py index c07ca10e..cc9817ad 100644 --- a/app/controller/route.py +++ b/app/controller/route.py @@ -50,6 +50,8 @@ def report(project_id): search_rule = request.args.get("search_rule", None) search_level = request.args.get("search_level", None) search_task = request.args.get("search_task", None) + if search_task == 'all': + search_task = None # 当前页码,默认为第一页 page = int(request.args.get("page", 1)) diff --git a/engine/static.py b/engine/static.py index 7b0ce691..38b3a19e 100644 --- a/engine/static.py +++ b/engine/static.py @@ -296,11 +296,11 @@ def analyse(self): print(traceback.print_exc()) logging.critical(e.message) else: - code_content = '# 触发位置\r' + code_content + code_content = code_content.encode('unicode_escape') + code_content = '# Trigger\r' + code_content if param_value is not None: - code_content = '# 参数可控\r' + param_value + '\r//\r// ------ 省略部分代码 ------\r//\r' + code_content + code_content = '# Param\r' + param_value + '\r//\r// ------ Continue... ------\r//\r' + code_content logging.debug('File: {0}:{1} {2}'.format(file_path, line_number, code_content)) - code_content = code_content.encode('unicode_escape') vul = CobraResults(self.task_id, self.project_id, rule.id, file_path, line_number, code_content, 0) db.session.add(vul) db.session.commit()