# Show banner. show_banner(utility) # Create signature and train data. if opt_develop: creator = Creator(utility) creator.extract_file_structure(opt_develop_category, opt_develop_vendor, opt_develop_package) print(os.path.basename(__file__) + ' finish!!') utility.write_log(20, '[Out] GyoiThon [{}].'.format(file_name)) sys.exit(0) # Explore relevant FQDN with the target FQDN. if opt_invent: inventory_list_path = os.path.join(full_path, 'inventory_list.txt') if os.path.exists(inventory_list_path): inventory = Inventory(utility) spider = SpiderControl(utility) google_hack = GoogleCustomSearch(utility) report = CreateReport(utility) with codecs.open(inventory_list_path, 'r', 'utf-8') as fin: targets = fin.readlines() for target in targets: items = target.replace('\r', '').replace('\n', '').split('\t') if len(items) != 2: utility.print_message(FAIL, 'Invalid inventory target : {}'.format(target)) continue # Check target URL. port_num = '' invent_url = ''
if opt_develop: creator = Creator(utility) creator.extract_file_structure(opt_develop_category, opt_develop_vendor, opt_develop_package) print(os.path.basename(__file__) + ' finish!!') utility.write_log(20, '[Out] GyoiThon [{}].'.format(file_name)) sys.exit(0) # Explore relevant FQDN with the target FQDN. if opt_invent: # Create path. org_list_path = os.path.join(full_path, 'organization_list.csv') domain_list_path = os.path.join(full_path, 'domain_list.csv') # Create instances. inventory = Inventory(utility) google_hack = GoogleCustomSearch(utility) cv = ComputerVision(utility) report = CreateReport(utility) # Explore domains and subdomains from domain list. if opt_invent_domain_list is not None and os.path.exists( domain_list_path): # Get import path of domain list. # Search domain. domain_info_dict_tmp = inventory.domain_explore( import_list=domain_list_path) # Search sub-domain. inventory.sub_domain_explore(domain_info_dict_tmp, google_hack)
opt_develop_vendor, opt_develop_package) print(os.path.basename(__file__) + ' finish!!') utility.write_log(20, '[Out] GyoiThon [{}].'.format(file_name)) sys.exit(0) # Explore relevant FQDN with the target FQDN. report_path = None invent_report_header = None inventory = None if opt_invent: # Create path. org_list_path = os.path.join(full_path, 'organization_list.csv') domain_list_path = os.path.join(full_path, 'domain_list.csv') # Create instances. inventory = Inventory(utility) google_hack = GoogleCustomSearch(utility) cv = ComputerVision(utility) report = CreateReport(utility) # Define report header for continuous health check. invent_report_header = report.header_invent if opt_invent_screen_shot: invent_report_header.extend(report.header_ss) # Explore domains and subdomains from domain list. if opt_invent_domain_list is not None and os.path.exists( domain_list_path): # Get import path of domain list. # Search domain. domain_info_dict_tmp = inventory.domain_explore(
show_banner(utility) # Create signature and train data. if opt_develop: creator = Creator(utility) creator.extract_file_structure(opt_develop_category, opt_develop_vendor, opt_develop_package) print(os.path.basename(__file__) + ' finish!!') utility.write_log(20, '[Out] GyoiThon [{}].'.format(file_name)) sys.exit(0) # Explore relevant FQDN with the target FQDN. if opt_invent and utility.check_arg_value(opt_invent_scheme, opt_invent_fqdn, opt_invent_port, opt_invent_path): inventory = Inventory(utility) spider = SpiderControl(utility) google_hack = GoogleCustomSearch(utility) # Check encoding type of target site. target_url = '' if int(opt_invent_port) in [80, 443]: target_url = opt_invent_scheme + '://' + opt_invent_fqdn + opt_invent_path else: target_url = opt_invent_scheme + '://' + opt_invent_fqdn + ':' + opt_invent_port + opt_invent_path # Gather relevant FQDN. all_fqdn_list = inventory.fqdn_explore(spider, google_hack, target_url, opt_invent_keyword) exit(0)