def specific(options, module): module = module.lower() if 'subdomain' in module: subdomain.SubdomainScanning(options) takeover.TakeOverScanning(options) screenshot.ScreenShot(options) cors.CorsScan(options) elif 'screenshot' in module: screenshot.ScreenShot(options) elif 'portscan' in module: # scanning port, service and vuln with masscan and nmap portscan.PortScan(options) elif 'vuln' in module: # scanning vulnerable service based on version vulnscan.VulnScan(options) elif 'git' in module: gitscan.GitScan(options) elif 'burp' in module: burpstate.BurpState(options) elif 'brute' in module or 'force' in module: # running brute force things based on scanning result brutethings.BruteThings(options) elif 'ip' in module: #Discovery IP space ipspace.IPSpace(options) elif 'headers' in module: #Headers Scan headers.HeadersScan(options) elif 'dir' in module: # run blind directory brute force directly dirbrute.DirBrute(options) conclusion.Conclusion(options)
def single_target(args): print('{2}---<---<--{1}@{2} Target: {0} {1}@{2}-->--->---'.format( args.target, P, G)) if args.target: if args.output: options['env']['OUTPUT'] = args.output else: options['env']['OUTPUT'] = args.target #just loop in the for if the target list options['target'] = args.target options['env']['TARGET'] = args.target options['env']['STRIP_TARGET'] = args.target.replace('https://', '').replace( 'http://', '') if '/' in options['env']['STRIP_TARGET']: options['env']['STRIP_TARGET'] = options['env'][ 'STRIP_TARGET'].split('/')[0] if args.workspace: if args.workspace[-1] == '/': options['env']['WORKSPACE'] = args.workspace + options['env'][ 'STRIP_TARGET'] else: options['env']['WORKSPACE'] = args.workspace + '/' + options[ 'env']['STRIP_TARGET'] else: options['env'][ 'WORKSPACE'] = current_path + '/workspaces/' + options['env'][ 'STRIP_TARGET'] #create workspace folder for the target utils.make_directory(options['env']['WORKSPACE']) options['env']['IP'] = socket.gethostbyname(options['env']['TARGET']) #run specific task otherwise run the normal routine if args.module: module = args.module if 'subdomain' in module: subdomain.SubdomainScanning(options) takeover.TakeOverScanning(options) screenshot.ScreenShot(options) cors.CorsScan(options) elif 'screenshot' in module: screenshot.ScreenShot(options) elif 'portscan' in module: # scanning port, service and vuln with masscan and nmap portscan.PortScan(options) elif 'vuln' in module: # scanning vulnerable service based on version vulnscan.VulnScan(options) elif 'git' in module: gitscan.GitScan(options) elif 'burp' in module: burpstate.BurpState(options) elif 'brute' in module or 'force' in module: # running brute force things based on scanning result brutethings.BruteThings(options) elif 'ip' in module: #Discovery IP space ipspace.IPSpace(options) elif 'dir' in module: # run blind directory brute force directly dirbrute.DirBrute(options) else: routine(options)