(
client_greeting: bytes,
server_choice: bytes,
client_auth: bytes,
err: bytes,
msg: str,
tctx: Context,
)
| 541 | ], |
| 542 | ) |
| 543 | def test_socks5_auth_fail( |
| 544 | client_greeting: bytes, |
| 545 | server_choice: bytes, |
| 546 | client_auth: bytes, |
| 547 | err: bytes, |
| 548 | msg: str, |
| 549 | tctx: Context, |
| 550 | ): |
| 551 | ProxyAuth().load(tctx.options) |
| 552 | tctx.options.proxyauth = "user:password" |
| 553 | playbook = Playbook(modes.Socks5Proxy(tctx), logs=True) >> DataReceived( |
| 554 | tctx.client, client_greeting |
| 555 | ) |
| 556 | if server_choice is None: |
| 557 | playbook << SendData(tctx.client, err) |
| 558 | else: |
| 559 | playbook << SendData(tctx.client, server_choice) |
| 560 | playbook >> DataReceived(tctx.client, client_auth) |
| 561 | playbook << modes.Socks5AuthHook(Placeholder(modes.Socks5AuthData)) |
| 562 | playbook >> reply() |
| 563 | playbook << SendData(tctx.client, err) |
| 564 | |
| 565 | playbook << CloseConnection(tctx.client) |
| 566 | playbook << Log(msg) |
| 567 | assert playbook |
| 568 | |
| 569 | |
| 570 | def test_socks5_eager_err(tctx: Context): |
nothing calls this directly
no test coverage detected
searching dependent graphs…