1
PS C:\_> r2 -v
radare2 4.3.1 6 @ windows-x86-64 git.4.3.1
commit: 54ac837b5503f10f91e2069ac357791f7a3e635a build: Fri 03/06/2020__15:52:24.93
PS C:\_> r2 --
 -- 99 bugs, take one down pass it around. 100 bugs...
[0x00000000]> f myflag
[0x00000000]> f*
fs *
f myflag 1 0x00000000
[0x00000000]> f?myflag ;expect an output here
[0x00000000]> f?~exists
| f?flagname               check if flag exists or not, See ?? and ?!

The command f?myflag doesn't print any output as if the flag doesn't exist. Why does it happen?

As a bonus question :), what does See ?? and ?! mean?

1

It just doesn't print anything on the the screen but set's internal value. You can be verifie that by looking at the source code here.

What it does tell you to do is to run ?? which is actually printing that value as can be seen in the help

| ??                               show value of operation

Additionally based on the result you can run the operation or not.

| ?! [cmd]                         run cmd if $? == 0
| ?? [cmd]                         run cmd if $? != 0

[0x00000000]> f?non-existent-flag
[0x00000000]> ?? ?E exists //<- action is not executed
[0x00000000]> f?myflag
[0x00000000]> ?? ?E exists
 ╭──╮    ╭────────╮
 │ _│    │        │
 │ O O  <  exists │
 │  │╭   │        │
 ││ ││   ╰────────╯
 │└─┘│
 ╰───╯
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.