Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jpenalbae/retdec-node
Node.js npm module providing easy access to the retdec.com decompilation service through their REST API.
https://github.com/jpenalbae/retdec-node
Last synced: about 1 month ago
JSON representation
Node.js npm module providing easy access to the retdec.com decompilation service through their REST API.
- Host: GitHub
- URL: https://github.com/jpenalbae/retdec-node
- Owner: jpenalbae
- License: lgpl-3.0
- Created: 2015-04-14T17:15:50.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-02-03T16:41:21.000Z (almost 9 years ago)
- Last Synced: 2024-10-30T11:12:43.633Z (2 months ago)
- Language: JavaScript
- Size: 12.7 KB
- Stars: 2
- Watchers: 5
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# retdec-node
Node.js npm module providing easy access to the [retdec.com](https://retdec.com) decompilation service through their [REST API](https://retdec.com/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](https://retdec.com/registration/) to get one.
Once the plugin has been installed you must initialize it with your API key:
```js
var rdec = require('retdect');
var retdec = rdec.apiKey('YOUR_API_KEY_HERE');
```or
```js
var retdec = require('retdect').apiKey('YOUR_API_KEY_HERE');
```A basic decompilation example:
```js
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](https://retdec.com/api/docs/).
* * *
## 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](https://retdec.com/api/docs/test.html).
######echoargs
Any object with any key/values is valid for echo test.######callback
The callback to be called once the response is ready.**Sample**
```js
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...