r2retdec icon indicating copy to clipboard operation
r2retdec copied to clipboard

Print the output via RCons instead of stdout

Open radare opened this issue 6 years ago • 0 comments

Hacky solution:

r2.cmd('\"e cmd.prompt=cat /tmp/r2.c;e cmd.prompt=\"');

Other solutions:

  • Add !!* to capture the output off the r2pipe execution and print it to stdout
  • Add cmd.after or (cmd.tail) to set the cmdtail variable to run b64 decoding outputs
  • Add another command to hold the output until the r2pipe command is executed (without cmd.tails)
function r2print(x) {
        const lines = x.split(/\n/g);'
        for (let line of lines) {
                r2.cmd('?b64-' + Buffer.from(line).toString('base64'));
        }

i'll try to find a decent solution

radare avatar Jul 23 '19 19:07 radare