sshmitm.workarounds.monkeypatch module
- sshmitm.workarounds.monkeypatch.do_init(wrapped, instance, *args, **kwargs)
- Parameters:
wrapped (
Any)instance (
Any)args (
Any)kwargs (
Any)
- Return type:
Any
- sshmitm.workarounds.monkeypatch.do_run(wrapped, instance, *args, **kwargs)
- Parameters:
wrapped (
Any)instance (
Any)args (
Any)kwargs (
Any)
- Return type:
Any
- sshmitm.workarounds.monkeypatch.patch_channel()
Patch channel request dispatch to support signal forwarding (RFC 4254 §6.9).
Paramiko’s server-side channel handler has no “signal” branch, so signal requests from clients are silently dropped. This patch intercepts “signal” requests and dispatches them to server.check_channel_signal_request(). All other request types are forwarded to the original handler unchanged.
Implementation note: wrapt patching of Channel._handle_request is not sufficient because Transport._channel_handler_table stores a direct reference to the original function captured at class-definition time. The transport dispatch loop calls that table entry directly, bypassing any class-attribute patch. We must update the table entry itself.
- Return type:
None
- sshmitm.workarounds.monkeypatch.patch_thread()
- Return type:
None