code wiki / _hdl_build / nx_vk_js.nx

nx_vk_js.nx

buildroot/runtime/_hdl_build/nx_vk_js.nx

8394 B125 linesdepth 22pulls 174 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_vk_js.nx -- structural probe of a VK video page to decide the extraction path. VK's stream is NOT in the static HTML (native classifier conf=0) but al_video.php (its AJAX video API) appears -> the page either (a) embeds initial player state in an INLINE script we can run/parse (like YouTube's ytInitialPlayerResponse), or (b) is a pure JS shell whose EXTERNAL bundle fetches al_video.php at runtime. This dumps inline-script size + the al_video.php call context + stream markers so we know which. Honest probe, no download.

dependencies 6 imports · 0 importers

nx_syscalls.nx nx_x509_trust_store.nx nx_trust_store_load_from_certdata. nx_video_sniff.nx nx_video_sniff_fetch.nx nx_surrogate.nx nx_vk_js.nx

imports: nx_syscalls.nxnx_x509_trust_store.nxnx_trust_store_load_from_certdata.nxnx_video_sniff.nxnx_video_sniff_fetch.nxnx_surrogate.nx

imported by: nobody (leaf or entry point)

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

main pn sys_mmap pw sys_write sys_write ↻ count_ci plen ci_eq pw ↻ find_ci plen ↻ ci_eq ↻ dump sys_write ↻ pw ↻ sg_new sys_mmap ↻ sg_seed sg_addc sg_add sg_slen sys_mmap ↻ sg_build_preamble sg_puts js_set_rt_dbg sys_now_us sys_mmap ↻ sys_clock_gettime_mono js_pending_total js_pending_url ev_str_bytes str_flatten ev_str_new nx_pool_alloc gc_init gc_retire_chunk gc_setbit nx_pool_alloc ↻ ev_str_len

structs

none

consts

12const K_MAGIC_4194304: i64 = 4194304
13const K_MAGIC_8388608: i64 = 8388608
14const K_MAGIC_65536: i64 = 65536
15const K_MAGIC_16384: i64 = 16384
16const K_MAGIC_4096: i64 = 4096

functions

18func pw(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 }
called by 3: pndumpmain calls 1: sys_write
19func pn(v: i64) -> i64 { let b: *u8=sys_mmap(24); var m: i64=v; if m<0{pw("-" as *u8);m=0-m} let t: *u8=sys_mmap(24); 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} var i: i64=0; while i<k{b[i]=t[k-1-i];i=i+1} sys_write(1,b,k); return 0 }
called by 1: main calls 3: sys_mmappwsys_write
20func plen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n }
called by 2: find_cicount_ci
21func ci_eq(src: *u8, at: i64, n: i64, pat: *u8, pl: i64) -> i64
called by 2: find_cicount_ci
27func find_ci(src: *u8, n: i64, pat: *u8, from: i64) -> i64
called by 1: main calls 2: plenci_eq
33func count_ci(src: *u8, n: i64, pat: *u8) -> i64
called by 1: main calls 2: plenci_eq
41func dump(src: *u8, off: i64, n: i64, total: i64) -> i64
called by 1: main calls 2: sys_writepw
47func main(argc: i64, argv: *i64) -> i64