XSStrike
XSStrike copied to clipboard
requests.exceptions.ConnectTimeout Error
Hi.
I can sometimes see the following error.
I can access the site through a browser.
This site is fast enough.
Increasing the "timeout" option does not resolve this issue.
Thanks.
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 141, in _new_conn
(self.host, self.port), self.timeout, **extra_kw)
File "/usr/lib/python3/dist-packages/urllib3/util/connection.py", line 83, in create_connection
raise err
File "/usr/lib/python3/dist-packages/urllib3/util/connection.py", line 73, in create_connection
sock.connect(sa)
socket.timeout: timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 601, in urlopen
chunked=chunked)
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 357, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/usr/lib/python3.6/http/client.py", line 1239, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/lib/python3.6/http/client.py", line 1285, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/usr/lib/python3.6/http/client.py", line 1234, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/usr/lib/python3.6/http/client.py", line 1026, in _send_output
self.send(msg)
File "/usr/lib/python3.6/http/client.py", line 964, in send
self.connect()
File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 166, in connect
conn = self._new_conn()
File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 146, in _new_conn
(self.host, self.timeout))
urllib3.exceptions.ConnectTimeoutError: (<urllib3.connection.HTTPConnection object at 0x7f9a07985518>, 'Connection to www. example.com timed out. (connect timeout=10)')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/requests/adapters.py", line 440, in send
timeout=timeout
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 639, in urlopen
_stacktrace=sys.exc_info()[2])
File "/usr/lib/python3/dist-packages/urllib3/util/retry.py", line 388, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='www. example.com', port=80): Max retries exceeded with url: / (Caused by ConnectTimeoutError(<urllib3.connection.HTTPConnection object at 0x7f9a07985518>, 'Connection to www. example.com timed out. (connect timeout=10)'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "xsstrike.py", line 167, in <module>
scan(target, paramData, encoding, headers, delay, timeout, skipDOM, find, skip)
File "/root/XSStrike/modes/scan.py", line 34, in scan
response = requester(target, {}, headers, GET, delay, timeout).text
File "/root/XSStrike/core/requester.py", line 39, in requester
timeout=timeout, verify=False, proxies=core.config.proxies)
File "/usr/lib/python3/dist-packages/requests/api.py", line 72, in get
return request('get', url, params=params, **kwargs)
File "/usr/lib/python3/dist-packages/requests/api.py", line 58, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/lib/python3/dist-packages/requests/sessions.py", line 508, in request
resp = self.send(prep, **send_kwargs)
File "/usr/lib/python3/dist-packages/requests/sessions.py", line 618, in send
r = adapter.send(request, **kwargs)
File "/usr/lib/python3/dist-packages/requests/adapters.py", line 496, in send
raise ConnectTimeout(e, request=request)
requests.exceptions.ConnectTimeout: HTTPConnectionPool(host='www. example.com', port=80): Max retries exceeded with url: / (Caused by ConnectTimeoutError(<urllib3.connection.HTTPConnection object at 0x7f9a07985518>, 'Connection to www. example.com timed out. (connect timeout=10)'))
Hi there,
Sorry for such a late response, I was busy with my exams. Would it be possible for you to provide the website so I can reproduce the issue and see what's going on?
Thank you.
I'm facing a similar issue with one of my target websites. I am using the latest version of XSStrike and had issued the following command python3 xsstrike.py -u "http://target.website.com" I even tried increasing the timeout but it did not help and the website runs smoothly on a web browser. I have DMed you the target website on Twitter.
python3 -m pip install --upgrade urllib3
Run this command, this will solve the issue
can confirm. I am getting this error pretty regularly. i run "python3 -m pip install --upgrade urllib3" but it does not help.
Here is an example: python3 xsstrike.py -u "https://liki24.com/uk/search/?q=%D0%90%D1%80%D0%BE%D0%BC%D0%B0%D1%82%D0%B8%D0%BA%D0%B0"
Traceback (most recent call last): File "/usr/local/lib/python3.7/dist-packages/urllib3/connection.py", line 160, in _new_conn (self._dns_host, self.port), self.timeout, **extra_kw File "/usr/local/lib/python3.7/dist-packages/urllib3/util/connection.py", line 61, in create_connection for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): File "/usr/lib/python3.7/socket.py", line 752, in getaddrinfo for res in _socket.getaddrinfo(host, port, family, type, proto, flags): socket.gaierror: [Errno -2] Name or service not known
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/usr/local/lib/python3.7/dist-packages/urllib3/connectionpool.py", line 677, in urlopen chunked=chunked, File "/usr/local/lib/python3.7/dist-packages/urllib3/connectionpool.py", line 381, in _make_request self._validate_conn(conn) File "/usr/local/lib/python3.7/dist-packages/urllib3/connectionpool.py", line 976, in _validate_conn conn.connect() File "/usr/local/lib/python3.7/dist-packages/urllib3/connection.py", line 308, in connect conn = self._new_conn() File "/usr/local/lib/python3.7/dist-packages/urllib3/connection.py", line 172, in _new_conn self, "Failed to establish a new connection: %s" % e urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x7fd86d6550d0>: Failed to establish a new connection: [Errno -2] Name or service not known
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/usr/local/lib/python3.7/dist-packages/requests/adapters.py", line 449, in send timeout=timeout File "/usr/local/lib/python3.7/dist-packages/urllib3/connectionpool.py", line 725, in urlopen method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2] File "/usr/local/lib/python3.7/dist-packages/urllib3/util/retry.py", line 439, in increment raise MaxRetryError(_pool, url, error or ResponseError(cause)) urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='liki24.com', port=443): Max retries exceeded with url: /uk/search/?q=st4r7s</TItle=>=<deTaIlSOnpointeReNTeR=confirm()//3nd (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fd86d6550d0>: Failed to establish a new connection: [Errno -2] Name or service not known'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "xsstrike.py", line 174, in
In the /requests/adapter.py
file set timeout = None
in line 450.
worked for me.
reset environment variables and then again bootstrap
trying to install presidio through this link https://microsoft.github.io/presidio/getting_started/ while executing this step python -m spacy download en_core_web_lg I am getting the following error. I have a Windows 10 machine , have installed python, pip 23.0.1. And I am new to Python though.
============================ Please find the Error Message below :
python -m spacy download en_core_web_lg Traceback (most recent call last): File "E:\Python\Python310\lib\site-packages\urllib3\connection.py", line 174, in _new_conn conn = connection.create_connection( File "E:\Python\Python310\lib\site-packages\urllib3\util\connection.py", line 95, in create_connection raise err File "E:\Python\Python310\lib\site-packages\urllib3\util\connection.py", line 85, in create_connection sock.connect(sa) TimeoutError: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "E:\Python\Python310\lib\site-packages\urllib3\connectionpool.py", line 703, in urlopen httplib_response = self._make_request( File "E:\Python\Python310\lib\site-packages\urllib3\connectionpool.py", line 386, in _make_request self._validate_conn(conn) File "E:\Python\Python310\lib\site-packages\urllib3\connectionpool.py", line 1042, in _validate_conn conn.connect() File "E:\Python\Python310\lib\site-packages\urllib3\connection.py", line 358, in connect self.sock = conn = self._new_conn() File "E:\Python\Python310\lib\site-packages\urllib3\connection.py", line 179, in _new_conn raise ConnectTimeoutError( urllib3.exceptions.ConnectTimeoutError: (<urllib3.connection.HTTPSConnection object at 0x0000026387DB0160>, 'Connection to raw.githubusercontent.com timed out. (connect timeout=None)')
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "E:\Python\Python310\lib\site-packages\requests\adapters.py", line 489, in send resp = conn.urlopen( File "E:\Python\Python310\lib\site-packages\urllib3\connectionpool.py", line 787, in urlopen retries = retries.increment( File "E:\Python\Python310\lib\site-packages\urllib3\util\retry.py", line 592, in increment raise MaxRetryError(_pool, url, error or ResponseError(cause)) urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='raw.githubusercontent.com', port=443): Max retries exceeded with url: /explosion/spacy-models/master/compatibility.json (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x0000026387DB0160>, 'Connection to raw.githubusercontent.com timed out. (connect timeout=None)'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "E:\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "E:\Python\Python310\lib\runpy.py", line 86, in run_code
exec(code, run_globals)
File "E:\Python\Python310\lib\site-packages\spacy_main.py", line 4, in
==================EOF=======================
Kindly let me know the fix, Thank you.