字符串我有如下一个非常简单的程序: 的#include查找在编译的可执行
int main(){
char* mystring = "ABCDEFGHIJKLMNO";
puts(mystring);
char otherstring[15];
otherstring[0] = 'a';
otherstring[1] = 'b';
otherstring[2] = 'c';
otherstring[3] = 'd';
otherstring[4] = 'e';
otherstring[5] = 'f';
otherstring[6] = 'g';
otherstring[7] = 'h';
otherstring[8] = 'i';
otherstring[9] = 'j';
otherstring[10] = 'k';
otherstring[11] = 'l';
otherstring[12] = 'm';
otherstring[13] = 'n';
otherstring[14] = 'o';
puts(otherstring);
return 0;
}
编译器为MS VC++。
我是否使用或不使用优化来构建此程序我可以使用十六进制编辑器在可执行文件中找到字符串“ABCDEFGHIJKLMNO”。
但是,什么是编译器这样做是otherstring不同,我不能找到字符串“ABCDEFGHIJKLMNO”
?
我使用的十六进制编辑器是Hexedit - 但尝试了其他人,仍然无法找到otherstring。任何人有任何想法为什么不或如何找到?
顺便说一下,我不是因为黑客的原因这样做。
你能找到字符串 “\ X00 \ X00 \ x00b \ X00 \ X00 \ x00c \ X00 \ X00 \ X00” 中的二进制文件(使用4个字节的每一个字母)? – pmg 2011-04-01 11:38:00
$ strings binary-file | grep“ABCDEFGHIJKLMNO” – Chappelle 2012-02-21 14:13:51