Skip to content

Commit d11bbe1

Browse files
Improved color style and output format
1 parent 0603415 commit d11bbe1

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

pagesearch/pagesearch_parsers.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,17 +46,17 @@ def subdomains_parser(subdomains_list, report_folder, keywords, keywords_flag):
4646
emails = re.findall(email_pattern, soup.text)
4747
if not emails:
4848
emails = ['None']
49-
print(Fore.GREEN + "Page URL: " + Fore.RESET + f"{url}" + Style.RESET_ALL)
50-
print(Fore.GREEN + "Page title: " + Fore.RESET + f"{title}" + Style.RESET_ALL)
51-
print(Fore.GREEN + "Founded e-mails: " + Fore.RESET + f"{', '.join(emails)}" + Style.RESET_ALL)
49+
print(Fore.GREEN + "Page URL: " + Fore.LIGHTCYAN_EX + Style.BRIGHT + f"{url}" + Style.RESET_ALL)
50+
print(Fore.GREEN + "Page title: " + Fore.LIGHTCYAN_EX + Style.BRIGHT + f"{title}" + Style.RESET_ALL)
51+
print(Fore.GREEN + "Founded e-mails: " + Fore.LIGHTCYAN_EX + Style.BRIGHT + f"{', '.join(emails)}" + Style.RESET_ALL)
5252
links = soup.find_all('a')
5353
for link in links:
5454
href = link.get('href')
5555
if href:
5656
#print(f"Found link: {href}") # Debugging line
5757
if href.lower().endswith(('.docx', '.xlsx', '.csv', '.pdf', '.pptx', '.doc', '.ppt', '.xls', '.rtf')):
5858
document_url = 'http://' + url + href
59-
print(Fore.GREEN + "Found document: " + Fore.RESET + f"{document_url}" + Style.RESET_ALL)
59+
print(Fore.GREEN + "Found document: " + Fore.LIGHTCYAN_EX + Style.BRIGHT + f"{document_url}" + Style.RESET_ALL)
6060
response = requests.get(document_url)
6161
if response.status_code == 200:
6262
if href and href.lower().endswith(('.docx')):
@@ -123,7 +123,7 @@ def subdomains_parser(subdomains_list, report_folder, keywords, keywords_flag):
123123
try:
124124
pdf_results = find_keywords_in_pdfs(ps_docs_path, keywords)
125125
for pdf_file, found_keywords in pdf_results.items():
126-
print(Fore.GREEN + f"Keywords " + Fore.RESET + f"{', '.join(found_keywords)}" + Fore.GREEN + f" found in '{pdf_file}'")
126+
print(Fore.GREEN + f"Keywords " + Fore.LIGHTCYAN_EX + Style.BRIGHT + f"{', '.join(found_keywords)}" + Style.RESET_ALL + Fore.GREEN + f" found in '{pdf_file}'")
127127
except Exception as e:
128128
print(Fore.RED + f"Can't find keywords. Reason: {e}")
129129
elif keywords_flag == 0:

0 commit comments

Comments
 (0)