code wiki / _hdl_build / nx_aw_push.nx
nx_aw_push.nx
buildroot/runtime/_hdl_build/nx_aw_push.nx
about
nx_aw_push.nx -- SOVEREIGN file push to the NAS (vault-backed, no /tmp staging, no shells). Gets the NAS
password from the vault (nx_machine_key + nx_vault.elf), SSHes to 192.168.8.227 as elderwesto, and STREAMS
a local file into a remote write-command via chunked SSH channel data (ssh_put_file from nx_ssh_putpage).
payload = local file path read from /mnt/c/.../awpush.src (one line)
dst-cmd = remote command read from /mnt/c/.../awpush.dst (e.g. "mkdir -p d; cat > d/f; chmod +x d/f")
license_tier: ORIGINAL (vault spine from nx_aw_nasfix, stream spine from nx_ssh_putpage)
dependencies 2 imports · 0 importers
imports: nx_syscalls.nxnx_ssh_lib.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 9 | const P_MAGIC_1000000: i64 = 1000000 |
| 10 | const P_MAGIC_65536: i64 = 65536 |
| 11 | const P_MAGIC_1048576: i64 = 1048576 |
| 12 | const P_MAGIC_16384: i64 = 16384 |
| 13 | const P_MAGIC_1024: i64 = 1024 |
| 15 | const P_SRC: *u8 = "/mnt/c/Users/elder/AppData/Local/Temp/awpush.src" as *u8 |
| 16 | const P_DST: *u8 = "/mnt/c/Users/elder/AppData/Local/Temp/awpush.dst" as *u8 |
| 17 | const P_SECRET_OUT: *u8 = "/tmp/nxsecret.out" as *u8 |
| 18 | const P_VAULT_NV: *u8 = "/home/elderwesto/.nishi/secrets/nas.nv" as *u8 |
functions
| 20 | func p_run(path: *u8, a1: *u8, a2: *u8) -> i64 |
| 38 | func p_unlink(path: *u8) -> i64 { __syscall(263, AT_FDCWD, path, 0, 0, 0, 0) return 0 } called by 1: main |
| 39 | func aw_napms(ms: i64) -> i64 { let ts: *i64 = sys_mmap(16) as *i64; ts[0] = 0; ts[1] = ms * P_MAGIC_1000000; __syscall(35, ts as i64, 0, 0, 0, 0, 0); return 0 } |
| 42 | func ssh_drain(st: *SshState) -> i64 |
| 50 | func ssh_put_file(st: *SshState, wcmd: *u8, wcmdlen: i64, data: *u8, datalen: i64) -> i64 |
| 90 | func main(argc: i64, argv: *i64) -> i64 |