Jump to content
Tuts 4 You

Can i attach a c-file to a c-compiler?


tukki_2020

Recommended Posts

Hey guys, i just want to brainstorm an idea so please be patient. I have made a c-program which writes all the images(rgb content) in a folder to a structure in another c-file( along with the needed code to compile and execute) and deletes the images. Now if i compile and run the new .c-file, i am able to restore these images lets say on providing a password or something.

But of-course i need a c-compiler to do the compiling. So i have the question:

1.> I want to make it independent in the sense that i want the compiler to travel with the original exe file and later when needed it compiles the second c-file that contains the structure for the images. Is it possible?

thanks in advance

Link to comment

why not dump your image data in a seperate file, and supply one "restore.exe" program which reads the file...?

why not encrypt the images themselfes in the first place...?

Link to comment

@deepzero: thanks

why not dump your image data in a seperate file, and supply one "restore.exe" program which reads the file...?

why not encrypt the images themselfes in the first place...?

These are nice ideas, i never thought about them. I guess i was obsessed with the attaching the compiler somehow. And i still am.

Can you help me with that.

Thanks

Link to comment

Distributing the compiler is a no-brainer, its going to greatly increase the size of each individual package distributed and unless the EULA allows for it, makes the distribution(s) illegal. At the very least it would generate some interesting AV interactions what with self compiling executables and all.

Even if you do attach the files together, are you then going to patch the compiler so that it knows how to extract the source file from itself and compile it? .) What about required dependencies like lib files or headers? The environment for the compiler?

A better idea (as deepzero has already suggested) would be to encrypt the picture files and embed them within the resource section of a stub executable which simply asks for a password from the user and attempts to decrypt a copy of the data it contains. If the data decrypts correctly (use hashes to check) then create a file on disk and write to it for each successfully decrypted picture.

HR,

Ghandi

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...