Skip to content

Commit 0c64940

Browse files
Unified output of SecurityTrails API in one variable
1 parent 8f45809 commit 0c64940

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

datagather_modules/data_assembler.py

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ def data_gathering(self, short_domain, url, report_file_type, pagesearch_flag, k
161161
virustotal_output = api_virustotal_check(short_domain)
162162
api_scan_db.append('VirusTotal')
163163
if '2' in used_api_flag:
164-
st_alexa, st_apex, st_hostname, st_alivesds, st_txt, a_records_list, mx_records_list, ns_records_list, soa_records_list = api_securitytrails_check(short_domain)
164+
securitytrails_output = api_securitytrails_check(short_domain)
165165
api_scan_db.append('SecurityTrails')
166166
if '3' in used_api_flag:
167167
if username.lower() == 'n':
@@ -174,13 +174,13 @@ def data_gathering(self, short_domain, url, report_file_type, pagesearch_flag, k
174174
if '1' not in used_api_flag:
175175
virustotal_output = 'No results because user did not selected VirusTotal API scan'
176176
if '2' not in used_api_flag:
177-
st_alexa = st_apex = st_hostname = st_alivesds = st_txt = a_records_list = mx_records_list = ns_records_list = soa_records_list = 'No results because user did not selected SecurityTrails API scan'
177+
securitytrails_output = 'No results because user did not selected SecurityTrails API scan'
178178
if '3' not in used_api_flag:
179179
hudsonrock_output = 'No results because user did not selected HudsonRock API scan'
180180
print(Fore.LIGHTMAGENTA_EX + f"\n[EXTENDED SCAN END: API SCANNING]\n" + Style.RESET_ALL)
181181
else:
182182
virustotal_output = 'No results because user did not selected VirusTotal API scan'
183-
st_alexa = st_apex = st_hostname = st_alivesds = st_txt = a_records_list = mx_records_list = ns_records_list = soa_records_list = 'No results because user did not selected SecurityTrails API scan'
183+
securitytrails_output = 'No results because user did not selected SecurityTrails API scan'
184184
hudsonrock_output = 'No results because user did not selected HudsonRock API scan'
185185
api_scan_db.append('No')
186186
pass
@@ -205,8 +205,7 @@ def data_gathering(self, short_domain, url, report_file_type, pagesearch_flag, k
205205
hostnames, cpes, tags, vulns, common_socials, total_socials, ps_emails_return,
206206
accessible_subdomains, emails_amount, files_counter, cookies_counter, api_keys_counter,
207207
website_elements_counter, exposed_passwords_counter, total_links_counter, accessed_links_counter, cleaned_dorking,
208-
virustotal_output, vt_deturls, vt_detsamples, vt_undetsamples, st_alexa, st_apex, st_hostname, st_alivesds, st_txt, a_records_list, mx_records_list, ns_records_list, soa_records_list,
209-
hudsonrock_output]
208+
virustotal_output, securitytrails_output, hudsonrock_output]
210209

211210
elif report_file_type == 'html':
212211
if pagesearch_flag.lower() == 'y':
@@ -250,7 +249,7 @@ def data_gathering(self, short_domain, url, report_file_type, pagesearch_flag, k
250249
virustotal_output = api_virustotal_check(short_domain)
251250
api_scan_db.append('VirusTotal')
252251
if '2' in used_api_flag:
253-
st_alexa, st_apex, st_hostname, st_alivesds, st_txt, a_records_list, mx_records_list, ns_records_list, soa_records_list = api_securitytrails_check(short_domain)
252+
securitytrails_output = api_securitytrails_check(short_domain)
254253
api_scan_db.append('SecurityTrails')
255254
if '3' in used_api_flag:
256255
if username.lower() == 'n':
@@ -263,13 +262,13 @@ def data_gathering(self, short_domain, url, report_file_type, pagesearch_flag, k
263262
if '1' not in used_api_flag:
264263
virustotal_output = 'No results because user did not selected VirusTotal API scan'
265264
if '2' not in used_api_flag:
266-
st_alexa = st_apex = st_hostname = st_alivesds = st_txt = a_records_list = mx_records_list = ns_records_list = soa_records_list = 'No results because user did not selected SecurityTrails API scan'
265+
securitytrails_output = 'No results because user did not selected SecurityTrails API scan'
267266
if '3' not in used_api_flag:
268267
hudsonrock_output = 'No results because user did not selected HudsonRock API scan'
269268
print(Fore.LIGHTMAGENTA_EX + f"\n[EXTENDED SCAN END: API SCANNING]\n" + Style.RESET_ALL)
270269
else:
271270
virustotal_output = 'No results because user did not selected VirusTotal API scan'
272-
st_alexa = st_apex = st_hostname = st_alivesds = st_txt = a_records_list = mx_records_list = ns_records_list = soa_records_list = 'No results because user did not selected SecurityTrails API scan'
271+
securitytrails_output = 'No results because user did not selected SecurityTrails API scan'
273272
hudsonrock_output = 'No results because user did not selected HudsonRock API scan'
274273
api_scan_db.append('No')
275274
pass
@@ -292,8 +291,7 @@ def data_gathering(self, short_domain, url, report_file_type, pagesearch_flag, k
292291
hostnames, cpes, tags, vulns, common_socials, total_socials, ps_emails_return,
293292
accessible_subdomains, emails_amount, files_counter, cookies_counter, api_keys_counter,
294293
website_elements_counter, exposed_passwords_counter, total_links_counter, accessed_links_counter, keywords_messages_list, dorking_status, dorking_file_path,
295-
virustotal_output, st_alexa, st_apex, st_hostname, st_alivesds, st_txt, a_records_list, mx_records_list, ns_records_list, soa_records_list,
296-
hudsonrock_output]
294+
virustotal_output, securitytrails_output, hudsonrock_output]
297295

298296
report_info_array = [casename, db_casename, db_creation_date, report_folder, ctime, report_file_type, report_ctime, api_scan_db, used_api_flag]
299297
logging.info(f'### THIS LOG PART FOR {casename} CASE, TIME: {ctime} ENDS HERE')

0 commit comments

Comments
 (0)