Posted by Anonymous Thu 1st Mar 2007 00:50 - Syntax is C - 194 views
Download | New Post | Modify | Show line numbers
Download | New Post | Modify | Show line numbers
Description:
found this somewhere
found this somewhere
/* patch your proxy with this and it might work with ruff rose again */
#include
#include
#include
int main(int argc, char *argv[]){
if (argc < 2){
printf("usage: proxypatch
return 0;
}
FILE *i=fopen(argv[1], "rb");
if (!i){
printf("could not open input file!\n");
return 0;
}
char fn[512];
snprintf(fn, 512, "%s-patched.exe", argv[1]);
FILE *o=fopen(fn, "wb");
if (!o){
fclose(i);
printf("could not open output file!\n");
return 0;
}
unsigned char c[32] = {0x00,0x5e,0xbc,0xe2,0x61,0x3f,0xdd,0x83,0xc2,0x9c,0x7e,0x20,0xa3,0xfd,0x1f,0x41,
0x9d,0xc3,0x21,0x7f,0xfc,0xa2,0x40,0x1e,0x5f,0x01,0xe3,0xbd,0x3e,0x60,0x82,0xdc};
unsigned char b[32];
bool f=false;
int n;
while (!feof(i)){
n=fread(b,1,32,i);
if (memcmp(b,c,32) == 0 && n == 32){
f=true;
for(int k=0;k<32;k++)
b[k]=k;
fwrite(b,1,32,o);
} else {
fwrite(b,1,n,o);
}
}
fclose(o);
fclose(i);
if (!f){
printf( "signature not found, can't be patched!\n" );
unlink( fn );
} else {
printf( "file patched, written to: %s\n", fn );
}
return 0;
}
PermaLink to this entry https://pastebin.co.uk/11184
Posted by Anonymous Thu 1st Mar 2007 00:50 - Syntax is C - 194 views
Download | New Post | Modify | Show line numbers
Download | New Post | Modify | Show line numbers
Comments: 0