- A searchable offline resource library for web-app pentesting.
- Find payloads, code, tips n tricks fast
- Easy Docker instructions below
Opcode pulls the web-app material out of PayloadsAllTheThings, HackTricks, HTB-Scripts, and Web-Security-Academy plus your own notes, normalizes it, and serves it as one fast local site you can search during an engagement — instead of keeping six browser tabs open or grepping through cloned repos.
It runs in a single Docker container on your machine. It never touches the internet: no scanning, no telemetry, no CDN assets, no outbound requests of any kind. It is a reference library, not a tool that does anything to a target.
Search — one box over all 800 entries. Punctuation-dense payload queries work verbatim, and every hit carries its category and source.
Entry pages — upstream markdown rendered with syntax highlighting, a copy button on every fence, and the page's own attribution.
Filter by category — Commands, Payloads, or Tools, each with a live count taken from the corpus itself.
Filter by tool — only tools the corpus actually covers ever appear here; the list is built from the entries, never hardcoded.
About — per-source entry counts, upstream licenses, and the statement of modification that ingestion requires.
800 entries, all web-app focused:
| Category | Count | What it is |
|---|---|---|
| Payloads | 461 | Vulnerability classes — SQLi, XSS, SSRF, SSTI, XXE, CSRF, deserialization, file upload, IDOR … — plus PortSwigger lab notes and solvers |
| Commands | 275 | Web recon and exploitation steps, web servers and stacks (IIS, Tomcat, WordPress …) |
| Tools | 64 | Per-tool cheat sheets and scripts — ffuf, gobuster, nmap, ripgrep, and more |
Sourced from PayloadsAllTheThings (129), HackTricks (262), HTB-Scripts (72), Web-Security-Academy-Series (331), and pages written for Opcode itself (6). Counts are from the snapshot committed on 2026-10-14; they move whenever upstream is re-synced.
- Search everything at once — substring matching over titles, bodies,
tags and tool names. Punctuation-safe, so
'; DROP,${jndi:ldap://}and{{7*7}}all work as literal queries. Press/to jump to the box. - Filter by category and tool, combined with a query. The tool list is built from what's actually in the corpus, never hardcoded.
- Browse by category and vulnerability class.
- Copy any command with one click — every code block has a copy button and GitHub-style syntax highlighting.
- Add your own cheat sheets — drop a markdown file in
authored/and re-ingest. Seeauthored/README.md.
Every entry shows where it came from: source repository, original file path, license, and a link upstream.
Two surfaces only — search and browse. No drills, no flashcards, no quizzes, no chat, no progress tracking. Opcode stores nothing you type.
- Build and run with Docker — start here
- Where content comes from
- Writing your own content
- How content flows
- Re-sync — pulling upstream changes
- Search
- License — GPLv3, and the non-commercial caveat on bundled content
- Development
Requirements: Docker with Compose v2, git, and python3 (with the
venv module — on Debian/Ubuntu, sudo apt install python3-venv).
The control menu is the one entry point for everything in this section. Run it and pick what you need:
./scripts/opcode.shOn a fresh clone choose First-time setup. Day to day you will mostly
use Update — which pulls upstream, re-syncs content/, rebuilds the
image and restarts, all in one step — and Status, a one-line check of
whether the running app is still in sync with content/. The menu also
follows logs and stops the app. It does no work of its own: every item
runs the matching script or make target documented below, so anything
it does you can also do by hand.
Prefer to run the first build directly?
./scripts/setup.sh # or: make setupThat does all three steps below: clones the source repositories as
siblings, creates the virtualenv, generates content/, builds the image,
and waits until the app answers on http://localhost:8775.
It is safe to re-run. It looks before it clones: an existing checkout is
left completely alone — never pulled, never overwritten — and a clone
whose directory is spelled differently (HackTricks rather than
hacktricks) is detected and used where it is, rather than a second copy
being fetched beside it. Finished steps are skipped.
--skip-clone uses only what is already on disk; --no-docker stops
after generating content. ./scripts/setup.sh --help lists everything.
Because it never pulls, the setup script is for the first build only.
Bringing upstream changes into an existing setup is make resync —
see Re-sync.
The rest of this section is what the script does, in case you want to run the steps yourself or something goes wrong.
Opcode reads these at build time to generate its content. Clone them as siblings of this repo — the two public ones are all you need to get a useful corpus:
cd ..
git clone https://github.com/swisskyrepo/PayloadsAllTheThings.git
git clone https://github.com/HackTricks-wiki/hacktricks.git
cd opcodeThat gives you 397 entries. The last two are personal repositories hosted on GitLab; add them if you have access:
git clone https://gitlab.com/LinuxUser255/HTB-Scripts.git # +72 entries
git clone https://gitlab.com/LinuxUser255/Web-Security-Academy-Series.git # +331 entriesClone these two from GitLab, not from their GitHub copies: GitLab is where
they are developed, the GitHub repositories are mirrors, and the re-sync
step refuses to pull a clone whose origin is not the registered
repository (SSH or HTTPS, either is fine).
Each default is the directory name a plain git clone produces, so a
sibling layout needs no configuration at all:
~/Projects/PayloadsAllTheThings
~/Projects/hacktricks
~/Projects/HTB-Scripts
~/Projects/Web-Security-Academy-Series
~/Projects/opcode <- you are here
Names are matched case-sensitively on Linux, so they must match the slugs above exactly.
Already have them elsewhere? Point Opcode at them with environment
variables in your shell, from the project root, before you run
make ingest in step 2:
# applies to just this one command
PAYLOADS_SRC=/path/to/PayloadsAllTheThings make ingest
# or for the rest of this terminal session
export PAYLOADS_SRC=/path/to/PayloadsAllTheThings
export HACKTRICKS_SRC=/path/to/hacktricks
make ingest
# or, if all the repos live in one directory, set the parent once
HACKING_ROOT=/opt/sec make ingestHACKING_ROOT is where Opcode looks when the individual variables are
unset; it defaults to this repo's parent directory. The full set is
PAYLOADS_SRC, HACKTRICKS_SRC, HTB_SCRIPTS_SRC, WSA_SRC.
These are read by
ingest.pyon your machine — not by Docker. Ingestion runs on the host and bakes its results intocontent/; the container never opens a source repository, which is what makes the image self-contained. Setting these in theDockerfile, indocker-compose.yml, or in a.envfile has no effect —.envis read by Compose for its own${PORT}substitution, never bypython ingest.py.
A source that isn't on disk is skipped with a warning — Opcode builds fine with only some of them (without HackTricks, for example, you get 538 entries instead of 800).
make venv # one-time: create .venv and install dependencies
make ingest # walk the sources and write content/No make? The equivalent:
python3 -m venv .venv
.venv/bin/pip install -r requirements-dev.txt
.venv/bin/python ingest.pyThis writes content/entries/**.yaml and refreshes TODO.md. It takes a
few seconds and is safe to re-run.
docker compose up --build -dThen open http://localhost:8775.
docker compose up --build -d # build and start (make up)
docker compose down # stop, keep data (make down)
docker compose logs -f # follow logs (make logs)
docker compose ps # check status
curl localhost:8775/health # {"entries":800,"ok":true}Change the port with PORT=9000 docker compose up -d.
content/ is baked into the image, so a content change needs a rebuild:
make resync # pull upstream and re-sync content/
make ingest # or: re-read the clones and authored/ as they are
docker compose up --build -d # (make rebuild)The rebuild does not touch your data volume, and the app reseeds
itself on boot — there is no separate seed step to remember. Forgetting
the rebuild is the classic trap: content/ updates but the running
container keeps serving the old snapshot. The control menu's Update
runs the re-sync and the rebuild together so the two cannot drift apart.
docker compose down -v # also deletes the app-data volume
docker compose up --build -d # rebuilds and reseeds from content/Nothing is lost: the database is just a cache of content/.
make ingest
make seed # SQLite goes under ./data (the Makefile sets DATA_PATH)
make runThis pass covers web-application material only: web vulnerability classes, web recon/exploitation commands, and web-focused tooling.
Everything else in the source repositories — Active Directory, network
services, binary exploitation, mobile, cloud, forensics, crypto — was
walked, classified, and deliberately deferred. It is inventoried in
TODO.md with a file count per area, regenerated on every
ingest. Nothing is silently dropped.
To widen scope, move an area's name into the matching allowlist in
ingestion/webscope.py and re-run python ingest.py. Taxonomy, zsh
normalization, attribution, and re-sync all apply to whatever is in scope.
Opcode reads four cloned repositories at ingest time. By default it looks for them as siblings of this repo:
| Path | Contributes | Pulled from | Override with |
|---|---|---|---|
../PayloadsAllTheThings |
Payloads (129) | GitHub | PAYLOADS_SRC |
../hacktricks |
Commands (262) | GitHub | HACKTRICKS_SRC |
../HTB-Scripts |
Tools and Commands (72) | GitLab | HTB_SCRIPTS_SRC |
../Web-Security-Academy-Series |
Payloads (331) | GitLab | WSA_SRC |
Or point HACKING_ROOT at the directory holding them all. A source that
is not on disk is skipped with a warning.
authored/ is the fifth source — content written for Opcode itself,
which lives in this repo and needs no clone.
HTB-Scripts is ingested whole: every file under Cloud, Exploits,
Scanning, Shells, Utils, and Web is web-app material, so no scope
filter applies. Markdown cheat sheets land in Commands; scripts land
in Tools.
Pages written for Opcode live in authored/ — ingestion input,
deliberately not inside content/, which is generated output that
ingest.py rebuilds from scratch. Anything authored inside content/
would be destroyed by a rebuild and reported as stale in the meantime.
The containing directory sets the default category (authored/Tools/…),
and a YAML frontmatter block declares the rest. Authored pages have no
upstream path to infer metadata from, so they state it explicitly:
---
title: ffuf
category: Tools
tool: ffuf
vuln_class: Content Discovery
canonical: true
tags: [fuzzing, content-discovery, recon]
---
# ffuf
Fast web fuzzer...canonical: true marks a page as the reference for its tool. Several
entries can legitimately share a tool tag — for nmap there is also a
wrapper script — and the canonical one leads both search results and the
tool filter, with a Reference badge. It is a tiebreaker, not an
override: a title match still outranks it.
Frontmatter wins over inference. Everything else is identical to an
ingested page: the same cleaning, the same zsh normalization, the same
search indexing, and per-entry attribution — authored pages are credited
to Opcode (authored) under the project's own GPLv3, with no upstream
link.
Tag your shell fences. A fence with no language is skipped by both
the zsh normalization pass and syntax highlighting, so write ```bash
rather than a bare ```.
Then:
make ingest # fold authored/ into content/
make rebuild # bake content/ into the image and restartsource repos ─┐
├─ingest.py──▶ content/entries/**.yaml ──seed──▶ SQLite ──▶ web app
authored/ ────┘ (generated, git-tracked) (app-data volume)
(hand-written)
python ingest.pywalks the sources, filters to web scope, cleans upstream markup, normalizes shell blocks for zsh, classifies each page, attaches attribution, and writes one YAML entry per page. It also rewritesTODO.md.- Seeding happens automatically on every boot. It is an idempotent upsert by stable id, so there is no separate refresh step to forget.
- The app reads SQLite. It never opens
content/or a source repo.
Only app/ and content/ ship in the image. The ingestion package and the
upstream repos stay on the host.
content/ is COPYed into the image rather than bind-mounted, which is why
an edit needs a rebuild — see
After changing content.
Manual only. Nothing pulls upstream on a schedule. resync.py is the one
script that brings upstream changes in, and it runs on your host.
The easiest way is the control menu's Update, which runs the pull, the re-sync, the image rebuild, and an offer to commit the result — in that order, so you never re-sync and then forget to rebuild:
./scripts/opcode.sh # choose UpdateTo run the stages yourself:
make resync # pull the clones, update content/, reseed SQLite
make rebuild # then bake the new content/ into the image
python resync.py --no-seed # pull and update content/ only
python resync.py --no-pull # re-sync from the clones as they are (offline)
make pull # pull the clones only, no ingestIt does four things in order, printing a report for each:
- Pull. Every clone is fast-forwarded from its
origin— GitHub for PayloadsAllTheThings and HackTricks, GitLab for HTB-Scripts and Web-Security-Academy-Series. It never pulls over uncommitted changes, never merges or rebases a diverged branch, and never pulls from a remote other than the registered one; each of those is reported and the clone is left alone. A blocked clone does not stop the run, but the exit status is 1 so it cannot be missed. - Sync. Entries whose upstream file changed are rebuilt; everything else is untouched. Idempotent: with nothing new upstream it writes no files and does not re-run normalization over unchanged content.
- Inventory.
TODO.mdis regenerated. - Seed. SQLite is upserted from
content/.make resynckeeps it under./data; running the script directly needsDATA_PATH=./dataor--no-seed, and it checks that up front rather than failing after the pull. In Docker the rebuild reseeds on boot anyway.
Then review and commit the result on dev — content/ is git-tracked.
The menu's Update offers to do exactly this, on dev and never on
main; by hand it is:
git status --short content/
git add content/ TODO.md && git commit -m "content: re-sync from upstream"documentation/content-sources.md
§7 walks through every status the pull step can report, and
documentation/resync-troubleshooting.md
explains each error message and its fix.
Conflicts are never resolved silently. Each entry records the hash of
the upstream file it came from and the hash of the body ingest produced. If
upstream changed and the stored body no longer matches what ingest wrote
(someone edited it by hand), the entry is flagged for manual review and
left exactly as it is. Flagged entries are listed at the end of the run, on
the entry page, and on /about.
To resolve one:
- Keep the local version — edit
content/entries/<id>.yaml, setflagged_for_review: false, and clearingest_hashto keep protecting it. - Take upstream — delete the entry file; the next sync recreates it.
Upstream files that disappear are reported as stale and kept, never deleted.
Substring matching over title, tool, classification, tags, and body, with optional category and tool filters that combine as AND.
Substring rather than FTS5 is deliberate: payload text is dense with
punctuation ('; DROP, ${jndi:ldap://}, {{7*7}}) that an FTS5 MATCH
query treats as operators. % and _ are escaped so they behave as
literals, since in this corpus they are search terms, not wildcards.
Press / anywhere to focus the search box.
Opcode's own code is GPLv3 (GNU General Public License, version 3 or
later). The full text is in LICENSE; copyright and
third-party notices are in NOTICE.
SPDX-License-Identifier: GPL-3.0-or-later
Copyleft is a reciprocity condition, not just an attribution notice. If this repository is ever made public, or Opcode is distributed in any form:
- Derivative works must also be GPLv3. Anyone who modifies Opcode and distributes it must release their modified version under GPLv3 too.
- Source must be offered. Conveying Opcode — including as a container image or a hosted appliance — obliges you to make the corresponding source available to recipients.
- Modifications must be marked as changed, so problems are not attributed to earlier authors.
- It cannot be relicensed as proprietary, and you may not add further restrictions on top of the GPL.
- GPLv3 permits commercial use. Note the content caveat below, which is a separate license and does not.
The -or-later in the SPDX tag follows the FSF's recommended boilerplate
("either version 3 ... or (at your option) any later version"). For
strictly version 3, change the tag to GPL-3.0-only in the source
headers and in NOTICE section 1.
Everything under content/ is ingested third-party reference material. It
is data, not part of the program, and keeps its original license. Every
entry carries its source repository, original path, license, and a link
upstream — on the entry page itself, not buried in a credits page.
- PayloadsAllTheThings — MIT, © Swissky and contributors.
- HackTricks — CC BY-NC 4.0, © Carlos Polop. Attribution required and commercial use is not permitted.
- Web-Security-Academy-Series — GPLv3, the author's fork of rkhal101's series, with notes and lab scripts expanded.
- Local notes — the author's own content, GPLv3 with the code.
Ingested content is modified from upstream (mdBook directives
flattened, images removed, shell blocks normalized for zsh, pages
recategorized). CC BY-NC 4.0 requires that modifications be indicated, so
they are listed in NOTICE section 3 and noted on every entry page. No
payload or command text is rewritten for meaning.
The GPL and the bundled content pull in different directions. GPLv3
grants the freedom to use and sell the software commercially; the bundled
HackTricks material forbids commercial use. These coexist because
content/ is a separate work shipped in the same tree — an aggregate
under GPLv3 §5 — so the GPL does not extend to it and its terms do not
restrict the code. In practice: commercial use has full GPLv3 rights to
Opcode's code, but must drop content/ and re-ingest from sources whose
terms permit that use. The ingestion pipeline is part of the GPL'd
program, so this is fully supported. See NOTICE section 4.
make test # pytest
make lint # flake8 + mypy + bandit
make fmt # isort + black
make audit # pip-audit on pinned runtime deps
pre-commit installChanges are developed on the dev branch and reach main only through
a CI-gated merge request on GitLab — see
documentation/git-workflow.md for the
day-to-day loop, the merge checklist, and the GitLab settings that
enforce it.
See AGENTS.md for architecture, data contracts, and the
footguns worth knowing before changing the pipeline.





