Skip to content

Commit

Permalink
fix a little bug
Browse files Browse the repository at this point in the history
  • Loading branch information
LoRexxar committed Sep 10, 2021
1 parent 31d95ab commit 1ee36f1
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions core/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import os
import codecs
import pprint
import traceback
from prettytable import PrettyTable

from .detection import Detection
Expand Down Expand Up @@ -140,8 +141,13 @@ def display_result(scan_id, is_ask=False):
logger.info("[Chain] Vul {}".format(sr.id))
for rf in rfs:
logger.info("[Chain] {}, {}, {}:{}".format(rf.node_type, rf.node_content, rf.node_path, rf.node_lineno))
if not show_context(rf.node_path, rf.node_lineno):
logger_console.info(rf.node_source)

try:
if not show_context(rf.node_path, rf.node_lineno):
logger_console.info(rf.node_source)
except:
logger.error("[SCAN] Error: {}".format(traceback.print_exc()))
continue

logger.info(
"[SCAN] ending\r\n -------------------------------------------------------------------------")
Expand Down

0 comments on commit 1ee36f1

Please sign in to comment.