args.add_argument('-o', dest='outfile', action='store', help='Filename to write results (optional)') args.add_argument('--port', dest="port", type=int, default=False,help="Define request port") args.add_argument('--page', dest="page", type=str, default='/',help="Define request page") args.add_argument('-H','--header', dest="header", type=str, default=False, help="Extract header(s) from response, i.e: Server,X-Powered-By") proxy = args.add_mutually_exclusive_group(required=False) proxy.add_argument('--proxy', dest='proxy', action='append', default=[], help='Proxy requests (IP:Port)') proxy.add_argument('--proxy-file', dest='proxy', default=False, type=lambda x: file_exists(args, x), help='Load proxies from file for rotation') args.add_argument('--proto', dest="protocol", type=str, default=False,help="Define protocol {http,https}") args.add_argument('--resolve', dest='resolve', action='store_true', help='Resolve all DNS names before enumeration') args.add_argument(dest='target', nargs='+', help='Target') args = args.parse_args() cliLogger = setup_consoleLogger(spacers=[45,30,]) fileLogger = setup_fileLogger(args.outfile, mode='w') cliLogger.info(BANNER) urls = [] tmp_ip = ipparser(args.target[0], resolve=args.resolve, open_ports=True, exit_on_error=False, debug=False) for x in sample(tmp_ip, len(tmp_ip)): proto = [args.protocol] if args.protocol else ['http', 'https'] for p in proto: tmp_x = x[:-1] if x.endswith("/") else x tmp_x = tmp_x+":"+str(args.port) if args.port else tmp_x u = target2url(tmp_x+args.page, protocol=p) urls.append(u) if u not in urls else urls main(args, urls)
args.add_argument('-t', dest='timeout', type=int, default=30, help='Script timeout, 0=None (Default: 30)') args.add_argument('-tc', dest='conn_timeout', type=int, default=3, help='Indv connection timeout') args.add_argument('-C', dest='cookie', type=str, default='', help='Add Cookie (\'name1=123;name2=456\')') args.add_argument('-H', dest='header', type=str, default='', help='Add Header (\'name1=value1;name2=value2\')') args.add_argument('-o', dest='outfile', action='store', help='Output to filename to log results') args.add_argument('--spider', dest='spider', action='store_true', help='Show all spider results + JavaScript parsing') proxy = args.add_mutually_exclusive_group(required=False) proxy.add_argument('--proxy', dest='proxy', action='append', default=[], help='Proxy requests (IP:Port)') proxy.add_argument('--proxy-file', dest='proxy', default=False, type=lambda x: file_exists(args, x), help='Load proxies from file for rotation') args.add_argument(dest='target', nargs='+', help='Target website to crawl') args = args.parse_args() cliLogger = setup_consoleLogger() fileLogger = setup_fileLogger(args.outfile, mode='w') fileLogger.info('''Detection,Source URL,Item''') cliLogger.info(BANNER) headers = {} if args.header: headers = delimiter2dict(args.header) if args.cookie: headers['Cookie'] = args.cookie for target in ipparser(args.target[0]): if not target.startswith(('http://', 'https://')): target = "https://"+target main(target, args.depth, args.timeout, args.conn_timeout, headers, args.proxy)
# TESTING ONLY import sys sys.path.append('..') import os import logging from taser.logx import setup_consoleLogger, setup_fileLogger, TaserAdapter x = setup_consoleLogger() x.write('\nLog level test:') x.critical('[!] Console log: Critical {}'.format(logging.CRITICAL)) x.warning('Console log: Warning {}'.format(logging.WARNING)) x.info('console log: Info {}'.format(logging.INFO)) x.debug('Console log: Debug {}'.format(logging.DEBUG)) x.write('\nTaser adapter test:') x.write('[*] write') x.info('info') x.success('success') x.fail('fail') x.status('status') x.warning('warning') x.debug('debug') x.critical('') x.write('\nTaser file handler test:') y = setup_fileLogger(False) y.info('Log to file test, no filename') y.debug('Log to file test, no filename')
args.add_argument('-o', dest='outfile', action='store', help='Output to filename to log results') proxy = args.add_mutually_exclusive_group(required=False) proxy.add_argument('--proxy', dest='proxy', action='append', default=[], help='Proxy requests (IP:Port)') proxy.add_argument('--proxy-file', dest='proxy', default=False, type=lambda x: file_exists(args, x), help='Load proxies from file for rotation') args.add_argument('-s', dest='search_engine', choices=['bing', 'google'], default='bing', help='Search Engine {bing (Default, google}') args.add_argument(dest='query', nargs='+', help='Search Engine Query [Positional]') args = args.parse_args() cliLogger = setup_consoleLogger(spacers=[30]) fileLogger = setup_fileLogger(args.outfile, mode='w') fileLogger.info('''SOURCE,SEARCH,URL''') cliLogger.info(BANNER) main(args)
args.add_argument('-t', dest='timeout', type=int, default=20,help='Max timeout per search (Default=20, 0=None)') args.add_argument('-j', dest='jitter', type=float, default=0,help='Jitter between requests (Default=0)') args.add_argument('-v', dest="verbose", action='store_true', help="Show names and titles recovered after enumeration") args.add_argument(dest='company_name', nargs='?', help='Target company name') s = args.add_argument_group("Search arguments") s.add_argument('-H', dest='header', type=str, default='', help='Add Header (\'name1=value1;name2=value2;\')') s.add_argument('--search', dest='engine', type=str, default='google,bing',help='Search Engine (Default=\'google,bing\')') s.add_argument("--safe", dest="safe", action='store_true',help="Only parse names with company in title (Reduces false positives)") o = args.add_argument_group("Output arguments") o.add_argument('-f', dest='nformat', type=str, required=True, help='Format names, ex: \'domain\{f}{last}\', \'{first}.{last}@domain.com\'') o.add_argument('-o', dest='outfile', type=str, default='names.txt', help='Change name of output file (default=names.txt') p = args.add_argument_group("Proxy arguments") pr = p.add_mutually_exclusive_group(required=False) pr.add_argument('--proxy', dest='proxy', action='append', default=[], help='Proxy requests (IP:Port)') pr.add_argument('--proxy-file', dest='proxy', default=False, type=lambda x: file_exists(args, x), help='Load proxies from file for rotation') args = args.parse_args() logger = setup_consoleLogger(logging.DEBUG if args.debug else logging.INFO) ledger = setup_fileLogger(args.outfile, mode='w') setattr(args, 'header', delimiter2dict(args.header)) setattr(args, 'engine', delimiter2list(args.engine)) try: main(args) except KeyboardInterrupt: logger.warning("Key event detected, closing...") exit(0)
u.add_argument('-u', dest='users', required=True, default=False, type=lambda x: file_exists(args, x), help='TXT File of usernames or emails to test') p = args.add_argument_group("Proxy arguments") pr = p.add_mutually_exclusive_group(required=False) pr.add_argument('--proxy', dest='proxy', action='append', default=[], help='Proxy requests (IP:Port)') pr.add_argument('--proxy-file', dest='proxy', default=False, type=lambda x: file_exists(args, x), help='Load proxies from file for rotation') args = args.parse_args() logger = setup_consoleLogger(spacers=[8]) ledger = setup_fileLogger(args.outfile, mode='w') setattr(args, 'headers', delimiter2dict(args.headers)) try: main(args) except KeyboardInterrupt: logger.warning("Key event detected, closing...") exit(0)