(tctx: Context)
| 415 | |
| 416 | |
| 417 | def test_socks5_trickle(tctx: Context): |
| 418 | ProxyAuth().load(tctx.options) |
| 419 | tctx.options.proxyauth = "user:password" |
| 420 | tctx.options.connection_strategy = "lazy" |
| 421 | playbook = Playbook(modes.Socks5Proxy(tctx)) |
| 422 | for x in b"\x05\x01\x02": |
| 423 | playbook >> DataReceived(tctx.client, bytes([x])) |
| 424 | playbook << SendData(tctx.client, b"\x05\x02") |
| 425 | for x in b"\x01\x04user\x08password": |
| 426 | playbook >> DataReceived(tctx.client, bytes([x])) |
| 427 | playbook << modes.Socks5AuthHook(Placeholder()) |
| 428 | playbook >> reply(side_effect=_valid_socks_auth) |
| 429 | playbook << SendData(tctx.client, b"\x01\x00") |
| 430 | for x in b"\x05\x01\x00\x01\x7f\x00\x00\x01\x12\x34": |
| 431 | playbook >> DataReceived(tctx.client, bytes([x])) |
| 432 | assert playbook << SendData( |
| 433 | tctx.client, b"\x05\x00\x00\x01\x00\x00\x00\x00\x00\x00" |
| 434 | ) |
| 435 | |
| 436 | |
| 437 | @pytest.mark.parametrize( |
nothing calls this directly
no test coverage detected
searching dependent graphs…