(self, output_spy, virtual_socket)
| 142 | assert len(lines) == 13 |
| 143 | |
| 144 | def test_ssh1_server_invalid_first_packet(self, output_spy, virtual_socket): |
| 145 | vsocket = virtual_socket |
| 146 | w = self.wbuf() |
| 147 | w.write_byte(self.protocol.SMSG_PUBLIC_KEY + 1) |
| 148 | w.write(self._pkm_payload()) |
| 149 | vsocket.rdata.append(b'SSH-1.5-OpenSSH_7.2 ssh-audit-test\r\n') |
| 150 | vsocket.rdata.append(self._create_ssh1_packet(w.write_flush())) |
| 151 | output_spy.begin() |
| 152 | out = self.OutputBuffer() |
| 153 | ret = self.audit(out, self._conf()) |
| 154 | out.write() |
| 155 | assert ret != 0 |
| 156 | lines = output_spy.flush() |
| 157 | assert len(lines) == 6 |
| 158 | assert 'unknown message' in lines[-1] |
| 159 | |
| 160 | def test_ssh1_server_invalid_checksum(self, output_spy, virtual_socket): |
| 161 | vsocket = virtual_socket |
nothing calls this directly
no test coverage detected