12-15-2009, 05:41 AM
Well hackforums.net is down atm and i'm bored. Jus a simple code to let you guys see how to encrypt an entire file and put in in a different file encrypted, which you can then decrypt it. It's not the scantime crypter source code with stub and builder but just the encryption decryption function.
Let me know what you guys think.
Code:
/// rot 128
int Rot128_FileToFile(char *Filename_In, char *Filename_Out)
{
FILE *Copy = fopen(Filename_In, "rb");
FILE *Paste = fopen(Filename_Out, "wb");
if(!Copy || !Paste)
return -1;
int c;
while((c = fgetc(Copy)) != EOF)
{
// works with 128, 120 too weird.
if(c >= 0 && c <= 127)
c+=128;
else c-=128;
fprintf(Paste, "%c", c);
}
fclose(Copy);
fclose(Paste);
return 1;
}
Let me know what you guys think.