r/Hacking_Tutorials • • Aug 21 '20

Tools Make your own KeyLogger in Python

Hello guys! I hope you are fine and safe! I have posted a tutorial in my site to make a KeyLogger in python which captures and sends the keystrokes to your mail! Also please make sure to keep the interval almost at 30 minutes or 1 hour. THIS IS ONLY MADE FOR EDUCATIONAL PURPOSES.

https://ardu-geek.weebly.com/python-projects/keylogger-using-python

Happy hacking!

307 Upvotes

27 comments sorted by

22

u/nggiahuy1102 Aug 21 '20

im confused, it sends each keystroke as an individual email?

32

u/[deleted] Aug 21 '20

Yes! That’s why I have told to keep interval longer like of 1 hr so all keystrokes of 1 hour will be recorded and sent after 1 hr

14

u/Musakuu Aug 21 '20

You nailed it.

11

u/[deleted] Aug 21 '20

Thank you !

36

u/LIyre Aug 21 '20

Haha I love the “EDUCATIONAL PURPOSES ONLY”, I know I’m not going to be doing anything... nefarious... but I can’t help but feel like I’m breaking a law

17

u/[deleted] Aug 21 '20

Hehe, Still it is good to mention because I am not going to be responsible for anything! And this is mainly made for penetration testing and education purpose.

4

u/[deleted] Aug 21 '20

Mainly? Lol

3

u/[deleted] Aug 21 '20

Hehe .....

11

u/[deleted] Aug 21 '20

I will try this out by night. But just a question, Does this require administrator privileges? Or will it also work with normal user?

I am asking because 2 years ago, I had made a kernel module for linux that logged keys as a course project. But of course installing the module required superuser privileges.

11

u/[deleted] Aug 21 '20

Hi!

No, It won't require any admin privileges. What you can do is, Compile the KeyLogger to EXE and then you can use it. Also, this keylogger is not stable. I have made another keylogger which works really good! I will post about it soon!

5

u/[deleted] Aug 21 '20

Looks interesting. I will definitely have a look into this

3

u/[deleted] Aug 21 '20

Sure! If you have any issues, you can contact me anytime here [email protected]

3

u/dahecksman Aug 21 '20

That’s a hacker email if I’ve ever seen one 😂

2

u/[deleted] Aug 22 '20

😂No bro, the school which I study in has given instructions to keep mail Id like this

2

u/[deleted] Aug 21 '20

How would you go about compiling a python script to a exe

1

u/[deleted] Aug 22 '20

You can use VySecator for obfuscating and compiling the KeyLogger to exe which makes it hard for Anti Virus to detect

3

u/gbbofh Aug 22 '20

There seem to exist several projects aiming to produce (or which have produced) compilers that output machine code, JIT compile to machine code, or C/C++. But most of them seem to only work on subsets of Python.

This old stack overflow post has some info about them. I don't know if any have advanced to the point that they support the entire language.

https://stackoverflow.com/questions/138521/is-it-feasible-to-compile-python-to-machine-code

2

u/CQsavage Aug 21 '20

Yeah

2

u/[deleted] Aug 22 '20

😊

1

u/Wicked_Python Aug 22 '20

BTW, How does it treat "Backspace".
Can you make it like if the victim writes "compoudbnd" and uses backspace it either do one of these two

  1. [backspaced] compoudbnd [backspaced] #I saw it one of the built-in keylogger, it also mentioned [Enter] etc in bracket instead of new line. Yes the formatting sucked.
    But you did good with that

  2. Remove it from the logs

1

u/[deleted] Aug 22 '20

Uhh 🤔You are right, I will make some update on it soon.

1

u/[deleted] Aug 22 '20

It doesn’t treat it that way

0

u/[deleted] Aug 21 '20

[deleted]

8

u/[deleted] Aug 21 '20

No it won't be to hard to add more functionalities, This KeyLogger is not really stable right now. I am making other KeyLogger which has more functions, I will release it soon!

0

u/[deleted] Aug 21 '20

[deleted]

1

u/[deleted] Aug 22 '20

Use Pyarmor to compile it to exe, It won’t be detected by Defender

1

u/[deleted] Aug 22 '20

Or use VySecator, A tool made by me which you can use for Obfuscstikg and compiling the KeyLogger to EXE

4

u/[deleted] Aug 21 '20

[removed] — view removed comment

2

u/[deleted] Aug 21 '20

Yes, you are correct here, I have a different KeyLogger made which can directly log all values and save it in a file. But I think getting a mail of Logged Values is more better. But still I will post about what you want!