Code Monkey home page Code Monkey logo

jsdec's Introduction

Build Status Language grade: JavaScript Total alerts License

jsdec

Converts asm to pseudo-C code.

Software Requirements

Requires rizin.

Install in home folder (or in other paths)

If you want to install in the HOME folder or in other non standard paths, just set the prefix to a different value

  • Run meson setup build --prefix=~/.local
  • Run ninja -C build install

Install system wide

Follow the following steps to install jsdec

  • clone this repository
  • Run meson setup build --prefix=/usr to create the build folder
  • Run ninja -C build install to build the shared library and to install it

Usage

  • Open your file with rizin
  • Analyze the function you want to disassemble (af)
  • Run the plugin via pdd

Arguments

[0x00000000]> pdd?
Usage: pdd[?]   # Core plugin for jsdec
| pdd  # decompile current function
| pddt # lists the supported architectures
| pdda # decompile current function with side assembly
| pddA # decompile current function with annotation output
| pddb # decompile current function but show only scopes
| pddc # decompiled code is returned to rizin as 'file:line code' (via CL)
| pddf # decompile all functions
| pddi # generate issue data
| pddj # decompile current function as json
| pddo # decompile current function side by side with offsets

Evaluable vars

You can use these in your .rizinrc file.

jsdec.asm           | if true, shows pseudo next to the assembly.
jsdec.blocks        | if true, shows only scopes blocks.
jsdec.casts         | if false, hides all casts in the pseudo code.
jsdec.debug         | do not catch exceptions in jsdec.
jsdec.paddr         | if true, all xrefs uses physical addresses compare.
jsdec.slow          | if true load all the data before to avoid multirequests to rizin.
jsdec.xrefs         | if true, shows all xrefs in the pseudo code.
e scr.html          | outputs html data instead of text.
e scr.color         | enables syntax colors.

Report an Issue

  • Open your file with rizin
  • Analyze the function you want to disassemble (af)
  • Give the data to the plugin via pddi or pdd --issue
  • Insert the JSON returned by the previous command into the issue (you can also upload the output)

Supported Arch

6502 (experimental)
8051
ARM 16/32/64 bit
AVR
dalvik
m68k
MIPS
PowerPC 32/64 bit (VLE included)
RISC-V
Sparc
SuperH (experimental)
v850
WebAssembly (experimental)
x86/x64

Developing on jsdec

Read DEVELOPERS.md

jsdec's People

Contributors

wargio avatar radare avatar elicn avatar pelijah avatar thestr4ng3r avatar ret2libc avatar diadlo avatar sivaramaaa avatar lgtm-com[bot] avatar karliss avatar wjsetzer avatar trufae avatar jtojnar avatar itayc0hen avatar mytbk avatar officialcjunior avatar xvilka 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.