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

Python 

Keylogger - Capturing keystrokes and get screenshot

Hello guys! :)

I want in my keylogger for Windows, feature, which every press Return key create screenshot, and send the screen to email + get the file path of active window.

If I compile the script i get (syntax) error

https://pastebin.com/36Fy22Fg
i didn't ran the script but I can see a indentation error, probably thats why.

edit: just noticed there are other errors

elif:


you can't use elif like that.
Ok.. That error is resolved.

New script:
https://pastebin.com/PCfurFpk
Error in line: hooks_manager = pyHook.HookManager()
Code
f.write(GetWindowText(GetForegroundWindow())

Missing a closing parentheses are we not?
Good god son, you need to try harder than this.
(Jul 11, 2017 06:06 AM)ASlopaR Wrote:  Hello guys! :)

I want in my keylogger for Windows, feature, which every press Return key create screenshot, and send the screen to email + get the file path of active window.

If I compile the script i get (syntax) error

https://pastebin.com/36Fy22Fg

🤝 seeing a few things thats wrong

PHP Code

<?php 
def Keylogee
():
    
def OnKeyboardEvent(event):
        
f = open(log_file, 'a')
        
f.write(event.Key)
        
f.close()
    if 
event.Key == 'Return':
        
f.write('\n')
        
f.write(GetWindowText(GetForegroundWindow()) 

my issue is here:

PHP Code

<?php 
f
.close()
    if 
event.Key == 'Return':
        
f.write('\n')
        
f.write(GetWindowText(GetForegroundWindow()) 

you close the file and then attempt to write to it,
Knowledge is Power - Be Powerful!!!!!


LIFE IS A CHALLENGE SO ACCEPT IT!
Problem has been solved.. (I'm sorry I did not say so long)
Compilation runs smoothly, without errors
My new problem is mail sending and writing info to log_file..
Code is here: https://pastebin.com/MvGVjHDV
If I run this script on my computer, log_file is created, If I open the log_file, shows only first line and nothing more..
If I press Return nothing (no screen, no change in log_file, no new mails sended to my mail)


Possibly Related Threads...
Thread / Author Replies Views Last Post
[C] by ShallowMEJan 11, 2020 11:07 PM 2 177 Jan 11, 2020 11:07 PM
Last Post: ShallowME
[C#] by trueFeb 27, 2018 03:25 AM 13 635 Feb 27, 2018 03:25 AM
Last Post: cocaine_monkey
[Python] by TheWarOwlJul 31, 2017 01:38 PM 2 511 Jul 31, 2017 01:38 PM
Last Post: TheWarOwl