Giter Site home page Giter Site logo

crackercat / disasm-web Goto Github PK

View Code? Open in Web Editor NEW

This project forked from czbix/disasm-web

0.0 0.0 0.0 2.71 MB

Online Assembler and Disassembler, support offline usage.

Home Page: https://disasm.czbix.com

Shell 5.70% JavaScript 2.57% Python 6.42% TypeScript 46.00% CSS 0.18% HTML 0.79% Vue 37.02% Dockerfile 1.33%

disasm-web's Introduction

disasm-web

npm npm

Online Assembler and Disassembler.

This project ported capstone and keystone into the browser via emscripten.

Playground: https://disasm.czbix.com/ (support offline usage)

NPM packages

There are two packages available: capstone-wasm and keystone-wasm.

Usage

import {
  Const, Capstone, loadCapstone,
} from 'capstone-wasm'

await loadCapstone()

const capstone = new Capstone(Const.CS_ARCH_X86, Const.CS_MODE_32)
// the code can be bytes array or Uint8Array
const code = [0x55, 0x8b, 0xec, 0x83, 0xc4, 0x0c, 0xc3]
const insns = capstone.disasm(code, {
  address: 0x1000,
})

insns.forEach(insn => {
  console.log(insn.mnemonic, insn.opStr)
})
import {
  Const, Keystone, loadKeystone,
} from 'keystone-wasm'

await loadKeystone()

const capstone = new Keystone(Const.KS_ARCH_X86, Const.KS_MODE_32)
// can separate code by `\n` or `;`
const code = `push ebp
mov ebp, esp
add esp, 0xc
ret`
// bytes is a Uint8Array
const bytes = keystone.asm(code, {
  address: 0x1000,
})

Cons

Not support detail feature(CS_OPT_DETAIL) yet.

disasm-web's People

Contributors

czbix avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.