Revision 1433
Added by markw about 1 year ago
find_offset.cpp | ||
---|---|---|
|
||
std::string pattern = argv[1];
|
||
int offset = atoi(argv[2]);
|
||
int len = atoi(argv[3]);
|
||
size_t len = atoi(argv[3]);
|
||
std::string find_in_here = argv[4];
|
||
|
||
FILE * p = fopen(pattern.c_str(),"rb");
|
||
... | ... | |
if (fread(match,1,len,f) !=len)
|
||
break;
|
||
found = true;
|
||
for (int i=0;i!=len;++i)
|
||
for (size_t i=0;i!=len;++i)
|
||
{
|
||
//printf("%d:%d:%02x %02x\n",file_offset,i,match[i],data[i]);
|
||
if (match[i]!=data[i])
|
Move tool build to own script. Added find_offset build.