mirror of
https://github.com/jtesta/ssh-audit.git
synced 2026-06-24 13:29:42 +02:00
Expanded SOCKS5 protocol support, refactored exception handling, updated documentation, added more tests. (#347)
This commit is contained in:
@@ -166,17 +166,18 @@ class TestAuditConf:
|
||||
with pytest.raises(SystemExit):
|
||||
conf = c('-l something localhost')
|
||||
|
||||
def test_audit_conf_process_commandline_socks_proxy(self):
|
||||
def test_audit_conf_process_commandline_socks5_proxy(self):
|
||||
c = lambda x: self.process_commandline(self.OutputBuffer, x.split()) # noqa
|
||||
|
||||
conf = c('--socks 127.0.0.1:1080 localhost')
|
||||
assert conf.socks_proxy == '127.0.0.1:1080'
|
||||
assert c('--socks5 127.0.0.1:1080 localhost').socks5_proxy == '127.0.0.1:1080'
|
||||
assert c('--socks5 [fe80::aaaa:bbbb:cccc:dddd]:1080 localhost').socks5_proxy == '[fe80::aaaa:bbbb:cccc:dddd]:1080'
|
||||
assert c('--socks5 somehost.lol:1080 localhost').socks5_proxy == 'somehost.lol:1080'
|
||||
|
||||
with pytest.raises(SystemExit):
|
||||
c('--socks localhost localhost')
|
||||
c('--socks5 localhost localhost')
|
||||
|
||||
with pytest.raises(SystemExit):
|
||||
c('--socks localhost:0 localhost')
|
||||
c('--socks5 localhost:0 localhost')
|
||||
|
||||
with pytest.raises(SystemExit):
|
||||
c('--socks localhost:65536 localhost')
|
||||
c('--socks5 localhost:65536 localhost')
|
||||
|
||||
Reference in New Issue
Block a user