Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the issue of the empty HTTP Header key #51

Open
namnamir opened this issue Nov 25, 2023 · 0 comments
Open

Fix the issue of the empty HTTP Header key #51

namnamir opened this issue Nov 25, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@namnamir
Copy link
Owner

In both of these conditions, the http_header is empty:

 [+]──┬── http://xxxxxxxxxxxxxxxx  (8/342 - 2%)  [2023-11-19 10:18:56]
      │
      ├─── General Info 
      │        └□ General Site Status function is calling
      │        ├─1─■ Could not parse the HTML page.
      │        ├─2─■ HTTP Status Code: 403
      │        ├─3─■ History: []
      │        ├─4─■ HTTP Headers: {'Date': 'Sun, 19 Nov 2023 09:19:00 GMT', 'Server': 'Apache', 'X-Content-Type-Options': 'nosniff', 'X-Frame-Options': 'sameorigin', 'X-XSS-Protection': '1; mode=block', 'Referrer-Policy': 'same-origin', 'Content-Length': '199', 'Keep-Alive': 'timeout=5, max=100', 'Connection': 'Keep-Alive', 'Content-Type': 'text/html; charset=iso-8859-1'}
      │        ├─5─■ Request Result: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>403 Forbidden</title>
</head><body>
<h1>Forbidden</h1>
<p>You don't have permission to access this resource.</p>
</body></html>

OR

 [+]──┬── http://xxxxxxxxxxxxxxxx   (128/342 - 37%)  [2023-11-19 10:18:56]
      │
      ├─── General Info 
      │        └□ General Site Status function is calling
      │        ├─1─■ Error in establishing the connection to the General Site Status function URL.
      │        ├─3─■ Status Code: 0  -  API call URL: http://xxxxxxxxxxxxxxxx
      │        ├─5─■ Exception Message: <class 'requests.exceptions.ConnectTimeout'> ➜ url_opener.py:57 ==   File "\url_opener.py", line 57, in url_opener
    request = requests.get(
  File "\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\requests\api.py", line 73, in get
    return request("get", url, params=params, **kwargs)
  File "\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\requests\api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
  File "\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\requests\sessions.py", line 587, in request
    resp = self.send(prep, **send_kwargs)
  File "\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\requests\sessions.py", line 701, in send
    r = adapter.send(request, **kwargs)
  File "\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\requests\adapters.py", line 553, in send
    raise ConnectTimeout(e, request=request)
 ⚊ HTTPConnectionPool(host='www.hendrik-ido-ambacht.nl', port=80): Max retries exceeded with url: / (Caused by ConnectTimeoutError(<urllib3.connection.HTTPConnection object at 0x000001AE9CB38550>, 'Connection toxxxxxxxxxxxxxxxx timed out. (connect timeout=11)'))

Output:

{'city': 'xxxxxxxxxxxxxxxx',
  'state': '',
  'country': 'NL',
  'scan_date': '2023-11-19 10:18:56',
  'urn': 'http://xxxxxxxxxxxxxxxx',
  'hostname': None,
  'http': {
    'meta': {},
    'http_headers': [
      {'name': 'NON_EXITSTING_CSP', 'value': ''}
    ],
     'redirects': [],
     'analytics': {},
     'csp_nonces': [],
     'csp_hashes': []
  },
  'elapsed_time': '0:00:11.110998'
},
@namnamir namnamir added the bug Something isn't working label Nov 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant