Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
T

TheDefenestrator

@TheDefenestrator
About
Posts
6
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Program for decrypting graphic files in C.
    T TheDefenestrator

    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.

    C / C++ / MFC help tutorial

  • Program for decrypting graphic files in C.
    T TheDefenestrator

    Yup I did exactly that. Topic can be closed. Thx for your help!

    C / C++ / MFC help tutorial

  • Program for decrypting graphic files in C.
    T TheDefenestrator

    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?

    C / C++ / MFC help tutorial

  • Program for decrypting graphic files in C.
    T TheDefenestrator

    Makes total sense. Let's make it Visual Studio Express 2013 for Desktop to be precise then.

    C / C++ / MFC help tutorial

  • Program for decrypting graphic files in C.
    T TheDefenestrator

    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?

    C / C++ / MFC help tutorial

  • Program for decrypting graphic files in C.
    T TheDefenestrator

    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;
    

    }

    C / C++ / MFC help tutorial
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups