w-digital-scanner / w13scan

Passive Security Scanner (被动式安全扫描器)
GNU General Public License v2.0
1.89k stars 359 forks source link

Unhandled exception (#99914635) #42

Closed sqlmapreporter closed 5 years ago

sqlmapreporter commented 5 years ago
W13scan plugin traceback:
Running version: 0.9.10
Python version: 3.7.0
Operating system: Darwin-17.5.0-x86_64-i386-64bit
Threads: 51

request raw:
GET /socket.io/?token=2neAiuYvAU5cbMXpmsXD5OJlewXCKryg8dSpDCgag8ZwbZpn3uIHi0A1AOtpCibAwoXOiOG0Q0EbVvV2-RmJlZlfk8UDDLr3ciVQDIpjdsDpzXIW4N48I6qRyqznCVt1whuoNZhpWWEvf2GkomuuY5SIJbriLwX8.kJCJKG3RCVTLsAd5fjQ7cA%3D%3D&format=json&acceptUserMessage=true&connectId=connect_welcome&EIO=3&transport=websocket HTTP/1.1
host: push-socketio.kcs.top
connection: Upgrade
pragma: no-cache
cache-control: no-cache
upgrade: websocket
origin: https://www.kcs.top
sec-websocket-version: 13
user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36
accept-encoding: gzip, deflate, 
accept-language: zh-CN,zh;q=0.9,en;q=0.8,zh-TW;q=0.7
cookie: *
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/urllib3/response.py", line 639, in _update_chunk_length
    self.chunk_left = int(line, 16)
ValueError: invalid literal for int() with base 16: b''

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/urllib3/response.py", line 397, in _error_catcher
    yield
  File "/usr/local/lib/python3.7/site-packages/urllib3/response.py", line 704, in read_chunked
    self._update_chunk_length()
  File "/usr/local/lib/python3.7/site-packages/urllib3/response.py", line 643, in _update_chunk_length
    raise httplib.IncompleteRead(line)
http.client.IncompleteRead: IncompleteRead(0 bytes read)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/requests/models.py", line 750, in generate
    for chunk in self.raw.stream(chunk_size, decode_content=True):
  File "/usr/local/lib/python3.7/site-packages/urllib3/response.py", line 527, in stream
    for line in self.read_chunked(amt, decode_content=decode_content):
  File "/usr/local/lib/python3.7/site-packages/urllib3/response.py", line 732, in read_chunked
    self._original_response.close()
  File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/contextlib.py", line 130, in __exit__
    self.gen.throw(type, value, traceback)
  File "/usr/local/lib/python3.7/site-packages/urllib3/response.py", line 415, in _error_catcher
    raise ProtocolError('Connection broken: %r' % e, e)
urllib3.exceptions.ProtocolError: ('Connection broken: IncompleteRead(0 bytes read)', IncompleteRead(0 bytes read))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/W13SCAN/lib/plugins.py", line 51, in execute
    output = self.audit()
  File "/usr/local/lib/python3.7/site-packages/W13SCAN/plugins/PerFile/crlf.py", line 63, in audit
    r = requests.get(url, headers=headers, params=data)
  File "/usr/local/lib/python3.7/site-packages/requests/api.py", line 75, in get
    return request('get', url, params=params, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/requests/api.py", line 60, in request
    return session.request(method=method, url=url, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/W13SCAN/thirdpart/requests/__init__.py", line 77, in session_request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 686, in send
    r.content
  File "/usr/local/lib/python3.7/site-packages/requests/models.py", line 828, in content
    self._content = b''.join(self.iter_content(CONTENT_CHUNK_SIZE)) or b''
  File "/usr/local/lib/python3.7/site-packages/requests/models.py", line 753, in generate
    raise ChunkedEncodingError(e)
requests.exceptions.ChunkedEncodingError: ('Connection broken: IncompleteRead(0 bytes read)', IncompleteRead(0 bytes read))
boy-hack commented 5 years ago

fix in https://github.com/boy-hack/w13scan/commit/2f941effd01aaa9c574c61e6ecac915f588187c1