{"_id":"@alexaltea/capstone-js","_rev":"2-9c365eea32decbc8f40f2c3acfe0329c","name":"@alexaltea/capstone-js","dist-tags":{"latest":"5.0.9"},"versions":{"3.0.5":{"name":"@alexaltea/capstone-js","version":"3.0.5","author":{"name":"Alexandro Sanchez Bach","email":"alexaltea123@gmail.com"},"_id":"@alexaltea/capstone-js@3.0.5","maintainers":[{"name":"alexaltea","email":"alexandro@phi.nz"}],"homepage":"https://github.com/AlexAltea/capstone.js#readme","bugs":{"url":"https://github.com/AlexAltea/capstone.js/issues"},"dist":{"shasum":"ea2ebfd5c21912336da33e00a447863d9d783fb7","tarball":"https://registry.npmjs.org/@alexaltea/capstone-js/-/capstone-js-3.0.5.tgz","fileCount":806,"integrity":"sha512-HWa4d5vblYc3OEJ9MpcXFo0gV/oDLTI5iH7ng80Gs3/Wo3lcYvB14gDDwSr9So1F+fuwIET8meo6TxTezEyqTg==","signatures":[{"sig":"MEUCIQDDHk4T+9GX55/lfDdYKx4fGZ2meUjEyhXd0S6+pT4nEQIgJbY06hRszcSa/BCEMfIz/UJQZS/dSo2gvxdIl188zJs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":35204295,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJijjXMACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrJGQ//StQFwXeRY8GOO4Bf7wj2wb4+i2EjiiuhRyGhMLmjZMqbv8KA\r\nHsLXwTjdeaCjre+qZ21BZj5RrqOhZjulwprqX37wZHgHjbQtPH9HGdhgEx6r\r\nCi0I/FgkmYh95X2c+C+N4HMWUF9NEpoiQM+WHF3AZsO7XbDLi5UD8MygvNTH\r\nRxU+2Whr76R5SIGMvS/az2gPtKYx02FtLhbfN6lJ8n+580jiwDn8hFzJdN4h\r\nz/u31jWyNn2fBZvfFNW3sAe3lB7b/MSY0JI4KzQ/2uZxef7yb8nQgqrVypbD\r\nTkVFYSTGQr4s5YBirpE/70dXwc+be8F7khZUcT88SW1Bs6cFyc9L3nx3oBh9\r\nMIEVcheXFkTx4be+48mjwsWl00s+weuimDRoOnGd3MIPqExqJTBTwvfn1LDi\r\nGyZQuD9H1uPxlRpoDsTdfPqf8nPKTQBijoh+IcTD8JN4KPaH0fPaDDt8wSkU\r\nm5Ti3tv6VzMXvoXVtvkxMNRoM7+N7MR+uB73dPtiPvmqOlQMtkuB5RICOfCb\r\nFpfeTutISJKVXtxGv9zrmV8TVYwmtoeKeFfEXeHebkogQMlbiRI6PbowS3lK\r\nOkYjQAdbr02oDsCKCSmtgJ1KMjmo+mxO+axYAd03CpWVeMBcuCqm0TVIN7ml\r\ncGi3l/qtMhqGF1gZEmC3WUFx+2B6h6yhnaM=\r\n=mh/A\r\n-----END PGP SIGNATURE-----\r\n"},"gitHead":"ddb12e8166c7ddb1f19546d6ea9e6d1e7a3b1172","_npmUser":{"name":"alexaltea","email":"alexandro@phi.nz"},"repository":{"url":"git+https://github.com/AlexAltea/capstone.js.git","type":"git"},"_npmVersion":"6.14.10","description":"Capstone disassembler framework port for JavaScript","directories":{},"_nodeVersion":"14.15.4","dependencies":{},"_hasShrinkwrap":false,"devDependencies":{"bower":"^1.8.8","grunt":"^1.5.2","grunt-exec":"~0.4.6","time-grunt":"^1.0.0","load-grunt-tasks":"^1.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-watch":"^0.6.1","grunt-contrib-concat":"^1.0.1","grunt-contrib-connect":"^0.9.0"},"_npmOperationalInternal":{"tmp":"tmp/capstone-js_3.0.5_1653487052497_0.8967917695152365","host":"s3://npm-registry-packages"}},"5.0.9":{"name":"@alexaltea/capstone-js","version":"5.0.9","description":"Capstone disassembler framework port for JavaScript","author":{"name":"Alexandro Sanchez Bach","email":"alexaltea123@gmail.com"},"license":"BSD-3-Clause","homepage":"http://alexaltea.github.io/capstone.js/","keywords":["capstone","disassembler","disassembly","wasm","webassembly","reverse-engineering"],"repository":{"type":"git","url":"git+https://github.com/AlexAltea/capstone.js.git"},"main":"./dist/capstone.js","scripts":{"build":"python3 build.py","serve":"python3 -m http.server"},"bugs":{"url":"https://github.com/AlexAltea/capstone.js/issues"},"_id":"@alexaltea/capstone-js@5.0.9","gitHead":"52da0b9c931a9f40255461250310cc96cb45c945","_nodeVersion":"20.5.1","_npmVersion":"10.3.0","dist":{"integrity":"sha512-9zyms5plb9efC0nAc+PUtlYbQNI7e56spP+SuJKHqQA8pLIZ7vgw+Q2E1i1gwcfwqj9VZiWxF6iX1AJ/Y9HSzA==","shasum":"0f5f21ebb0be88e3c6e01041c179fe317cd75e77","tarball":"https://registry.npmjs.org/@alexaltea/capstone-js/-/capstone-js-5.0.9.tgz","fileCount":5,"unpackedSize":3635589,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDgLzhWjBamjbXE5Wby92iAO9T6HW3vFZK2TSHufDb1SQIhALDzNMzOW/xBaXXw4Z55ZnK03VUsCRfI25H3n2pnr2TN"}]},"_npmUser":{"name":"alexaltea","email":"alexandro@phi.nz"},"directories":{},"maintainers":[{"name":"alexaltea","email":"alexandro@phi.nz"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/capstone-js_5.0.9_1781548554742_0.47700675775112744"},"_hasShrinkwrap":false}},"time":{"created":"2022-05-25T13:57:32.437Z","modified":"2026-06-15T18:35:55.047Z","3.0.5":"2022-05-25T13:57:32.842Z","5.0.9":"2026-06-15T18:35:54.938Z"},"bugs":{"url":"https://github.com/AlexAltea/capstone.js/issues"},"author":{"name":"Alexandro Sanchez Bach","email":"alexaltea123@gmail.com"},"homepage":"http://alexaltea.github.io/capstone.js/","repository":{"type":"git","url":"git+https://github.com/AlexAltea/capstone.js.git"},"description":"Capstone disassembler framework port for JavaScript","maintainers":[{"name":"alexaltea","email":"alexandro@phi.nz"}],"readme":"Capstone.js\n===========\n\nPort of the [Capstone](https://github.com/aquynh/capstone) disassembler framework for JavaScript/WASM. Powered by [Emscripten](https://github.com/emscripten-core/emscripten).\n\n**Requirements:** JavaScript environment with [WebAssembly](https://developer.mozilla.org/en-US/docs/WebAssembly) and [BigInt](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt) support.\n\n**Notes:** _Capstone_ is a lightweight multi-architecture disassembly framework originally developed by Nguyen Anh Quynh and released under BSD license. More information about contributors and license terms can be found in the files `CREDITS.TXT` and `LICENSE.TXT` of the *capstone* submodule in this repository.\n\n## Installation\n\nTo add Capstone.js to your web application, include it with:\n\n```html\n<script src=\"capstone.js\"></script>\n```\n\nor install it with the NPM command:\n\n```bash\nnpm install @alexaltea/capstone-js\n```\n\n## Usage                                                      \n```javascript\n// Input: Machine code bytes and offset where they are located\nvar buffer = [0x55, 0x31, 0xD2, 0x89, 0xE5, 0x8B, 0x45, 0x08];\nvar offset = 0x10000;\n\nMCapstone().then((cs) => {\n    // Initialize the decoder\n    var d = new cs.Capstone(cs.ARCH_X86, cs.MODE_32);\n\n    // Output: Array of cs.Instruction objects\n    var instructions = d.disasm(buffer, offset);\n\n    // Display results\n    instructions.forEach((instr) => {\n        console.log(\"0x%s:\\t%s\\t%s\",\n            instr.address.toString(16),\n            instr.mnemonic,\n            instr.op_str\n        );\n    });\n\n    // Delete decoder\n    d.close();\n});\n```\n\n## Building\n\nTo build the Capstone.js library:\n\n1. Clone this repository including its submodules:\n    ```bash\n    git clone --recursive https://github.com/AlexAltea/capstone.js\n    ```\n\n2. Install the latest [Python 3.x](https://www.python.org/downloads/), [CMake](http://www.cmake.org/download/) and the [Emscripten SDK](https://emscripten.org/docs/getting_started/downloads.html). Follow the corresponding instructions and make sure all environment variables are configured correctly.\n\n3. Run the build script:\n   ```bash\n   python3 build.py\n   ```\n\nBuild artifacts will be saved to [`dist`](./dist/).\n\n> [!TIP]\n> Pass architecture names to produce a smaller, single-architecture bundle (e.g. `python3 build.py x86`), or `python3 build.py --release` to build every variant.\n","readmeFilename":"README.md","keywords":["capstone","disassembler","disassembly","wasm","webassembly","reverse-engineering"],"license":"BSD-3-Clause"}