radare2
radare2 copied to clipboard
r2pipe not working when `>` is used
. foo.py > /dev/null
r2pipe starts working only when > is used. https://gist.github.com/mmkhitaryan/2237fc60dfae5ae36d93171706385c81 you need to create a file README in cwd. The script steps through /bin/ls and checks if there is README filename in the heap which the stack is currently pointing to. If you run the script like this:
r2 /bin/ls
[0x00006ab0]> . ./demo123.py
It will be stuck in a loop forever, because for some reason poiner_from_stack does not change. But if you run the same script with > it ends without forever loop.
r2 /bin/ls
[0x00006ab0]> . ./demo123.py > log
INFO: File dbg:///usr/bin/ls reopened in read-write mode
[x] Analyze all flags starting with sym. and entry0 (aa)
[x] Analyze all functions arguments/locals
[x] Analyze function calls (aac)
[x] Analyze len bytes of instructions for references (aar)
[x] Finding and parsing C++ vtables (avrr)
[x] Skipping type matching analysis in debugger mode (aaft)
[x] Propagate noreturn information (aanr)
[x] Use -AA or aaaa to perform additional experimental analysis.
INFO: Continue until 0x55a966f15830 using 1 bpsize
hit breakpoint at: 0x55a966f15830
[0x7ff46b108798]>
This is fixed now