diff --git a/Python/modules/objects.py b/Python/modules/objects.py
index 3f8fca0..13df909 100644
--- a/Python/modules/objects.py
+++ b/Python/modules/objects.py
@@ -262,8 +262,14 @@ def create_table_html(self):
""")
elif self.error_state == 'Timeout':
- html += ("""
Hit timeout limit while attempting to
- screenshot | """)
+ html += ("Hit timeout limit")
+ if os.path.isfile(self.screenshot_path):
+ html += ("""
+ | """).format(src_path, scr_path)
+ else:
+ html += ("")
elif self.error_state == 'BadStatus':
html += ("""Unknown error while attempting to
screenshot | """)
diff --git a/Python/modules/selenium_module.py b/Python/modules/selenium_module.py
index 4327325..c9f3f2f 100644
--- a/Python/modules/selenium_module.py
+++ b/Python/modules/selenium_module.py
@@ -219,9 +219,9 @@ def capture_host(cli_parsed, http_object, driver, ua=None):
req.set_proxy(str(cli_parsed.proxy_ip) + ':' + str(cli_parsed.proxy_port), 'http')
req.set_proxy(str(cli_parsed.proxy_ip) + ':' + str(cli_parsed.proxy_port), 'https')
if context is None:
- opened = urllib.request.urlopen(req)
+ opened = urllib.request.urlopen(req, timeout=cli_parsed.timeout)
else:
- opened = urllib.request.urlopen(req, context=context)
+ opened = urllib.request.urlopen(req,timeout=cli_parsed.timeout, context=context)
headers = dict(opened.info())
headers['Response Code'] = str(opened.getcode())
except urllib.error.HTTPError as e:
@@ -266,6 +266,11 @@ def capture_host(cli_parsed, http_object, driver, ua=None):
headers = {'Error': 'Connection Reset'}
http_object.error_state = 'ConnReset'
return http_object, driver
+ elif 'timed out' in str(e):
+ headers = {'Error': 'Timed Out'}
+ http_object.error_state = 'Timeout'
+ print('[*] Socket Timeout when connecting to {0}'.format(http_object.remote_system))
+ return http_object, driver
else:
http_object.error_state = 'BadStatus'
return http_object, driver