MCPcopy
hub / github.com/Xyntax/POC-T / testConnect

Function testConnect

script/redis-sshkey-getshell.py:53–63  ·  view source on GitHub ↗
(ip, port=22)

Source from the content-addressed store, hash-verified

51
52
53def testConnect(ip, port=22):
54 try:
55 s = paramiko.SSHClient()
56 s.load_system_host_keys()
57 s.connect(ip, port, username='root', pkey=private_key, timeout=10)
58 s.close()
59 return True
60 except Exception, e:
61 if type(e) == SSHException:
62 return True
63 return False

Callers 1

pocFunction · 0.85

Calls 1

connectMethod · 0.45

Tested by

no test coverage detected