I am trying to run a program that will generate another program. I know a fair amount of c++, so please do not be mean. Anyway, I am thinking that I could use something like this...
#include <iostream>
usingnamespace std;
#include <windows.h>
void createFile();
int main()
{
createFile();
system("To Compile the program");
return 0;
}
void createFile()
{
FILE *OUTPUT_FILE = fopen("other.cpp", "a+");
fprintf( OUTPUT_FILE, "All of the code of the file, but replacing the user input." );
fclose(OUTPUT_FILE);
}
I am not sure how I would make sure that the client had all of the correct libraries and compilers and stuff. Is there another way of making the .exe? Although I am not promoting keylogging, there is a program called Ardamax Keylogger that creates a custom .exe. I am really curious as to how I would be able to accomplish that kind of program.
Thank you guys in advanced!
Freddie
P.S. If the admin of the website read this, THANK YOU SO MUCH. This site has been my lifeline in my c++ course at school. It is organized and very detailed. Thank you!
Also depending on what you want to keylog, and how, contact me and I maaaaay help. If you satisfy me that your reasoning is good and you won't get into any mischief and you won't go spreading my code around.
He's not trying to write a keylogger nor is his compiler of any relevance. He's trying to write a program which will transliterate C++ code into byte-code which is what a compiler does.
With all due respect, I think this project is too difficult for you and I'd recommend picking up an easier project. That being said, if you want to continue with this, here's a link: