Python Keylogger

[b][red]This message was edited by kelcha at 2004-12-15 16:21:17[/red][/b][hr]
hey i was wandering what i would use to write a python based keylogger,

i am wanting this to check if people are on my comp while im gone.

i would like chars and numbers to be recorded to file...
thx for any help

edit: just so yall know im not asking for the entire code just how to get the key pressed... and save that key to a variable or write it to the file...

of course the more code your willing to share the more i would like as itll help me understand better so i dont needd to ask for help as much...

Comments

  • : [b][red]This message was edited by kelcha at 2004-12-15 16:21:17[/red][/b][hr]
    : hey i was wandering what i would use to write a python based keylogger,
    :
    : i am wanting this to check if people are on my comp while im gone.
    :
    : i would like chars and numbers to be recorded to file...
    : thx for any help
    :
    : edit: just so yall know im not asking for the entire code just how to get the key pressed... and save that key to a variable or write it to the file...
    :
    : of course the more code your willing to share the more i would like as itll help me understand better so i dont needd to ask for help as much...

    This may depend on the operating system you are running on. Normally a program only receives key events if it has focus, so you would have to tap into the API for the OS to capture such things while running in the background.

    Windows has an API function, GetAsyncKeyState, which is probably available in the win32 extensions for Python. The problem there is that it will only tell you the state of a single key at the moment the function is called.

    What I think you need to look for are called "system hooks". I've never written any and I've only seen them mentioned in VB, but it should be possible to write them in Python too.



    [size=5][italic][blue][RED]i[/RED]nfidel[/blue][/italic][/size]

    [code]
    $ select * from users where clue > 0
    no rows returned
    [/code]

  • : : [b][red]This message was edited by kelcha at 2004-12-15 16:21:17[/red][/b][hr]
    : : hey i was wandering what i would use to write a python based keylogger,
    : :
    : : i am wanting this to check if people are on my comp while im gone.
    : :
    : : i would like chars and numbers to be recorded to file...
    : : thx for any help
    : :
    : : edit: just so yall know im not asking for the entire code just how to get the key pressed... and save that key to a variable or write it to the file...
    : :
    : : of course the more code your willing to share the more i would like as itll help me understand better so i dont needd to ask for help as much...
    :
    : This may depend on the operating system you are running on. Normally a program only receives key events if it has focus, so you would have to tap into the API for the OS to capture such things while running in the background.
    :
    : Windows has an API function, GetAsyncKeyState, which is probably available in the win32 extensions for Python. The problem there is that it will only tell you the state of a single key at the moment the function is called.
    :
    : What I think you need to look for are called "system hooks". I've never written any and I've only seen them mentioned in VB, but it should be possible to write them in Python too.
    :
    :
    :
    : [size=5][italic][blue][RED]i[/RED]nfidel[/blue][/italic][/size]
    :
    : [code]
    : $ select * from users where clue > 0
    : no rows returned
    : [/code]
    :
    :

    ok... well im running windows XP... well ill try to find some stuff for system hooks and if anyone has some code that i could try to work with or just use it as a guide i would appreciate that too... thx
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories