code wiki / (root) / nx_ssh_probe.nx

nx_ssh_probe.nx

buildroot/runtime/nx_ssh_probe.nx

4496 B105 linesdepth 5pulls 5 transitivereach 0 importersview sourcekind probetopic ssh
docsdependenciesstructsconstsfunctions

about

nx_ssh_probe.nx -- sovereign SSH-2 reconnaissance (phase 0 of the bits-up SSH client). The SSH version-exchange line AND the server's first SSH_MSG_KEXINIT are sent in PLAINTEXT before any key exchange, so this connects raw-TCP to host:22, sends our version string, and parses the server's KEXINIT algorithm name-lists -- telling us EXACTLY which KEX / host-key / cipher / MAC to implement for interop. Grounds the full client build in verified facts, not assumptions. Bits-up: raw syscalls only, no openssh/libssh. Oracle externals are for comparison only, never on the path. license_tier: ORIGINAL

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_connect.nx nx_ssh_probe.nx

imports: nx_syscalls.nxnx_connect.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main sys_socket P sys_write sys_mmap ssh_sockaddr nx_connect_bounded nx_fcntl sys_connect sys_mmap ↻ sys_poll sys_write ↻ sys_read sys_close u32be print_namelist u32be ↻ P ↻ sys_write ↻

structs

none

consts

16const K_MAGIC_8192: i64 = 8192

functions

18func P(s: *u8, n: i64) -> i64 { sys_write(1, s, n); return 0 }
called by 2: print_namelistmain calls 1: sys_write
21func ssh_sockaddr(sa: *u8, ip: i64, port: i64) -> i64
called by 1: main
35func u32be(b: *u8, off: i64) -> i64
called by 2: print_namelistmain
40func print_namelist(label: *u8, llen: i64, b: *u8, off: i64) -> i64
called by 1: main calls 3: u32bePsys_write
50func main() -> i64