{"id":50549770,"url":"https://github.com/k4ryuu/sigscan-ts","last_synced_at":"2026-06-04T02:01:36.171Z","repository":{"id":361251356,"uuid":"1252362110","full_name":"K4ryuu/sigscan-ts","owner":"K4ryuu","description":"Ultra-fast TypeScript binary signature scanner for Node.js and Bun","archived":false,"fork":false,"pushed_at":"2026-05-29T21:01:23.000Z","size":852,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-29T21:05:33.940Z","etag":null,"topics":["binary-analysis","binary-signature","bun","cheat-engine","gamedata","ida-pattern","nodejs","pattern-scanner","reverse-engineering","sigscan","typescript","x64dbg"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/sigscan-ts","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/K4ryuu.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"K4ryuu"}},"created_at":"2026-05-28T12:52:45.000Z","updated_at":"2026-05-29T21:01:27.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/K4ryuu/sigscan-ts","commit_stats":null,"previous_names":["k4ryuu/sigscan-ts"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/K4ryuu/sigscan-ts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/K4ryuu%2Fsigscan-ts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/K4ryuu%2Fsigscan-ts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/K4ryuu%2Fsigscan-ts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/K4ryuu%2Fsigscan-ts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/K4ryuu","download_url":"https://codeload.github.com/K4ryuu/sigscan-ts/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/K4ryuu%2Fsigscan-ts/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33886160,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-04T02:00:06.755Z","response_time":64,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["binary-analysis","binary-signature","bun","cheat-engine","gamedata","ida-pattern","nodejs","pattern-scanner","reverse-engineering","sigscan","typescript","x64dbg"],"created_at":"2026-06-04T02:01:35.232Z","updated_at":"2026-06-04T02:01:36.162Z","avatar_url":"https://github.com/K4ryuu.png","language":"TypeScript","funding_links":["https://github.com/sponsors/K4ryuu"],"categories":[],"sub_categories":[],"readme":"\u003ca name=\"readme-top\"\u003e\u003c/a\u003e\n\n\u003c!-- BADGES --\u003e\n\u003cdiv align=\"center\"\u003e\n\n![NPM Version](https://img.shields.io/npm/v/sigscan-ts?style=for-the-badge\u0026label=NPM)\n![NPM Downloads](https://img.shields.io/npm/dm/sigscan-ts?style=for-the-badge\u0026label=Downloads)\n![GitHub License](https://img.shields.io/github/license/K4ryuu/sigscan-ts?style=for-the-badge)\n![GitHub Issues](https://img.shields.io/github/issues/K4ryuu/sigscan-ts?style=for-the-badge)\n![TypeScript](https://img.shields.io/badge/TypeScript-007ACC?style=for-the-badge\u0026logo=typescript\u0026logoColor=white)\n![Bundle Size](https://img.shields.io/bundlephobia/minzip/sigscan-ts?style=for-the-badge\u0026label=Bundle%20Size)\n\n\u003c/div\u003e\n\n\u003c!-- PROJECT TITLE --\u003e\n\u003cbr /\u003e\n\u003cdiv align=\"center\"\u003e\n  \u003ch1 align=\"center\"\u003esigscan-ts\u003c/h1\u003e\n  \u003cp align=\"center\"\u003e\n    High-performance binary signature scanner and gamedata verifier\n    \u003cbr /\u003e\n    \u003cstrong\u003eZero runtime dependencies • Hybrid Buffer.indexOf prefix optimization • Fully Type-Safe • Auto relocatable signatures\u003c/strong\u003e\n    \u003cbr /\u003e\n    \u003cbr /\u003e\n    \u003ca href=\"#installation\"\u003e\u003cstrong\u003eGet Started »\u003c/strong\u003e\u003c/a\u003e\n    ·\n    \u003ca href=\"https://github.com/K4ryuu/sigscan-ts/tree/main/examples\"\u003eView Examples\u003c/a\u003e\n  \u003c/p\u003e\n\u003c/div\u003e\n\n## About The Project\n\nHey! I built this because I was working on a few game server modding tools and got tired of copy-pasting raw C++ signature scanning algorithms or relying on slow, outdated JavaScript libraries.\n\nThis is a modern, high-performance binary signature scanner. It runs on Node.js and Bun with no runtime dependencies whatsoever.\n\n## Why this package is special\n\n- **Zero runtime dependencies** - All dependencies are strictly for development and compilation. Check the `package.json` for yourself.\n- **Hybrid search engine** - Rather than scanning byte-by-byte, it parses your signature to find the longest continuous prefix, performs a native C++ `indexOf` search, and then verifies wildcards around candidates. See the benchmark table below.\n- **Extremely forgiving parser** - Copy signatures directly from Cheat Engine, IDA Pro, x64dbg, or C-style arrays (`{ 0x48, 0x8b, 0xc4, ?? }`). It handles spaces, dots, commas, raw hex strings, and escaped sequences out of the box.\n- **Built-in CLI \u0026 Gamedata Verifier** - Scan single signatures or batch-verify entire `gamedata.json` files (supporting both CounterStrikeSharp and SwiftlyS2 formats) against server binaries in seconds.\n\n## Performance\n\nBenchmarked on a 100 MB random buffer with 3 planted signatures (Apple M2 Pro, Bun 1.3).\n\n| Pattern type | Example | Time | vs naive loop |\n|---|---|---|---|\n| No wildcards | `DE AD BE EF CA FE BA BE` | ~8.5 ms | **~15x faster** |\n| Wildcards (prefix-opt) | `DE AD ?? EF CA ?? BA BE` | ~9.4 ms | **~13x faster** |\n| Fragmented wildcards | `?? AD ?? EF ?? FE ?? BE` | ~12.7 ms | **~10x faster** |\n| `scan()` with `fast: true` | any | ~4.3 ms | **~30x faster** |\n| Naive JS loop (baseline) | — | ~128 ms | 1x |\n\nRun it yourself: `bun run bench`\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n## Installation\n\n```bash\nnpm install sigscan-ts\npnpm add sigscan-ts\nbun add sigscan-ts\n```\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n## Quick example\n\nHere is a quick example of a one-off pattern scan:\n\n```typescript\nimport { readFileSync } from \"fs\";\nimport { scan, PatternScanner } from \"sigscan-ts\";\n\nconst buffer = readFileSync(\"libserver.so\");\n\n// 1. One-off quick scan\nconst result = scan(buffer, \"48 8B C4 ? 53 ?? 90\");\nif (result.found) {\n  console.log(`Found pattern at ${result.offsets.length} locations.`);\n  console.log(`Primary offset: 0x${result.offsets[0].toString(16)}`);\n  console.log(`Is the signature unique/reliable? ${result.reliable}`);\n}\n\n// 2. Reusable scanner (efficient for scanning multiple signatures)\nconst scanner = new PatternScanner(buffer);\nconst offsets = scanner.findPattern(\"55 48 89 E5\");\nconsole.log(\"Offsets found:\", offsets);\n```\n\n## Multi-pattern scan\n\nScan many named signatures in one call — useful for gamedata.json verification or any batch scan:\n\n```typescript\nimport { readFileSync } from \"fs\";\nimport { PatternScanner } from \"sigscan-ts\";\n\nconst buffer = readFileSync(\"server.so\");\nconst scanner = new PatternScanner(buffer);\n\n// returns Record\u003cname, number[]\u003e\nconst offsets = scanner.findPatterns({\n  UTIL_ClientPrintAll: \"55 48 89 E5 41 57 4D 89 CF\",\n  GiveNamedItem:       \"55 48 89 E5 41 57 41 56 41 55\",\n  CCSPlayer_Respawn:   \"48 8B 05 ?? ?? ?? ?? 48 85\",\n});\n\n// returns Record\u003cname, { found, offsets, reliable }\u003e\nconst results = scanner.scanPatterns({\n  UTIL_ClientPrintAll: \"55 48 89 E5 41 57 4D 89 CF\",\n  GiveNamedItem:       \"55 48 89 E5 41 57 41 56 41 55\",\n});\n\nif (results[\"GiveNamedItem\"].reliable) {\n  console.log(\"unique match at\", results[\"GiveNamedItem\"].offsets[0].toString(16));\n}\n```\n\nStandalone helpers also available: `findPatterns(buffer, patterns)` and `scanPatterns(buffer, patterns)`.\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n## Command Line Interface (CLI)\n\nIf you install the package globally or run it via npx, you can use the built-in CLI:\n\n```bash\n# Scan a binary for a specific signature\nsigscan-ts -b libserver.so -p \"48 8B C4 ?? 53\"\n\n# Fast pattern scan that stops after proving a second match\nsigscan-ts -b libserver.so -p \"48 8B C4 ?? 53\" --fast\n\n# Verify an entire gamedata.json file against binaries\n# (Supports folder paths or passing multiple files via multiple -b flags.\n# Platform types and libraries are automatically detected!)\nsigscan-ts -b /path/to/binaries_dir -g latest-gamedata.json\nsigscan-ts -b libserver.so -b server.dll -g latest-gamedata.json\n```\n\nHere is a preview of the batch-verification mode running on both Windows and Linux binaries side-by-side:\n\n![sigscan-ts CLI batch-verification output](images/cli-output.png)\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n## Supported Pattern Formats\n\nThe parser automatically detects and handles almost any copy-pasted pattern style:\n\n- **IDA Pro**: `\"48 8B C4 ?? 53 ? 90\"`\n- **x64dbg**: `\"48.8B.C4.??.53\"` (Dot-separated)\n- **Cheat Engine**: `\"48 8b c4 ?? 53\"`\n- **C-style Array**: `\"{ 0x48, 0x8b, 0xc4, ??, 0x53 }\"`\n- **Escaped Hex**: `\"\\x48 \\x8B \\xC4 ?? \\x53\"`\n- **Raw Hex String**: `\"488bc4??53\"`\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n## For developers\n\nIf you want to contribute or build the library locally, please check out the [contributing guide](CONTRIBUTING.md).\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n## License\n\nMIT - do whatever you want with it\n\n---\n\n## Credits\n\nBuilt by [K4ryuu](https://github.com/K4ryuu)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fk4ryuu%2Fsigscan-ts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fk4ryuu%2Fsigscan-ts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fk4ryuu%2Fsigscan-ts/lists"}