diff --git a/cobra/api.py b/cobra/api.py index 4a8b7820..96552ef6 100644 --- a/cobra/api.py +++ b/cobra/api.py @@ -111,7 +111,7 @@ def post(): if isinstance(target, list): for t in target: # Scan - if re.match(r'http://|https://', t): + if re.match(r'http://|https://', t) or os.path.exists(t): arg = (t, formatter, output, rule, a_sid, is_del) producer(task=arg) @@ -124,7 +124,7 @@ def post(): 'total_target_num': len(target), } else: - if re.match(r'http://|https://', target): + if re.match(r'http://|https://', target) or os.path.exists(target): arg = (target, formatter, output, rule, a_sid, is_del) producer(task=arg)