Coder Social home page Coder Social logo

stjordanis / radare2-r2pipe Goto Github PK

View Code? Open in Web Editor NEW

This project forked from radareorg/radare2-r2pipe

0.0 1.0 0.0 680 KB

Access radare2 via pipe from any programming language!

Makefile 2.24% C 0.95% Shell 0.46% C++ 0.73% QMake 0.08% D 0.35% F# 0.04% C# 9.08% Erlang 0.73% Go 1.67% Haskell 0.57% Java 1.27% Groovy 0.13% Common Lisp 0.50% NewLisp 0.71% Nim 0.42% JavaScript 67.08% Rebol 0.08% Perl 3.04% Python 9.88%

radare2-r2pipe's Introduction

r2pipe

r2pipe logo

The r2pipe APIs are based on a single r2 primitive found behind r_core_cmd_str() which is a function that accepts a string parameter describing the r2 command to run and returns a string with the result.

The decision behind this design comes from a series of benchmarks with different libffi implementations and resulted that using the native API is more complex and slower than just using raw command strings and parsing the output.

As long as the output can be tricky to parse, it's recommended to use the JSON output and deserializing them into native language objects which results much more handy than handling and maintaining internal data structures and pointers.

Also, memory management results into a much simpler thing because you only have to care about freeing the resulting string.

This directory contains different implementations of the r2pipe API for different languages which could handle different communication backends:

  • Grab R2PIPE{_IN|_OUT} environment variables
  • Spawn r2 -q0 and communicate with pipe(2)
  • Plain TCP connection
  • HTTP queries (connecting to a remote webserver)
  • RAP protocol (r2 own's remote protocol)

Most of the language enable asyncronous capabilities in order to handle the result of the operation in a callback, allowing a single program to interact with multiple instances or connections to different r2 sessions at the same time.

  • Syncronous
  • Asyncronous

In addition, r2pipe scripts can be used to write plugins for radare2 or extend current functionalities:

  • Assembler/Disassembler plugin for RAsm
  • RIO plugin to abstract read/write/system operations
  • Syscall handler for the ESIL emulator
  • ...

The most supported languages are:

  • NodeJS
  • Python
  • Swift
  • C/Nim/Vala/C++

But there is r2pipe for:

          pipe spawn async http tcp rap json plug lib buff
C           X     X     -    X    X   X    X    X   X   X
C++/Qt      X     X     -    -    -   -    X    -   X   -
C# / F#     X     X     X    X    -   -    -    -   X   -
D           X     -     -    -    -   -    X    -   -   -
Erlang      X     X     -    -    -   -    -    -   -   -
Go          X     X     -    -    -   -    X    -   -   -
Haskell     X     X     -    X    -   -    X    -   -   -
Java/Groovy -     X     -    X    -   -    -    -   X   -
Lisp        -     X     -    -    -   -    X    -   -   -
NewLisp     X     X     -    X    -   -    X    -   X   -
Nim         -     -     -    X    -   -    X    -   X   -
NodeJS      X     X     X    X    X   -    X    X   -   X
Ocaml       -     X     -    -    -   -    X    -   -   -
Perl        X     X     -    X    X   -    X    -   -   -
PHP         -     X     -    -    -   -    -    -   -   -
Python      X     X     X    X    X   X    X    X   X   -
Ruby        X     X     -    -    -   -    X    -   -   -
Rust        X     X     -    X    X   -    X    -   -   -
Swift       X     X     X    X    -   -    X    -   X   -
Vala        -     X     X    -    -   -    -    -   -   -
Clojure     X     X     -    -    -   -    -    -   -   -

--pancake

radare2-r2pipe's People

Contributors

a1ext avatar adriaandens avatar andreafioraldi avatar aweinstock314 avatar chinmaydd avatar crowell avatar dzruyk avatar earada avatar frefreak avatar fxfactorial avatar gustavolcr avatar itayc0hen avatar jjh84 avatar jpenalbae avatar jroimartin avatar kazarmy avatar lowlyw avatar maijin avatar meiraxx avatar mistressofjellyfish avatar mrmacete avatar mytbk avatar n4r1b avatar plutec avatar radare avatar soltysek avatar sushant94 avatar thestr4ng3r avatar tyilo avatar xvilka 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.