MCPcopy
hub / github.com/jtesta/ssh-audit / test_ssh1_server_simple

Method test_ssh1_server_simple

test/test_ssh1.py:130–142  ·  view source on GitHub ↗
(self, output_spy, virtual_socket)

Source from the content-addressed store, hash-verified

128 assert pkm1.payload == pkm2.payload
129
130 def test_ssh1_server_simple(self, output_spy, virtual_socket):
131 vsocket = virtual_socket
132 w = self.wbuf()
133 w.write_byte(self.protocol.SMSG_PUBLIC_KEY)
134 w.write(self._pkm_payload())
135 vsocket.rdata.append(b'SSH-1.5-OpenSSH_7.2 ssh-audit-test\r\n')
136 vsocket.rdata.append(self._create_ssh1_packet(w.write_flush()))
137 output_spy.begin()
138 out = self.OutputBuffer()
139 self.audit(out, self._conf())
140 out.write()
141 lines = output_spy.flush()
142 assert len(lines) == 13
143
144 def test_ssh1_server_invalid_first_packet(self, output_spy, virtual_socket):
145 vsocket = virtual_socket

Callers

nothing calls this directly

Calls 9

_pkm_payloadMethod · 0.95
_create_ssh1_packetMethod · 0.95
_confMethod · 0.95
writeMethod · 0.95
write_byteMethod · 0.80
write_flushMethod · 0.80
beginMethod · 0.80
flushMethod · 0.80
writeMethod · 0.45

Tested by

no test coverage detected