Skip to content

Commit b1cc183

Browse files
Improved output and color style, added new variables and arguments in functions
1 parent d11bbe1 commit b1cc183

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

dpulse.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ def run():
6464
elif keywords_input.lower() == "none":
6565
keywords_list = None
6666
keywords_flag = 0
67+
elif pagesearch_flag == 'N':
68+
keywords_flag = 0
6769
report_filetype_lowered = report_filetype.lower()
6870
if report_filetype_lowered == 'pdf' or report_filetype_lowered == 'xlsx':
6971
if pagesearch_flag == 'Y' or pagesearch_flag == 'N':
@@ -74,7 +76,10 @@ def run():
7476
else:
7577
pagesearch_ui_mark = 'Yes, without keywords search'
7678
print(Fore.LIGHTMAGENTA_EX + "\n[PRE-SCAN SUMMARY]\n" + Style.RESET_ALL)
77-
print(Fore.GREEN + "Determined target: {}\nCase comment: {}\nReport file extension: {}\nPageSearch: {}\n".format(short_domain, case_comment, report_filetype_lowered, pagesearch_ui_mark) + Style.RESET_ALL)
79+
print(Fore.GREEN + "Determined target: " + Fore.LIGHTCYAN_EX + Style.BRIGHT + short_domain + Style.RESET_ALL)
80+
print(Fore.GREEN + "Report type: " + Fore.LIGHTCYAN_EX + Style.BRIGHT + report_filetype_lowered + Style.RESET_ALL)
81+
print(Fore.GREEN + "PageSearch conduction: " + Fore.LIGHTCYAN_EX + Style.BRIGHT + pagesearch_ui_mark + Style.RESET_ALL)
82+
print(Fore.GREEN + "Case comment: " + Fore.LIGHTCYAN_EX + Style.BRIGHT + case_comment + Style.RESET_ALL + "\n")
7883
print(Fore.LIGHTMAGENTA_EX + "[SCANNING PROCESS]\n" + Style.RESET_ALL)
7984
spinner_thread = ProgressBar()
8085
spinner_thread.start()
@@ -83,7 +88,7 @@ def run():
8388
if pagesearch_flag == 'Y':
8489
data_array, report_info_array = data_processing.data_gathering(short_domain, url, report_filetype_lowered, pagesearch_flag.lower(), keywords_list, keywords_flag)
8590
else:
86-
data_array, report_info_array = data_processing.data_gathering(short_domain, url, report_filetype_lowered, pagesearch_flag.lower(), '')
91+
data_array, report_info_array = data_processing.data_gathering(short_domain, url, report_filetype_lowered, pagesearch_flag.lower(), '', keywords_flag)
8792
pdf_rc.report_assembling(short_domain, url, case_comment, data_array, report_info_array)
8893
finally:
8994
spinner_thread.do_run = False
@@ -93,7 +98,7 @@ def run():
9398
if pagesearch_flag == 'Y':
9499
data_array, report_info_array = data_processing.data_gathering(short_domain, url, report_filetype_lowered, pagesearch_flag.lower(), keywords_list, keywords_flag)
95100
else:
96-
data_array, report_info_array = data_processing.data_gathering(short_domain, url, report_filetype_lowered, pagesearch_flag.lower(), '')
101+
data_array, report_info_array = data_processing.data_gathering(short_domain, url, report_filetype_lowered, pagesearch_flag.lower(), '', keywords_flag)
97102
xlsx_rc.create_report(short_domain, url, case_comment, data_array, report_info_array)
98103
finally:
99104
spinner_thread.do_run = False

0 commit comments

Comments
 (0)