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

Method send_packet

src/ssh_audit/ssh_socket.py:308–316  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

306 return -1, e
307
308 def send_packet(self) -> Tuple[int, Optional[str]]:
309 payload = self.write_flush()
310 padding = -(len(payload) + 5) % 8
311 if padding < 4:
312 padding += 8
313 plen = len(payload) + padding + 1
314 pad_bytes = b'\x00' * padding
315 data = struct.pack('>Ib', plen, padding) + payload + pad_bytes
316 return self.send(data)
317
318 def is_connected(self) -> bool:
319 """Returns true if this Socket is connected, False otherwise."""

Callers 8

send_kexinitMethod · 0.95
send_initMethod · 0.80
send_initMethod · 0.80
send_initMethod · 0.80
send_initMethod · 0.80
send_initMethod · 0.80
send_init_gexMethod · 0.80

Calls 2

sendMethod · 0.95
write_flushMethod · 0.80

Tested by 1