Skip to content

Fix OSError in ProxyListener.py - #221

Open
TakahiroHaruyama wants to merge 1 commit into
mandiant:masterfrom
TakahiroHaruyama:fix_os_error_ProxyListener
Open

Fix OSError in ProxyListener.py#221
TakahiroHaruyama wants to merge 1 commit into
mandiant:masterfrom
TakahiroHaruyama:fix_os_error_ProxyListener

Conversation

@TakahiroHaruyama

Copy link
Copy Markdown

I enabled the Static_CA setting and set HTTPListener443’s Hidden option to True to test TLS MitM (dynamically generating certificates based on the destination), but I encountered the following error.

Exception occurred during processing of request from ('172.30.0.129', 38278)
Traceback (most recent call last):
  File "/usr/lib/python3.12/socketserver.py", line 692, in process_request_thread
    self.finish_request(request, client_address)
  File "/usr/lib/python3.12/socketserver.py", line 362, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/usr/lib/python3.12/socketserver.py", line 761, in __init__
    self.handle()
  File "/opt/venv/lib/python3.12/site-packages/fakenet/listeners/ProxyListener.py", line 245, in handle
    remote_sock.setblocking(0)
OSError: [Errno 9] Bad file descriptor

So I fixed the code.
Reference: https://migawari-iv.hatenablog.com/entry/2024/05/06/223200 (in Japanese)

@tinajohnson
tinajohnson self-requested a review January 22, 2026 20:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant