Skip to main content

A Python library and tools providing easy access to the retdec.com decompilation service through their public REST API.

Project description

Documentation Status Build Status Code Coverage Status

A Python library and tools providing easy access to the retdec.com decompilation service through their public REST API.

You can either incorporate the library in your own scripts:

from retdec.decompiler import Decompiler

decompiler = Decompiler(api_key='YOUR-API-KEY')
decompilation = decompiler.start_decompilation(input_file='file.exe')
decompilation.wait_until_finished()
decompilation.save_hll_code()

or you can use the provided script for stand-alone decompilations:

$ decompiler -k YOUR-API-KEY file.exe
v23bmYb67R
----------

Waiting for resources (0%)...                      [OK]
Pre-Processing:
    Obtaining file information (5%)...             [OK]
    Unpacking (10%)...                             [OK]
Front-End:
    Initializing (20%)...                          [OK]
[..]
Done (100%)...

Downloading:
 - file.c

Either way, file.c then contains the decompiled C code:

$ cat file.c
//
// This file was generated by the Retargetable Decompiler
// Website: https://retdec.com
// Copyright (c) 2015 Retargetable Decompiler <info@retdec.com>
//

#include <stdio.h>
[..]

Status

The library currently provides basic support of the decompilation, fileinfo, and test services.

Requirements

Installation

The recommended way to install is from Python Package Index (PyPI) with pip:

$ pip install retdec-python

This will install the latest stable version, including all dependencies.

Documentation

The documentation is available here.

Contact and Support

I will be very glad to get your feedback, pull requests, issues, or just a simple Thanks. Feel free to contact me for any questions you might have!

License

Copyright (c) 2015 Petr Zemek (s3rvac@gmail.com) and contributors.

Distributed under the MIT license. See the LICENSE file for more details.

Access from Other Languages

If you want to access the retdec.com decompilation service from other languages, check out the following projects:

  • retdec-cpp - A library and tools for accessing the service from C++.

  • retdec-sh - Scripts for accessing the service from shell.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

retdec-python-0.1.tar.gz (16.9 kB view details)

Uploaded Source

File details

Details for the file retdec-python-0.1.tar.gz.

File metadata

  • Download URL: retdec-python-0.1.tar.gz
  • Upload date:
  • Size: 16.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for retdec-python-0.1.tar.gz
Algorithm Hash digest
SHA256 20dfa6520f0b63a1662982312844d457f2aad3bc38b6f2fe860d73593e4b161c
MD5 5e61093a37440e821b0c7ca540bc1763
BLAKE2b-256 1a30d967b882e42dac220cd97cbd3c6207752dc3fa8a29e360771232b265ecdc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page