Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
LoRexxar committed Sep 7, 2017
1 parent 67c28fd commit b264f4f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 deletions.
20 changes: 8 additions & 12 deletions cobra/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 2 additions & 0 deletions cobra/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit b264f4f

Please sign in to comment.