diff --git a/cobra/__init__.py b/cobra/__init__.py index ae8d5e0b..68dcea51 100644 --- a/cobra/__init__.py +++ b/cobra/__init__.py @@ -53,23 +53,19 @@ def main(): logger.setLevel(logging.DEBUG) logger.debug('[INIT] set logging level: debug') - if args.host is None and args.port is None and args.target is '' and args.output is '': + if args.target is '' and args.output is '': parser.print_help() exit() logger.debug('[INIT] start scanning...') - # Native CLI mode - if args.sid is None: - a_sid = get_sid(args.target, True) - data = { - 'status': 'running', - 'report': '' - } - Running(a_sid).status(data) - else: - # API call CLI mode - a_sid = args.sid + a_sid = get_sid(args.target, True) + data = { + 'status': 'running', + 'report': '' + } + Running(a_sid).status(data) + cli.start(args.target, args.format, args.output, args.special_rules, a_sid) t2 = time.time() diff --git a/cobra/engine.py b/cobra/engine.py index a3d7ee17..01a081c7 100644 --- a/cobra/engine.py +++ b/cobra/engine.py @@ -384,6 +384,8 @@ def parse_match(self, single_match): mr.solution = self.sr['solution'] mr.level = self.sr['level'] + return mr + class Core(object): def __init__(self, target_directory, vulnerability_result, single_rule, project_name, white_list, test=False,