# reversesha256/kasada-full-reverse architecture

> Architecture diagram of the GitHub repository reversesha256/kasada-full-reverse, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-12). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/reversesha256/kasada-full-reverse
- Repository: https://github.com/reversesha256/kasada-full-reverse

## Overview

This is an outdated research archive for reversing the historical Kasada `p.js` virtual machine and prototyping its PoW and HTTP flow—not a maintained, current-compatible solver. The principal workflow preserves a script snapshot and its bytecode artifacts, decodes and traces VM behavior, then applies selected findings in experimental Python implementations that acquire tokens and assemble request headers. Separate branches cover fingerprint capture and HAR/token analysis. Relationships between research stages and the documented HTTP sequence come from the README; unsampled implementation details are not inferred.

Main entry points: [`05_solver/kasada_full_solver.py`](https://github.com/reversesha256/kasada-full-reverse/blob/main/05_solver/kasada_full_solver.py) (Full request solver), [`02_disassembler`](https://github.com/reversesha256/kasada-full-reverse/tree/main/02_disassembler) (Disassemblers), [`03_analysis`](https://github.com/reversesha256/kasada-full-reverse/tree/main/03_analysis) (Opcode and config tracing), [`01_source/p.js`](https://github.com/reversesha256/kasada-full-reverse/blob/main/01_source/p.js) (Historical script)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_source["Snapshot artifacts"]
  node_snapshot["Historical script<br/>[p.js]"]
  node_vm["VM excerpt<br/>[vm_section.js]"]
  node_bytecode["Bytecode artifacts"]
  node_strings["String table<br/>[string_table.txt]"]
end

subgraph group_research["VM research"]
  node_disassemblers["Disassemblers"]
  node_disassembly["Disassembly results"]
  node_tracing["Opcode and config tracing"]
  node_powresearch["PoW analysis<br/>[08_full_reverse.py]"]
end

subgraph group_solver["Solver prototypes"]
  node_python_solver["Full request solver"]
  node_solver_variants["Solver variants"]
  node_http_server["Solve API<br/>[server.py]"]
end

subgraph group_capture["Protocol research"]
  node_fingerprint_capture["Fingerprint capture"]
  node_intercept["Traffic interception"]
  node_token_analysis["HAR and token analysis"]
end

node_researcher(("Researcher"))
node_protected_site(("Protected site"))
node_kasada_endpoints(("Kasada endpoints"))

node_researcher -->|"studies"| node_snapshot
node_snapshot -->|"examines interpreter"| node_vm
node_bytecode -->|"decodes"| node_disassemblers
node_strings -->|"resolves strings"| node_disassemblers
node_vm -->|"traces operations"| node_tracing
node_disassemblers -->|"produces"| node_disassembly
node_disassembly -->|"guides analysis"| node_tracing
node_tracing -->|"investigates PoW"| node_powresearch
node_powresearch -.->|"informs prototype"| node_python_solver
node_protected_site -->|"submits solve task"| node_http_server
node_http_server -->|"requests tokens"| node_kasada_endpoints
node_python_solver -->|"performs handshake"| node_kasada_endpoints
node_python_solver -->|"attaches headers"| node_protected_site
node_solver_variants -.->|"prototypes HTTP flow"| node_kasada_endpoints
node_fingerprint_capture -.->|"captures fingerprint"| node_kasada_endpoints
node_intercept -.->|"intercepts traffic"| node_kasada_endpoints
node_token_analysis -.->|"compares tokens"| node_researcher

click node_snapshot "https://github.com/reversesha256/kasada-full-reverse/blob/main/01_source/p.js"
click node_vm "https://github.com/reversesha256/kasada-full-reverse/blob/main/01_source/vm_section.js"
click node_bytecode "https://github.com/reversesha256/kasada-full-reverse/blob/main/01_source/program_bytecode.json"
click node_strings "https://github.com/reversesha256/kasada-full-reverse/blob/main/01_source/string_table.txt"
click node_disassemblers "https://github.com/reversesha256/kasada-full-reverse/tree/main/02_disassembler"
click node_disassembly "https://github.com/reversesha256/kasada-full-reverse/tree/main/04_disasm_output"
click node_tracing "https://github.com/reversesha256/kasada-full-reverse/tree/main/03_analysis"
click node_powresearch "https://github.com/reversesha256/kasada-full-reverse/blob/main/03_analysis/08_full_reverse.py"
click node_python_solver "https://github.com/reversesha256/kasada-full-reverse/blob/main/05_solver/kasada_full_solver.py"
click node_solver_variants "https://github.com/reversesha256/kasada-full-reverse/tree/main/05_solver"
click node_http_server "https://github.com/reversesha256/kasada-full-reverse/blob/main/05_solver/server.py"
click node_fingerprint_capture "https://github.com/reversesha256/kasada-full-reverse/blob/main/05_solver/capture_fingerprint.py"
click node_intercept "https://github.com/reversesha256/kasada-full-reverse/blob/main/05_solver/kasada_intercept.py"
click node_token_analysis "https://github.com/reversesha256/kasada-full-reverse/tree/main/06_testing"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_snapshot,node_vm,node_bytecode,node_strings toneBlue
class node_disassemblers,node_disassembly,node_tracing,node_powresearch toneAmber
class node_python_solver,node_solver_variants,node_http_server toneMint
class node_fingerprint_capture,node_intercept,node_token_analysis toneRose
class node_researcher,node_protected_site,node_kasada_endpoints toneIndigo
```

## Components

### Snapshot artifacts

- [Historical script](https://github.com/reversesha256/kasada-full-reverse/blob/main/01_source/p.js): `01_source/p.js`
- [VM excerpt](https://github.com/reversesha256/kasada-full-reverse/blob/main/01_source/vm_section.js): `01_source/vm_section.js`
- [Bytecode artifacts](https://github.com/reversesha256/kasada-full-reverse/blob/main/01_source/program_bytecode.json): `01_source/program_bytecode.json`
- [String table](https://github.com/reversesha256/kasada-full-reverse/blob/main/01_source/string_table.txt): `01_source/string_table.txt`

### VM research

- [Disassemblers](https://github.com/reversesha256/kasada-full-reverse/tree/main/02_disassembler): `02_disassembler`
- [Disassembly results](https://github.com/reversesha256/kasada-full-reverse/tree/main/04_disasm_output): `04_disasm_output`
- [Opcode and config tracing](https://github.com/reversesha256/kasada-full-reverse/tree/main/03_analysis): `03_analysis`
- [PoW analysis](https://github.com/reversesha256/kasada-full-reverse/blob/main/03_analysis/08_full_reverse.py): `03_analysis/08_full_reverse.py`

### Solver prototypes

- [Full request solver](https://github.com/reversesha256/kasada-full-reverse/blob/main/05_solver/kasada_full_solver.py): `05_solver/kasada_full_solver.py`
- [Solver variants](https://github.com/reversesha256/kasada-full-reverse/tree/main/05_solver): `05_solver`
- [Solve API](https://github.com/reversesha256/kasada-full-reverse/blob/main/05_solver/server.py): `05_solver/server.py`

### Protocol research

- [Fingerprint capture](https://github.com/reversesha256/kasada-full-reverse/blob/main/05_solver/capture_fingerprint.py): `05_solver/capture_fingerprint.py`
- [Traffic interception](https://github.com/reversesha256/kasada-full-reverse/blob/main/05_solver/kasada_intercept.py): `05_solver/kasada_intercept.py`
- [HAR and token analysis](https://github.com/reversesha256/kasada-full-reverse/tree/main/06_testing): `06_testing`

### Other components

- **Researcher**
- **Protected site**
- **Kasada endpoints**

## Connections

- Researcher → Historical script: studies (evidence: `README.md`)
- Historical script → VM excerpt: examines interpreter (evidence: `README.md`)
- Bytecode artifacts → Disassemblers: decodes (evidence: `README.md`)
- String table → Disassemblers: resolves strings (evidence: `README.md`)
- VM excerpt → Opcode and config tracing: traces operations (evidence: `README.md`)
- Disassemblers → Disassembly results: produces (evidence: `README.md`)
- Disassembly results → Opcode and config tracing: guides analysis (evidence: `README.md`)
- Opcode and config tracing → PoW analysis: investigates PoW (evidence: `README.md`)
- PoW analysis → Full request solver: informs prototype
- Protected site → Solve API: submits solve task (evidence: `README.md`)
- Solve API → Kasada endpoints: requests tokens (evidence: `README.md`)
- Full request solver → Kasada endpoints: performs handshake (evidence: `README.md`)
- Full request solver → Protected site: attaches headers
- Solver variants → Kasada endpoints: prototypes HTTP flow
- Fingerprint capture → Kasada endpoints: captures fingerprint
- Traffic interception → Kasada endpoints: intercepts traffic
- HAR and token analysis → Researcher: compares tokens
