环境:
- radare2: radare2 4.2.0-git 23519 @ linux-x86-64 git.4.1.1-84-g0c46c3e1e 提交:0c46c3e1e30bb272a5a05fc367d874af32b41fe4 构建:2020-01-08__09:49:06
- 系统: Ubuntu 18.04.3 LTS
解决方案:
- 要在radare2 中重新创建所描述的功能,我们可以使用两个radare2 命令并在您的输入字符串中添加额外的转义包。
- 命令一:doo [args] # 在调试模式下使用提供的参数重新打开二进制文件。
- 命令二:dc #继续执行
- 输入中的其他转义包:“\x54\x65\x73\x74”->“\\x54\\x65\\x73\\x74”
例子:
user@host:~$ echo -e "\x54\x65\x73\x74"
Test
user@host:~$ r2 /bin/echo
[0x00001d10]> doo -e "\x54\x65\x73\x74"
Process with PID 13820 started...
= attach 13820 13820
File dbg:///bin/echo -e "\x54\x65\x73\x74" reopened in read-write mode
13820
[0x7ff1924ee090]> dc
x54x65x73x74
[0x7ff1924ee090]>
- 再次使用radare2,但带有额外的转义包(“\x54”->“\\x54”):
user@host:~$ r2 /bin/echo
[0x00001d10]> doo -e "\\x54\\x65\\x73\\x74"
Process with PID 17265 started...
= attach 17265 17265
File dbg:///bin/echo -e "\\x54\\x65\\x73\\x74" reopened in read-write mode
17265
[0x7fb080026090]> dc
Test
[0x7fb07fd18e06]>