GithubHelp home page GithubHelp logo

pombredanne / retdec-node Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jpenalbae/retdec-node

0.0 1.0 0.0 13 KB

Node.js npm module providing easy access to the retdec.com decompilation service through their REST API.

License: GNU Lesser General Public License v3.0

JavaScript 100.00%

retdec-node's Introduction

retdec-node

Node.js npm module providing easy access to the retdec.com decompilation service through their REST API.

Retdec is decompiler that can be utilized for source code recovery, static malware analysis, etc. The decompiler is supposed to be not bounded to any particular target architecture, operating system, or executable file format.

######Features

  • Handles all the commonly used file formats (ELF, PE, COFF).
  • Currently supports the Intel x86, ARM, MIPS, PIC32, and PowerPC architectures.
  • Can decompile to two output high-level languages: C and a Python-like language.
  • Compiler and packer detection.
  • Extraction and utilization of debugging information (DWARF, PDB).
  • Signature-based removal of statically linked library code.
  • Reconstruction of functions, high-level constructs, types, etc.
  • Generation of call graphs, control-flow graphs, and various statistics.
  • It is actively developed.

Getting Started

You may install this plugin using this command:

$ npm install retdec

If you don't have a retdec API key, register here to get one.

Once the plugin has been installed you must initialize it with your API key:

var rdec = require('retdect');
var retdec = rdec.apiKey('YOUR_API_KEY_HERE');

or

var retdec = require('retdect').apiKey('YOUR_API_KEY_HERE');

A basic decompilation example:

var retdec = require('retdect').apiKey('YOUR_API_KEY_HERE');

retdec.decompile(process.argv[2], 'bin', null, function(err, res) {
    if (err) {
        console.log('Error (' + err + '): ' + res);
        return;
    }

    console.log(res.hll.toString());
});

Note that this plugin relies on retdec official API, so outputs and arguments are defined by their API instead of by this module. For a better understanding of the API, please visit the official documentation.


API

####test(echoargs, callback)

This is a simple echo test to be able to check your API key. It will return the echoargs argument in the response.

Detailed documentation is here.

######echoargs Any object with any key/values is valid for echo test.

######callback The callback to be called once the response is ready.

Sample

var retdec = require('retdect').apiKey('YOUR_API_KEY_HERE');

var testing = {
    hola: 'adios',
    dos: 2
};

retdec.test(testing, function(err, res) {
    if (err) {
        console.log('Error test: ' + res);
        return;
    }

    console.log(res);
});

Sample output

$ node test-mine.js
{ dos: '2', hola: 'adios' }

####More doc coming soon...

retdec-node's People

Contributors

jpenalbae avatar s3rvac avatar

Watchers

 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.