I have one last question about the software. How should I modify the code so instead of decrypting the files I can encypt them again using the same "CF10" signature. Thanks in advance.
TheDefenestrator
Posts
-
Program for decrypting graphic files in C. -
Program for decrypting graphic files in C.Yup I did exactly that. Topic can be closed. Thx for your help!
-
Program for decrypting graphic files in C.Ok I figured out the easy part (how to compile C code in Visual Studio). But now there are two problems left: a) When I try to compile the code from my first post i get this error: "
Error 1 error C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
EDIT: Ok I've dealt with this one by adding _CRT_SECURE_NO_WARNINGS to Preprocessor Definitions! b) When I deal with the bug above how to modify code so I can "show" the program which files I want to decrypt?
-
Program for decrypting graphic files in C.Makes total sense. Let's make it Visual Studio Express 2013 for Desktop to be precise then.
-
Program for decrypting graphic files in C.To be honest I have no preferences and I can be flexible. I doubt I'll use C again in my life. I have acces to Visual Studio but isn't it only for Visual C++, C$ and VB?
-
Program for decrypting graphic files in C.Hello, Quick prerequisite: I'm graphic designer and I have no idea about programing. Long story short I want to modify some graphic files but they are encrypted. I already have the code in C for decrypting them but I have no idea how to make it into working program. Also I have no idea about C language syntax so I'm not sure if I need to modify this code so I can show the program files I need to decrypt. I would be very grateful if someone could help me with this.
#include int main (int argc, char **argv)
{
FILE *inp, *outp;
int i;
char sig[] = "CF10", *ptr;if (argc != 3) { printf ("usage: decode \[input\] \[output\]\\n"); return -1; } inp = fopen (argv\[1\], "rb"); if (inp == NULL) { printf ("bad input file '%s'\\n", argv\[1\]); return -2; } ptr = sig; while (\*ptr) { i = fgetc (inp); if (\*ptr != i) { printf ("input file sig is not 'CF10'\\n"); return -2; } ptr++; } outp = fopen (argv\[2\], "wb"); if (outp == NULL) { printf ("bad output file '%s'\\n", argv\[1\]); return -2; } do { i = fgetc(inp); if (i != EOF) fputc (i ^ 0x8d, outp); } while (i != EOF); fclose (inp); fclose (outp); printf ("all done. bye bye\\n"); return 0;
}