学习使用ida 去除不透明谓词
- test.c
#include <stdio.h>
int main() {
char input[100];
scanf("%s", input);
if (!strcmp(input, "1")) {
printf("This is '1' branch");
} else if (!strcmp(input, "2")) {
printf("This is '2' branch");
} else {
printf("This is 'else' branch");
}
return 0;
}
编译
~/yourpath/myninjabuild/bin/clang-15 test.c -mllvm -enable-bcfobf -o ./bogus_CFG -isysroot `xcrun --show-sdk-path` -target arm64-apple-darwin -arch arm64