Skip to content

Commit f67ee42

Browse files
authored
Create readme.md
1 parent 87a6f12 commit f67ee42

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

Keylogger/readme.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Keylogger in Go
2+
3+
This Go program is a simple keylogger that monitors keyboard input and logs it to a file. Below is an explanation of its components:
4+
5+
## How It Works
6+
7+
- **GetAsyncKeyState**: This function checks the state of a specified virtual key. It is used to detect key presses.
8+
- **GetKeyboardState**: This function retrieves the status of all virtual keys. It is used to check the current state of the keyboard.
9+
- **MapVirtualKeyW**: This function translates a virtual-key code into a scan code or character value. It is used to translate virtual key codes to Unicode.
10+
- **ToUnicode**: This function translates the specified virtual-key code and keyboard state to the corresponding Unicode character or characters.
11+
12+
The program continuously loops to monitor key presses and writes the corresponding Unicode characters to a log file located at `C:\temp\keylogger.txt`.
13+
14+
## Usage
15+
16+
To run the program, simply compile it using the Go compiler and execute the resulting binary. The program will start monitoring keyboard input and logging it to the specified file.
17+
18+
```bash
19+
go build main.go
20+
.\main.exe
21+
```
22+
23+
## Disclaimer
24+
25+
This program is intended for educational purposes only. It is meant to demonstrate how keyloggers work and how they can be implemented in Go. It should not be used for malicious purposes.
26+
27+
## License
28+
29+
This program is released under the Unlicense, which allows anyone to use, modify, and distribute the code freely, without restrictions.

0 commit comments

Comments
 (0)