Hello!
Can someone give me an example of a simple patcher in c++,which uses fseek(),fwrite() and such functions please....i thought of doing it like this...but i think it's wrong
The Bytes i want to patch is at File Offset : 5B1 (1457)
and the bytes look like 6886304000 (push 00403068)
i want to push 00000000 at this Offset...how do i do this?
fptr=fopen(file,"r+");
if(fptr==NULL)
{
cout <<"::::Open File unsuccessful" << endl;
}
else
{
cout <<"::::Open File Successful" << endl;
fseek(fptr,1457,SEEK_SET);
fputs("00000000",fptr);
cout <<"::::Bytes written" << endl;
}
fclose(fptr);