nx_magnet_discover.nx
buildroot/runtime/nx_magnet_discover.nx
about
nx_magnet_discover.nx -- paste a URL, get EVERY magnet on the page + info on each.
Fetches the URL over a VALIDATED TLS 1.3 session (nx_https_get + real CA store),
scans the response for every "magnet:?" link (decoding HTML & -> &), parses each
(info_hash, display name, tracker count) via mg_parse, dedupes by info_hash, and
writes a TSV the torrent daemon serves to the UI. The "find all magnets" rung.
argv[1] = page URL (https://...) argv[2] = output TSV path
out rows: <hash_hex>\t<name>\t<ntrackers>\t<magnet_uri>\n ; plus <out>.status state line.
license_tier: ORIGINAL kind: discovery layer: L6 (over validated-HTTPS + magnet-parse)
module: nishi-core.torrent.magnet_discover
dependencies 6 imports · 0 importers
imports: nx_magnet.nxnx_https_get.nxnx_x509_trust_store.nxnx_pem_loader.nxnx_csprng.nxnx_syscalls.nx
imported by: nobody (leaf or entry point)
structs
| none |
consts
| 18 | const K_MAGIC_1024: i64 = 1024 |
| 19 | const K_MAGIC_1048576: i64 = 1048576 |
| 20 | const K_MAGIC_4096: i64 = 4096 |
| 21 | const K_MAGIC_4095: i64 = 4095 |
functions
| 23 | func md_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 } |
| 24 | func md_wn(fd: i64, v: i64) -> i64 |
| 29 | func md_open_w(path: *u8) -> i64 { return sys_openat_wr(path, 0x1a4) } |
| 32 | func md_hex(ihash: *u8, out: *u8) -> i64 |
| 40 | func md_is_term(c: i64) -> i64 |
| 54 | func md_status(outpath: *u8, state: *u8, count: i64, bytes: i64) -> i64 |
| 66 | func main(argc: i64, argv: *i64) -> i64 |