From 6f6f3b65993ddb0de3ace2addb875aca7b524740 Mon Sep 17 00:00:00 2001 From: OSINT-TECHNOLOGIES <77023667+OSINT-TECHNOLOGIES@users.noreply.github.com> Date: Sun, 28 Jul 2024 21:45:29 +0300 Subject: [PATCH] Added check for PageSearch if subdomains were not found --- datagather_modules/data_assembler.py | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/datagather_modules/data_assembler.py b/datagather_modules/data_assembler.py index 14d1a20..db5b1cf 100644 --- a/datagather_modules/data_assembler.py +++ b/datagather_modules/data_assembler.py @@ -93,10 +93,13 @@ def data_gathering(self, short_domain, url, report_file_type, pagesearch_flag, k web_servers, cms, programming_languages, web_frameworks, analytics, javascript_frameworks, ports, hostnames, cpes, tags, vulns, dorking_status, common_socials, total_socials] if pagesearch_flag.lower() == 'y': - to_search_array = [subdomains, social_medias, sd_socials] - print(Fore.LIGHTMAGENTA_EX + "\n[PAGESEARCH SUBPROCESS START]\n" + Style.RESET_ALL) - normal_search(to_search_array, report_folder, keywords, keywords_flag) - print(Fore.LIGHTMAGENTA_EX + "\n[PAGESEARCH SUBPROCESS END]\n" + Style.RESET_ALL) + if subdomains[0] != 'No subdomains were found': + to_search_array = [subdomains, social_medias, sd_socials] + print(Fore.LIGHTMAGENTA_EX + "\n[PAGESEARCH SUBPROCESS START]\n" + Style.RESET_ALL) + normal_search(to_search_array, report_folder, keywords, keywords_flag) + print(Fore.LIGHTMAGENTA_EX + "\n[PAGESEARCH SUBPROCESS END]\n" + Style.RESET_ALL) + else: + print(Fore.RED + "Cant start PageSearch because no subdomains were detected") elif pagesearch_flag.lower() == 'n': pass elif report_file_type == 'xlsx': @@ -106,10 +109,13 @@ def data_gathering(self, short_domain, url, report_file_type, pagesearch_flag, k web_servers, cms, programming_languages, web_frameworks, analytics, javascript_frameworks, ports, hostnames, cpes, tags, vulns, dorking_status, common_socials, total_socials, parsed_links, subdomain_urls, dorking_results] if pagesearch_flag.lower() == 'y': - to_search_array = [subdomains, social_medias, sd_socials] - print(Fore.LIGHTMAGENTA_EX + "\n[PAGESEARCH SUBPROCESS START]\n" + Style.RESET_ALL) - normal_search(to_search_array, report_folder, keywords, keywords_flag) - print(Fore.LIGHTMAGENTA_EX + "\n[PAGESEARCH SUBPROCESS END]\n" + Style.RESET_ALL) + if subdomains[0] != 'No subdomains were found': + to_search_array = [subdomains, social_medias, sd_socials] + print(Fore.LIGHTMAGENTA_EX + "\n[PAGESEARCH SUBPROCESS START]\n" + Style.RESET_ALL) + normal_search(to_search_array, report_folder, keywords, keywords_flag) + print(Fore.LIGHTMAGENTA_EX + "\n[PAGESEARCH SUBPROCESS END]\n" + Style.RESET_ALL) + else: + print(Fore.RED + "Cant start PageSearch because no subdomains were detected") elif pagesearch_flag.lower() == 'n': pass