Skip to content
This repository has been archived by the owner on Nov 28, 2023. It is now read-only.

Commit

Permalink
Merge pull request #103 from wufeifei/develop
Browse files Browse the repository at this point in the history
improves
  • Loading branch information
FeeiCN authored Sep 14, 2016
2 parents 91b8572 + 0eef6c9 commit ef6332d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions app/controller/route.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
6 changes: 3 additions & 3 deletions engine/static.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit ef6332d

Please sign in to comment.