Compile .cpp from .exe on any computer

closed account (NAXz3TCk)
Hey guys,

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...

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#include <iostream>
using namespace 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!
whoops, hehe sorry bout thte lack of a link.

Yay.

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.
Last edited on
What compiler are you using?
closed account (NAXz3TCk)
@kbw

I am using the c++ visual studio 2010

@ultifinitus

Thank you for the offer, I will PM you.
closed account (NAXz3TCk)
@ultifinitus
Actually, I guess I cannot PM you. Do you have an email?
pretty easy: ultifinitus@gmail.com
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:

http://www.penguin.cz/~literakl/intel/intel.html
closed account (S6k9GNh0)
I know a fair amount of c++, so please do not be mean. Anyway, I am thinking that I could use something like this...

system("To Compile the program");


good game
Make a sub program (the one that should be generated). Then make another program (the main program) and add the sub program as a resource.


I hope that helps.
Kiana
He's not trying to write a keylogger


He was, actually. However that's beside the point and he's actually talking about the linking phase.
The keylogger was his example - he wanted to mimic how it could spawn separate programs.
He emailed me.
Haha, you win.
Topic archived. No new replies allowed.