radareorg / radare2-r2pipe

Access radare2 via pipe from any programming language!
388 stars 99 forks source link

Python3 r2.cmdj: invalid JSON received #69

Closed Wenzel closed 6 years ago

Wenzel commented 6 years ago

Hi,

I was trying to use the latest r2pipe Python bindings on radare/radare2 Docker container, and using the r2.cmdj command always results in this output:

r2pipe.cmdj.Error: Expecting value: line 1 column 1 (char 0)

Dockerfile to reproduce the bug

FROM radare/radare2

USER root
RUN apt-get update && apt-get install -y python3-pip
RUN pip3 install r2pipe
USER r2

CMD ["python3", "-c", "import r2pipe; r2 = r2pipe.open('/bin/ls'); r2.cmdj('pd 10')"]

My test script

import r2pipe
r2 = r2pipe.open('/bin/ls')
r2.cmdj('pd 10')

Thanks !

Wenzel commented 6 years ago

my bad.