[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-114587":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":10,"archived":22,"fork":22,"defaultBranch":23,"hasWiki":24,"hasPages":22,"topics":25,"createdAt":10,"pushedAt":26,"updatedAt":27,"readmeContent":28,"aiSummary":29,"trendingCount":16,"starSnapshotCount":16,"syncStatus":17,"lastSyncTime":30,"discoverSource":31},114587,"reverseakamai","9xz\u002Freverseakamai","9xz","Akamai (std+bmp) solver","",null,"Rust",70,28,4,1,0,2,13,18,9,53.64,false,"main",true,[],"2026-11-12 23:46:24","2026-11-23 07:35:52","# reverseakamai\n\nPure-Rust, sandbox-free SDK for Akamai Bot Manager web challenges (`bmak` v2\u002Fv3, `SBSD`, `\u002Fakam\u002F13\u002F` pixel, `sec-cpt` PoW, and the BMP TLV bytecode VM).\n\n> [!IMPORTANT]\n> **Need browser or mobile automation in production?** Static solvers break as script builds, VM opcodes, and mobile BMP\u002FBAP SDKs rotate. [**Distilled**](https:\u002F\u002Fdistilled.cx) runs real ARM64 Android phones in the cloud with hardware-backed device identities, mobile proxies, and API, MCP and ADB control.\n\n## Quickstart\n\n```rust\nuse akamai_solver::{AkamaiClient, Profile};\nuse serde_json::json;\n\n# async fn run() -> akamai_solver::Result\u003C()> {\nlet mut client = AkamaiClient::builder()\n    .profile(Profile::Chrome154)\n    .posts(3)\n    .build()?;\n\nlet outcome = client.solve(\"https:\u002F\u002Fwww.bestbuy.com\u002F\").await?;\nassert!(outcome.abck_advanced());\n\nlet search = client\n    .get(\"https:\u002F\u002Fwww.bestbuy.com\u002Fsite\u002Fsearchpage.jsp?st=iphone\")\n    .await?;\n\nlet cart: serde_json::Value = client\n    .post_json(\n        \"https:\u002F\u002Fwww.bestbuy.com\u002Fgateway\u002Fgraphql\",\n        &json!({\n            \"operationName\": \"CartQuery\",\n            \"query\": \"query CartQuery { customer { cart { totalQuantity } } }\",\n            \"variables\": {}\n        }),\n    )\n    .await?\n    .json()?;\n\nlet cookie_header = client.cookie_header(\"https:\u002F\u002Fwww.bestbuy.com\u002F\")?;\n# Ok(())\n# }\n```\n\n`AkamaiClient` maintains a persistent TLS\u002FH2 connection pool, scoped cookie jar, and negotiated `Accept-CH` client hints across requests (`.solve()`, `.get()`, `.post()`, `.post_json()`, `.request()`, `.cookies()`, `.cookie_header()`, `.is_validated()`).\n\n## Crates\n\n| Crate | Description |\n| --- | --- |\n| `crates\u002Fsolver` (`akamai-solver`) | High-level `AkamaiClient` SDK driving `sec-cpt`, Pixel, SBSD, and 3-post `bmak` challenges over `wreq` TLS\u002FH2. |\n| `crates\u002Fcodec` (`akamai-codec`) | `_abck` parser, v2\u002Fv3 substitution & permutation codecs, static `bmak` (`s8` `shuffle_key` + `ver`) extractor, `BuildTemplate`, SHA-256 PoW, pixel, and BMP TLV VM disassembler\u002Finterpreter. |\n| [`native-payload`](https:\u002F\u002Fgithub.com\u002F9xz\u002Fnative-payload) | Provider-agnostic `DeviceProfile`, biometrics, order-preserving JSON template patchers, and cipher primitives. |\n\n---\n\n## Akamai Checks & Wire Architecture\n\n### 1. Transport, Client Hints & Cookie Coupling\n- **TLS \u002F HTTP\u002F2 & Header Order:** Akamai's edge (`AkamaiGHost`) fingerprints the TLS ClientHello (JA3\u002FJA4), HTTP\u002F2 `SETTINGS` \u002F `WINDOW_UPDATE` \u002F pseudo-header order, and navigation vs. XHR `Sec-Fetch-*` header order before evaluating any cookie.\n- **`_abck` (`\u003Ctoken>~\u003Cstate>~\u003Cedge_blob>~\u003Cpow>`):**\n  - Field 0: 32-hex session token.\n  - Field 1: challenge state (`-1` unvalidated \u002F score-in-blob, `0` explicitly validated).\n  - Field 2 (`YAAQ...`): encrypted edge-state and bot-score blob; grows as `sensor_data` posts are accepted.\n  - Field 4: optional in-sensor SHA-256 PoW challenge (`\u003Cid>_\u003Csalt>_\u003Cdifficulty>_...`).\n- **`bm_sz` (`\u003Ctoken>~\u003Cblob>~\u003Csub_key>~\u003Cint>`):**\n  - Minted by the edge on the initial response. Segment 2 (`sub_key`, fallback `8888888`) seeds the 92-character substitution pass and is echoed in `v3` header field 4 (`3;0;1;\u003Cbitmask>;\u003Csub_key>;\u003Cver>;\u003Ctimings>;\u003Cciphertext>`).\n\n### 2. Static Script Obfuscation (`s8` Digit Cipher & XOR String Tables)\n- **`s8` Constant Table (`shuffle_key`):** Every `bmak` v3 build embeds a digit-substituted constant array `s8` containing fixed mathematical anchors (`4294967295.000000` at `s8[4]`, `8388607.000000` at `s8[6]`, `65535.000000` at `s8[8]`, and `8888888` at `s8[9]`). Recovering the 10-digit substitution map from those anchors decodes the per-build permutation seed `shuffle_key` (`jpw = s8[10]`) statically in `\u003C0.1 ms`.\n- **XOR String Tables (`ver`):** The 44-character Base64 build version token (`ver`) is stored in the script's string-table array and XORed against a 20-byte key derived from two sibling entries (`s20[k] ^ master[offset + k]`).\n\n### 3. Two-Pass 23-Bit LCG Cipher (`v2` & `v3`)\n\n```text\nstate = (state * 65793 + 4282663) & 0x7fffff\ndraw(state) = (state >> 8) & 0xffff\n```\n\n1. **Pass 1 — Token Permutation (`shuffle_key`):** Splits the serialized JSON body on `,` (`v2`) or `:` (`v3`) into `N` tokens and performs `N` Fisher-Yates swaps using `draw(state) % N`.\n2. **Pass 2 — 92-Char ASCII Substitution (`sub_key` from `bm_sz`):** Rotates each byte in printable ASCII `32..=126` (excluding `\"`, `'`, `\\`) by `draw(state) % 92`, stepping the LCG on every byte.\n\n### 4. Secondary Challenges (`SBSD`, `Pixel`, `sec-cpt`)\n- **SBSD (State-Based Scraping Detection):** Script tag carrying `?v=\u003Cuuid>` (plus `&t=\u003Ctoken>` on active interstitials). Posts `{\"body\":\"\u003Ccipher>\"}` seeded by `bm_so` \u002F `sbsd_o` to mint `bm_s` and `bm_sc`.\n- **Pixel (`\u002Fakam\u002F13\u002F\u003Chash>`):** Seeds `bazadebezolkohpepadr` in inline HTML; script path `\u002Fakam\u002F13\u002F\u003Cseed ^ 77>` posts `u=\u003Cencoded>&t=\u003Csha1(seed)>` to `\u002Fakam\u002F13\u002Fpixel_\u003Cseed ^ 77>`.\n- **`sec-cpt` (`428` \u002F `bm-verify`):** 10-round big-endian SHA-256 modulo search (`SHA256(token || ts || nonce || difficulty || candidate) % (difficulty + round) == 0`).\n\n---\n\n## BMP Embedded Bytecode VM (37-Opcode TLV ISA)\n\nEmbedded-VM builds ship two TLV bytecode programs inside the script:\n- **Blob 0 (959 B, 382 instructions):** Defines `kT` \u002F `Eq`, which holds **five 23-element permutation tables** (10 total 23-slot arrays across two phases) selected by 5 integer keys (`[352616518, 224802418, 349450134, 88894862, 650677942]`) to permute the 23 sensor sections before encryption.\n- **Blob 1 (2,481 B, 673 instructions):** Defines the serializer (`qR`, `QO`, `CE`) and the DJB2-XOR digest function `dk(str)` (`hash = ((hash \u003C\u003C 5) + hash) ^ charCode`, initial seed `5381`).\n\n### Complete 37-Opcode Table (`crates\u002Fcodec\u002Fsrc\u002Fvm.rs`)\n\n`try_disassemble` resolves opcode bytes per build from function entries, branch targets, string operands, and stack-operation patterns; the interpreter uses the resolved map directly. The opcode column below is the reference encoding, not a pinned lookup table. Unsupported new operations return an error instead of being guessed.\n\nEarlier public disassemblers desynced around offset ~520 because they treated `0x54` (`LEAVE_SCOPE`, 0 operand bytes) as a 9-byte `PUSHnum`. With exact operand widths, 100% of Blob 0 and Blob 1 disassemble and execute with zero unknown bytes:\n\n| Opcode | Mnemonic | Operands (Big-Endian) | Stack \u002F Execution Semantics |\n| :---: | --- | --- | --- |\n| `0x8f` | `Jmp` | `u32` target | Unconditional jump to byte offset `target` |\n| `0xbd` | `JBool` | `u8` cond, `u32` target | Loop\u002Fboolean conditional jump |\n| `0xfe` | `JTrue` | `u8` cond, `u32` target | Branch on comparison result |\n| `0xe8` | `MakeFunc` | `u16` arity, `u32` entry | Push closure with parameter count `arity` at `entry` |\n| `0x93` | `SetTry` | `u8` mode | Install `try \u002F catch \u002F finally` handlers |\n| `0xd2` | `EnterScope` | — | Push lexical scope frame |\n| `0x54` | `LeaveScope` | — | Pop lexical scope frame (**0 operand bytes**) |\n| `0xa0` | `Ret` | — | Return top of stack from current call frame |\n| `0x43` | `FnEntry` | — | Function body entry marker after parameter bindings |\n| `0xfd` | `PushUndefined` | — | Push `undefined` |\n| `0xff` | `PushStr` | `u16` len, `[u8; len]` | Push UTF-8 string literal \u002F identifier |\n| `0x7e` | `GetVar` | `u16` len, `[u8; len]` | Resolve variable by name in scope chain |\n| `0x96` | `SetVar` | `u8` mode | Pop target reference and value; store into scope\u002Fproperty |\n| `0x4f` | `PushU8` | `u8` val | Push 8-bit unsigned integer |\n| `0x29` | `PushU32` | `u32` val | Push 32-bit unsigned integer (e.g. `5381` DJB2 seed) |\n| `0xea` | `PushF64` | `f64` val | Push IEEE-754 64-bit float |\n| `0x7f` | `PropGet` | `u8` mode | Property lookup (`mode=1` value, `mode=0` method receiver) |\n| `0x1a` | `Call` | `u8` keep_rv, `u16` argc | Invoke function\u002Fmethod with `argc` arguments |\n| `0x8c` | `NewArray` | `u8` len | Pop `len` `(value, 0)` pairs and construct array |\n| `0x33` | `PostInc` | `u8` mode | Post-increment \u002F decrement reference |\n| `0x6a` | `Halt` | — | Terminate bytecode unit |\n| `0x85` | `Add` | — | Numeric `+` or string concatenation |\n| `0xd4` | `Sub` | — | `lhs - rhs` |\n| `0x01` | `Mul` | — | `lhs * rhs` |\n| `0xc4` | `Div` | — | `lhs \u002F rhs` |\n| `0xd7` | `Mod` | — | `lhs % rhs` |\n| `0x97` | `BitXor` | — | `(lhs as i32) ^ (rhs as i32)` |\n| `0xaa` | `Shl` | — | `(lhs as i32) \u003C\u003C (rhs & 31)` |\n| `0x55` | `Shr` | — | `(lhs as i32) >> (rhs & 31)` |\n| `0xd5` | `Ushr` | — | `(lhs as u32) >>> (rhs & 31)` |\n| `0xec` | `BitOr` | — | `(lhs as i32) \\| (rhs as i32)` |\n| `0x58` | `Neg` | — | `-rhs` |\n| `0xed` | `BoolNot` | — | `!rhs` |\n| `0xad` | `CmpLt` | — | `lhs \u003C rhs` |\n| `0xce` | `CmpLtLoop` | — | Loop bound `\u003C` comparison |\n| `0x84` | `CmpEq` | — | `lhs === rhs` |\n| `0x83` | `CmpNeq` | — | `lhs !== rhs` |\n| `0xa4` | `CmpType` | — | Type\u002Fundefined equality check |\n| `0x6c` | `InOp` | — | `prop in obj` |\n\n## Codec CLI\n\n```sh\ncargo test --workspace\n\ncargo run -q -p akamai-codec -- script path\u002Fto\u002Fscript.js\ncargo run -q -p akamai-codec -- vm crates\u002Fcodec\u002Ftests\u002Ffixtures\u002Fblob0.bin --tables\ncargo run -q -p akamai-codec -- vm crates\u002Fcodec\u002Ftests\u002Ffixtures\u002Fblob1.bin\ncargo run -q -p akamai-codec -- pixel 1320943881\ncargo run -q -p akamai-codec -- pow --token TOK --salt s --start-ts 1000 --difficulty 8 --rounds 3\ncargo run -q -p akamai-codec -- bench '{\"ver\":\"bench\"}' --encode --repeat-to 4096 --sub 4000000 --shuffle 70010 --iterations 100000\n```\n\nFor retail, ticketing, or social apps at scale without maintaining solvers for every build rotation or mobile BMP\u002FBAP update, use [**distilled.cx**](https:\u002F\u002Fdistilled.cx): real cloud Android phones you control over API, MCP or ADB.\n","这是一个纯 Rust 编写的 Akamai Bot Manager 反爬挑战求解 SDK，用于自动化应对 Akamai 的多种前端防护机制。核心功能包括解析和生成 `_abck`\u002F`bm_sz` 等动态 Cookie、执行 `sec-cpt` 工作量证明、模拟 BMP TLV 字节码虚拟机、处理 `\u002Fakam\u002F13\u002F` 像素请求及 SBSD 挑战，并维持符合 Akamai 边缘指纹要求的 TLS\u002FHTTP\u002F2 连接、客户端提示（Accept-CH）与 Cookie 生命周期管理。适用于需要绕过 Akamai Bot Manager v2\u002Fv3 防护的合规 Web 自动化场景，如电商比价、公开数据采集或安全研究中的协议级对抗分析。","2026-11-24 04:49:05","CREATED_QUERY"]