radareorg / radare2-r2pipe

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

Python win10 pipe fix #147

Closed stiv-kupchik closed 2 years ago

stiv-kupchik commented 2 years ago

Checklist

Description

This is for issue 146 - in Windows 10 (and possibly other Windows, haven't checked), command results only come when the next command is issued (so if I run a command, I'll get empty output, and will get the actual output only when I run another command, instead of the new command's output). This seems to be due to a null byte that gets prepended to the pipe read output at position 0. I added some code to try and handle that, and it seems to work in my PC I also changed the sleep time to a variable, because I noticed that sometimes command results do not return (regardless of the null byte) and that by increasing the sleep the reliability increases

trufae commented 2 years ago

Thanks!