blacklanternsecurity / baddns

Check subdomains for subdomain takeovers and other DNS tomfoolery
GNU General Public License v3.0
96 stars 5 forks source link

handle anyio EndofStream #377

Closed liquidsec closed 1 year ago

liquidsec commented 1 year ago

2023-08-24 04:07:12,174 [TRACE] bbot.scanner scanner.py:782 Traceback (most recent call last): File "/root/bbot/bbot/scanner/scanner.py", line 730, in acatch yield File "/root/bbot/bbot/modules/base.py", line 363, in _worker await self.handle_event(event) File "/root/bbot/bbot/modules/baddns.py", line 21, in handle_event if await module_instance.dispatch(): File "/root/.cache/pypoetry/virtualenvs/bbot-aKeTQkGo-py3.10/lib/python3.10/site-packages/baddns/modules/cname.py", line 63, in dispatch await self.target_httpmanager.dispatchHttp() File "/root/.cache/pypoetry/virtualenvs/bbot-aKeTQkGo-py3.10/lib/python3.10/site-packages/baddns/lib/httpmanager.py", line 28, in dispatchHttp self.https_allowredirects_results = await self.http_client.get( File "/root/.cache/pypoetry/virtualenvs/bbot-aKeTQkGo-py3.10/lib/python3.10/site-packages/httpx/_client.py", line 1757, in get return await self.request( File "/root/bbot/bbot/core/helpers/web.py", line 66, in request return await super().request(*args, kwargs) File "/root/.cache/pypoetry/virtualenvs/bbot-aKeTQkGo-py3.10/lib/python3.10/site-packages/httpx/_client.py", line 1530, in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) File "/root/.cache/pypoetry/virtualenvs/bbot-aKeTQkGo-py3.10/lib/python3.10/site-packages/httpx/_client.py", line 1617, in send response = await self._send_handling_auth( File "/root/.cache/pypoetry/virtualenvs/bbot-aKeTQkGo-py3.10/lib/python3.10/site-packages/httpx/_client.py", line 1645, in _send_handling_auth response = await self._send_handling_redirects( File "/root/.cache/pypoetry/virtualenvs/bbot-aKeTQkGo-py3.10/lib/python3.10/site-packages/httpx/_client.py", line 1682, in _send_handling_redirects response = await self._send_single_request(request) File "/root/.cache/pypoetry/virtualenvs/bbot-aKeTQkGo-py3.10/lib/python3.10/site-packages/httpx/_client.py", line 1719, in _send_single_request response = await transport.handle_async_request(request) File "/root/.cache/pypoetry/virtualenvs/bbot-aKeTQkGo-py3.10/lib/python3.10/site-packages/httpx/_transports/default.py", line 353, in handle_async_request resp = await self._pool.handle_async_request(req) File "/root/.cache/pypoetry/virtualenvs/bbot-aKeTQkGo-py3.10/lib/python3.10/site-packages/httpcore/_async/connection_pool.py", line 262, in handle_async_request raise exc File "/root/.cache/pypoetry/virtualenvs/bbot-aKeTQkGo-py3.10/lib/python3.10/site-packages/httpcore/_async/connection_pool.py", line 245, in handle_async_request response = await connection.handle_async_request(request) File "/root/.cache/pypoetry/virtualenvs/bbot-aKeTQkGo-py3.10/lib/python3.10/site-packages/httpcore/_async/connection.py", line 92, in handle_async_request raise exc File "/root/.cache/pypoetry/virtualenvs/bbot-aKeTQkGo-py3.10/lib/python3.10/site-packages/httpcore/_async/connection.py", line 69, in handle_async_request stream = await self._connect(request) File "/root/.cache/pypoetry/virtualenvs/bbot-aKeTQkGo-py3.10/lib/python3.10/site-packages/httpcore/_async/connection.py", line 149, in _connect stream = await stream.start_tls(kwargs) File "/root/.cache/pypoetry/virtualenvs/bbot-aKeTQkGo-py3.10/lib/python3.10/site-packages/httpcore/_backends/anyio.py", line 78, in start_tls raise exc File "/root/.cache/pypoetry/virtualenvs/bbot-aKeTQkGo-py3.10/lib/python3.10/site-packages/httpcore/_backends/anyio.py", line 69, in start_tls ssl_stream = await anyio.streams.tls.TLSStream.wrap( File "/root/.cache/pypoetry/virtualenvs/bbot-aKeTQkGo-py3.10/lib/python3.10/site-packages/anyio/streams/tls.py", line 125, in wrap await wrapper._call_sslobject_method(ssl_object.do_handshake) File "/root/.cache/pypoetry/virtualenvs/bbot-aKeTQkGo-py3.10/lib/python3.10/site-packages/anyio/streams/tls.py", line 165, in _call_sslobject_method raise EndOfStream from None anyio.EndOfStream

liquidsec commented 1 year ago

Closing for now. This issue is related to the bbot http module, and should not be passing unhandled errors. If we see the error again, it will be raised as a bbot issue instead.