code wiki / (root) / nx_fetch_dump.nx

nx_fetch_dump.nx

buildroot/runtime/nx_fetch_dump.nx

1796 B28 linesdepth 21pulls 129 transitivereach 0 importersview sourcekind tooltopic fetch
docsdependenciesstructsconstsfunctions

about

nx_fetch_dump.nx -- diagnostic: fetch a URL over validated TLS and dump the raw body to a file, so we can see WHAT a Cloudflare-protected site (javdb) actually returns (challenge vs real page). argv[1]=url argv[2]=outpath. license_tier: ORIGINAL

dependencies 5 imports · 0 importers

nx_https_get.nx nx_x509_trust_store.nx nx_pem_loader.nx nx_csprng.nx nx_syscalls.nx nx_fetch_dump.nx

imports: nx_https_get.nxnx_x509_trust_store.nxnx_pem_loader.nxnx_csprng.nxnx_syscalls.nx

imported by: nobody (leaf or entry point)

structs

none

consts

9const K_MAGIC_16777216: i64 = 16777216

functions

11func fd_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 }
calls 1: sys_write
12func fd_wn(fd: i64, v: i64) -> i64 { let t: *u8=sys_mmap(28); var m: i64=v; if m<0 { sys_write(fd,"-" as *u8,1); m=0-m } var k: i64=0; if m==0 {t[0]=48 as u8;k=1} while m>0 {t[k]=(48+(m%10)) as u8;m=m/10;k=k+1} let b: *u8=sys_mmap(28); var i: i64=0; while i<k {b[i]=t[k-1-i];i=i+1} sys_write(fd,b,k); return 0 }
14func main(argc: i64, argv: *i64) -> i64