Skip to content

Commit 8b055fd

Browse files
Updated report_creation.py to 0.6b
1 parent 7970784 commit 8b055fd

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

report_creation.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
url: http://short_domain/
99
"""
1010

11-
import requests.exceptions
1211
import crawl_processor as cp
1312

1413
try:
@@ -23,7 +22,6 @@
2322
except ImportError:
2423
print(Fore.RED + "Can't import some requirements that are necessary to start DPULSE. Please check that all necessary requirements are installed!" + Style.RESET_ALL)
2524
sys.exit()
26-
2725
def insert_pdf(file):
2826
with open(file, 'rb') as pdf_file:
2927
blob_data = pdf_file.read()
@@ -47,7 +45,7 @@ def insert_blob(pdf_blob, db_casename, creation_date, case_comment):
4745
finally:
4846
if sqlite_connection:
4947
sqlite_connection.close()
50-
print(Fore.RED + "Database connection is closed")
48+
print(Fore.GREEN + "Database connection is successfully closed")
5149

5250
def find_files(filename):
5351
"""
@@ -125,11 +123,10 @@ def create_report(short_domain, url, n, case_comment):
125123
subdomain_mails, sd_socials, subdomain_ip = cp.domains_reverse_research(subdomains)
126124
if n > 0:
127125
print(Fore.GREEN + 'Processing Google Dorking' + Style.RESET_ALL)
126+
exp_docs, linkedin, databases, related_pages = cp.dorking_processing(short_domain, num_results=n, lang="en", sleep_interval=sleep_interval, timeout=timeout)
128127
elif n == 0:
129128
print(Fore.RED + 'DPULSE will skip Google Dorking because user set the amount of results as 0' + Style.RESET_ALL)
130-
131-
exp_docs, linkedin, related_pages = cp.dorking_processing(short_domain, num_results=n, lang="en", sleep_interval=sleep_interval, timeout=timeout)
132-
except (requests.exceptions.ConnectionError, requests.exceptions.ConnectTimeout):
129+
except:
133130
print(Fore.RED + 'Resource is invalid or unreachable. Closing scan...')
134131

135132
ctime = datetime.now().strftime('%Y-%m-%d, %Hh%Mm%Ss')
@@ -153,7 +150,7 @@ def create_report(short_domain, url, n, case_comment):
153150
'li_links': ', '.join(social_medias['LinkedIn']), 'vk_links': ', '.join(social_medias['VKontakte']),
154151
'yt_links': ', '.join(social_medias['YouTube']), 'wc_links': ', '.join(social_medias['WeChat']), 'ok_links': ', '.join(social_medias['Odnoklassniki']),
155152
'exp_docs': exp_docs, 'linkedin': linkedin, 'related_pages': related_pages,
156-
'ctime': ctime, 'a_tsf': subdomains_amount, 'a_gdr': n}
153+
'ctime': ctime, 'a_tsf': subdomains_amount, 'a_gdr': n, 'exp_db': databases}
157154

158155
print(Fore.GREEN + 'Processing report for {} case...'.format(short_domain) + Style.RESET_ALL)
159156

0 commit comments

Comments
 (0)