Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

Python 

PyLogger - Simple Universal Python Keylogger (Windows/Linux/Mac)

[Image: sNnOdjy.png]
Hey guys, I was just browsing through here when I came across a Python Keylogger thread by CAM; his code was horribly optimized, so I made it my job to make it better and improve on it.
I originally was going to make this Object Orientated, but I realized there is no point because it's really simple.

Now his will only work on Windows users due to the paths he was creating and using the PyWin32 modules. This one here is fully universal, I've tested it on Windows and Ubuntu, they both work fine.
I've managed to PEP8 the shit out of it, and halved it's size/bulk. The only down side is that I had to sacrifice the ability to grab the window title because it's part of PyWin32.

If you have not seen his thread what this will do is log every key pressed by the user, save it to a .log file and every hour upload it to an FTP server YOU define (you can set the time interval also).

This should be FUD. It's been coded in Python 3.5 and you'll need to install Pynput for it to work (pip install pynput).

Anyways here's the code, editing it is pretty self explanatory. Happy coding!
Spoiler (Click to View)
THERE IS AN UPDATED VERSION BELOW.

Here is what the log files look like (It's a strange layout, use your initiative when searching for logins, ctrl+f '@' would find when the user enters an email, if you know the person you could search for their common username, etc)
Spoiler (Click to View)

Feel free to improve! Have a great day.

UPDATED VERSION
Object orientated, copies to startup, Windows only.
I quickly whipped this up to add a few more features, enjoy!
Spoiler (Click to View)

P.S. Upon compiling remember to hide the console window!
Copy and paste the code here, contained within (code) and (/code) except using square brackets.
[Image: VFmqv4d.gif]
(Mar 16, 2017 05:12 PM)๖ۣۜSynapse Wrote:  Copy and paste the code here, contained within (code) and (/code) except using square brackets.

I would do, but Pastebin has syntax highlighting and the code tags are limited to a certain size box; is there an issue where you can't view it? If so, I'd be happy to post it within the code tags.
(Mar 16, 2017 05:15 PM)hunter24957 Wrote:  I would do, but Pastebin has syntax highlighting and the code tags are limited to a certain size box; is there an issue where you can't view it? If so, I'd be happy to post it within the code tags.

My mistake, I thought you posted a picture of the code, I just realized this HF theme makes the code tags look like screenshots, haha.
[Image: VFmqv4d.gif]
(Mar 16, 2017 05:32 PM)๖ۣۜSynapse Wrote:  My mistake, I thought you posted a picture of the code, I just realized this HF theme makes the code tags look like screenshots, haha.

Aha, it's all good man 🤝
This is awesome. Nice work. I've saved it and added it to my little collection.
(Mar 17, 2017 04:50 AM)Skidy Wrote:  This is awesome. Nice work. I've saved it and added it to my little collection.

haha, I feel honored. Enjoy 🤝


PROGRAM UPDATED. ✌
Really Nice. Can you code a RAT in python also from scratch??
(Mar 17, 2017 10:37 AM)EnigmaF0x Wrote:  Really Nice. Can you code a RAT in python also from scratch??

PM'd you about this 👍


Possibly Related Threads...
Thread / Author Replies Views Last Post
[.NET] by fisica638Oct 29, 2023 01:02 PM 10 403 Oct 29, 2023 01:02 PM
Last Post: fisica638
[Python] by Bass_ReevesAug 20, 2023 01:44 AM 9 632 Aug 20, 2023 01:44 AM
Last Post: Lucky4L
[Python] by Empery_1GAug 20, 2023 01:33 AM 2 227 Aug 20, 2023 01:33 AM
Last Post: Lucky4L