nx_media_inspect.nx
buildroot/runtime/nx_media_inspect.nx
about
nx_media_inspect.nx -- DEEP sovereign media inspector CLI. Thin wrapper over nx_media_deepcrawl: crawls a
page's resource graph over sovereign TLS (following CSS/JS incl. URLs the JS constructs from constants,
reconstructed by nx_js_urlfold WITHOUT executing anything), harvests media from every hop, prints the list,
dumps the top page's source, and writes the shared HTML media panel. Never runs page JS -> robust on the ad
bundles that segfault a tree-walker. Same crawler the in-browser 'm' key uses.
usage: nx_media_inspect <url> [save] -- "save" also DOWNLOADS every media file to knowledge/media/inspect/
license_tier: ORIGINAL
dependencies 6 imports · 0 importers
imports: nx_syscalls.nxnx_x509_trust_store.nxnx_trust_store_load_from_certdata.nxnx_https_fetch_follow.nxnx_media_harvest.nxnx_media_deepcrawl.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
| 14 | const MI_MAGIC_4096: i64 = 4096 |
| 15 | const MI_MAGIC_1024: i64 = 1024 |
| 16 | const MI_MAGIC_1280: i64 = 1280 |
| 17 | const MI_MAGIC_4194304: i64 = 4194304 |
| 19 | const MI_HTML: i64 = 12582912 |
| 20 | const MI_FETCH: i64 = 28 |
| 21 | const MI_DEPTH: i64 = 2 |
| 22 | const MI_DLBUF: i64 = 67108864 // 64 MB per-file download buffer (covers videos) |
functions
| 24 | func mi_w(fd: i64, s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(fd,s,n); return 0 } |
| 25 | func mi_n(fd: i64, v0: i64) -> i64 { var v: i64=v0; if v<0 { sys_write(fd,"-" as *u8,1); v=0-v } let b: *u8=sys_mmap(24); var k: i64=0; if v==0{b[0]=48 as u8;k=1} while v>0{b[k]=(48+(v%10)) as u8;v=v/10;k=k+1} let o: *u8=sys_mmap(24); var j: i64=0; while j<k{o[j]=b[k-1-j];j=j+1} sys_write(fd,o,k); return 0 } |
| 26 | func mi_slen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n } called by 1: main |
| 27 | func mi_write_file(path: *u8, buf: *u8, n: i64) -> i64 |
| 35 | func mi_mkdir(path: *u8) -> i64 { return __syscall(258, 0-100, path as i64, 0x1ff, 0, 0, 0) } // mkdirat(AT_FDCWD, 0777) called by 1: mi_save_all |
| 36 | func mi_wn_str(out: *u8, o: i64, v: i64) -> i64 { var w: i64=o; if v==0 { out[w]=48 as u8; return w+1 } let b: *u8=sys_mmap(24); var m: i64=v; var k: i64=0; while m>0 { b[k]=(48+(m%10)) as u8; m=m/10; k=k+1 } var j: i64=k-1; while j>=0 { out[w]=b[j]; w=w+1; j=j-1 } return w } |
| 39 | func mi_savename(url: *u8, ulen: i64, idx: i64, out: *u8) -> i64 |
| 62 | func mi_save_all(M: *MediaSet, store: *TrustStore) -> i64 |
| 91 | func main(argc: i64, argv: *i64) -> i64 |