Skip to content

Commit edd185b

Browse files
Updated crawl_processor.py to 0.9rc1
1 parent ac3144b commit edd185b

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

modules/crawl_processor.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
from bs4 import BeautifulSoup
2222
import sys
2323
import random
24-
except ImportError:
25-
print(Fore.RED + "[Error #001 - Import error] Can't import some requirements that are necessary to start DPULSE. Please check that all necessary requirements are installed!" + Style.RESET_ALL)
24+
except ImportError as e:
25+
print(Fore.RED + "Import error appeared. Reason: {}".format(e) + Style.RESET_ALL)
2626
sys.exit()
2727

2828
def ip_gather(short_domain):
@@ -118,17 +118,17 @@ def domains_reverse_research(subdomains):
118118
for subdomain in subdomains:
119119
subdomain_url = "http://" + subdomain + "/"
120120
subdomain_urls.append(subdomain_url)
121-
except (socket.gaierror, requests.exceptions.SSLError, requests.exceptions.ConnectionError):
122-
print(Fore.RED + 'Some URL seems unreachable! DPULSE will continue to work, but the URL causing the error will not be included in the report' + Style.RESET_ALL)
121+
except (socket.gaierror, requests.exceptions.SSLError, requests.exceptions.ConnectionError) as e:
122+
print(Fore.RED + 'Some URL seems unreachable! DPULSE will continue to work, but the URL causing the error will not be included in the report. Reason: {}'.format(e) + Style.RESET_ALL)
123123
pass
124124

125125
try:
126126
for subdomain in subdomains:
127127
subdomains_ip = ip_gather(subdomain)
128128
subdomain_ip.append(subdomains_ip)
129129
subdomain_ip = list(set(subdomain_ip))
130-
except (socket.gaierror, requests.exceptions.SSLError, requests.exceptions.ConnectionError):
131-
print(Fore.RED + 'Some URL seems unreachable! DPULSE will continue to work, but the URL causing the error will not be included in the report' + Style.RESET_ALL)
130+
except (socket.gaierror, requests.exceptions.SSLError, requests.exceptions.ConnectionError) as e:
131+
print(Fore.RED + 'Some URL seems unreachable! DPULSE will continue to work, but the URL causing the error will not be included in the report. Reason: {}'.format(e) + Style.RESET_ALL)
132132
pass
133133

134134
try:
@@ -137,8 +137,8 @@ def domains_reverse_research(subdomains):
137137
subdomain_mails.append(subdomain_mail)
138138
subdomain_social = sm_gather(subdomain_url)
139139
subdomain_socials.append(subdomain_social)
140-
except (socket.gaierror, requests.exceptions.SSLError, requests.exceptions.ConnectionError):
141-
print(Fore.RED + 'Some URL seems unreachable! DPULSE will continue to work, but the URL causing the error will not be included in the report' + Style.RESET_ALL)
140+
except (socket.gaierror, requests.exceptions.SSLError, requests.exceptions.ConnectionError) as e:
141+
print(Fore.RED + 'Some URL seems unreachable! DPULSE will continue to work, but the URL causing the error will not be included in the report. Reason: {}'.format(e) + Style.RESET_ALL)
142142
pass
143143

144144
subdomain_ip = ' // '.join(subdomain_ip)

0 commit comments

Comments
 (0)