def parsing_argument(args): if not args.client and not args.report: if not utils.connection_check('127.0.0.1', 5000): p = Process(target=flask_run) p.start() # wait for flask API start time.sleep(3) else: utils.print_info("Look like Flask API already ran") # parsing agument if args.config: options = config.parsing_config(args.config, args) else: options = config.parsing_config(None, args) # report mode if args.report: report.parsing_report(options) sys.exit(0) if options['TARGET_LIST'] != "None": # check if target list file exist and loop throught the target targetlist = utils.just_read(options.get('TARGET_LIST')) if targetlist: for target in targetlist.splitlines(): options['TARGET'] = target single_target(options) utils.print_target(options.get('TARGET')) else: single_target(options)
def parsing_argument(args): if not args.client: p = Process(target=flask_run) p.start() #parsing agument if args.config: config_path = args.config options = config.parsing_config(config_path, args) #wait for flask API start time.sleep(2) try: utils.set_config(options) options['JWT'] = utils.get_jwt(options) except: utils.print_bad("Fail to set config, Please check Flask API !!!") sys.exit(-1) if options['TARGET_LIST'] != "None": #check if target list file exist and loop throught the target if os.path.exists(options['TARGET_LIST']): with open(options['TARGET_LIST'], 'r+') as ts: targetlist = ts.read().splitlines() for target in targetlist: options['TARGET'] = target single_target(options) print( "{2}>++('> >++('{1}>{2} Target done: {0} {1}<{2}')++< <')++<" .format(options['TARGET'], P, G)) else: single_target(options)
def parsing_argument(args): p = Process(target=flask_run) p.start() #parsing agument if args.config: config_path = args.config options = config.parsing_config(config_path, args) #wait for flask API start time.sleep(2) if options['TARGET_LIST'] != "None": #check if target list file exist and loop throught the target if os.path.exists(options['TARGET_LIST']): with open(options['TARGET_LIST'], 'r+') as ts: targetlist = ts.read().splitlines() for target in targetlist: options['TARGET'] = target single_target(options) print( "{2}>++('> >++('{1}>{2} Target done: {0} {1}<{2}')++< <')++<" .format(options['TARGET'], P, G)) else: single_target(options)
def parsing_argument(args): if not args.client: p = Process(target=flask_run) p.start() #parsing agument if args.config: config_path = args.config options = config.parsing_config(config_path, args) #wait for flask API start time.sleep(2) try: utils.set_config(options) options['JWT'] = utils.get_jwt(options) except: utils.print_bad("Fail to set config, Something went from with Flask API !!!") utils.print_bad( "Visit this page for common issue: https://github.com/j3ssie/Osmedeus/wiki/Common-Issues") sys.exit(-1) if options['TARGET_LIST'] != "None": #check if target list file exist and loop throught the target if os.path.exists(options['TARGET_LIST']): with open(options['TARGET_LIST'], 'r+') as ts: targetlist = ts.read().splitlines() for target in targetlist: options['TARGET'] = target single_target(options) print( "{2}>++('> >++('{1}>{2} Target done: {0} {1}<{2}')++< <')++<".format(options['TARGET'], P, G)) else: single_target(options)