mirror of
https://github.com/radareorg/radare2-r2pipe.git
synced 2026-11-12 19:02:09 -10:00
Change back to .md which is accepted by pypi - https://packaging.python.org/guides/making-a-pypi-friendly-readme/#creating-a-readme-file
30 lines
488 B
Markdown
30 lines
488 B
Markdown
# r2pipe for Python
|
|
|
|
Interact with radare2 using the #!pipe command or in standalone scripts
|
|
that communicate with local or remote r2 via pipe, tcp or http.
|
|
|
|
## Installation
|
|
|
|
```
|
|
$ pip install r2pipe
|
|
```
|
|
|
|
or
|
|
|
|
```
|
|
$ pip3 install r2pipe
|
|
```
|
|
|
|
## Usage example:
|
|
|
|
```python
|
|
import r2pipe
|
|
|
|
r2 = r2pipe.open("/bin/ls")
|
|
r2.cmd('aa')
|
|
print(r2.cmd("afl"))
|
|
print(r2.cmdj("aflj")) # evaluates JSONs and returns an object
|
|
print(r2.cmdj("ij").core.format) # shows file format
|
|
r2.quit()
|
|
```
|