1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
|
ifstream d1("1.exe",ios::binary);
ifstream d2("2.exe",ios::binary);
ofstream offsets("offset.txt");
char c1, c2;
for(int i =0;d1.read(&c1,sizeof(char)) && d2.read(&c2,sizeof(char));i++)
{
if(c1 != c2)
offsets << i;
}
d1.close();
d2.close();
offsets.close(); |