PyKeylogger accepts a few commandline options to customize its behavior:
usage: keylogger.pyw [options]
options:
--version show program's version number and exit
-h, --help show this help message and exit
-d, --debug debug mode (print output to console instead of the log
file) [default: False]
-c CONFIGFILE, --configfile=CONFIGFILE
filename of the configuration ini file. [default:
pykeylogger.ini]
-v CONFIGVAL, --configval=CONFIGVAL
filename of the configuration validation file.
[default: pykeylogger.val]
Whenever you need to see some console output (which you do when running in debug mode with "-d", or to get the above help message with "-h"), make sure you run
keylogger_debug.exe -d
(or -h), if you are running binary, and
python keylogger.pyw -d
(or -h) when running from source. Just "keylogger.exe -d" or "keylogger.pyw -d" will not bring up a console window, and you will not see anything.
The rest of the options are passed to PyKeylogger through the .ini file, which you can edit using the control panel (avoid editing the .ini manually, as that bypasses all the input error checking done by the GUI).
PyKeylogger now supports TLS SMTP encryption, and thus can work with Gmail, Yahoo, and other providers that let you use secure SMTP. Instructions for some of the specific providers follow.
Here are the instructions to set up PyKeylogger to use your Gmail account:
Here are the instructions to set up PyKeylogger to use your Yahoo mail account:
Now, go ahead, give it a test run - In the Actions menu select Send logs by email and watch your target email account for those logs!
If you don't get the email within 5-10 minutes, something is wrong with your setup. Check the spelling of your password, username, and the rest of the configuration items. If that fails, try running pykeylogger in debug mode (see instructions above), and run the Send logs by email action - watch the debug output scroll by, and see if it gives you any clues. If you can't figure it out, feel free to post it in the forums and someone will help. :)
Here are the instructions to set up PyKeylogger to upload logs to an FTP server of your choice, using the FTP tab of the control panel:
Use the registry editor (regedit) and navigate to the following key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
Once there, create a new string value (name it anything you like, e.g. "keylogger" or "innocentprogram").
For the content of this new string value, enter the following:
"C:\Path\pykeylogger.exe"
If you have placed the .ini and .val files in a directory different from where you have placed the executable, then enter the following (including the quotes and everything):
"C:\Path\pykeylogger.exe" -c "C:\Path\pykeylogger.ini" -v "C:\Path\pykeylogger.val"
where you of course replace "C:\Path\" with the actual full paths to the pykeylogger binary, and your .ini and .val files.
As per user suggestion, you can also schedule the keylogger to start using the Windows task scheduler. Just open up the task scheduler, and add a task to start PyKeylogger on startup with administrator privileges.
Probably the easiest way to start on "startup" would be to add a task to your user session's startup programs list, in your desktop environment.
If you know what you're doing, you could also stick a startup script into /etc/init.d (make sure that it starts after X), or create a .desktop file in /etc/xdg/autostart.
There are situations when you may want PyKeylogger to be stealthy. Here are some tips on how to increase stealth.
As of version 0.9.0, PyKeylogger logs to one delimited file (with default delimiter being pipe '|'). This facilitates the process of importing the data into a spreadsheet or database for easy filtering and manipulation. This is much simpler and more robust than the log file formats for versions prior to 0.9.0. You can also of course open the file in any text editor of your choice (see "prior to 0.9.0" section for some tips regarding this).
The data fields are the following (in order):
To keep the file consistent, when a user types the actual separator key (e.g. the pipe, '|', if you kept the default), the keystrokes logged will actually show the string "[sep_key]". So, after you import the data, you may wish to replace all occurrences of "[sep_key]" with the actual delimiting character.
Before checking your log file, open the PyKeylogger control panel, and choose Actions > Flush Write Buffers from the menu, if you want to look at the most recent input.
One user suggests that opening the logfile as an RTF in OpenOffice works well, too.
The log files are organized in directories, where each directory is named after the application name whose window you were typing into. Inside those directories, there are multiple text files, each file named by date, unique window handle, and window title. Thus, if you want to find what you typed in notepad, first go to the notepad directory, then find the log file by date and window title. If you are running with the --onefile option, however, everything just goes into one file.
The log file has two non-printable characters in it: backspace, and escape. Thus, opening the file with Notepad or Wordpad, you will see a lot of "junk" characters, if you press a lot of backspace (which I do). To read the file properly (where backspace and escape are marked as such), use the excellent editor called SciTE.
If you want to use windows notepad or wordpad, you may want to clean up the log file, by modifying the filter in PyKeylogger to substitute a string for those characters, as well as putting in \n\r instead of just \n in order to get the linebreaks in notepad to show up. This can be accomplished by setting these options in the PyKeylogger control panel.
Before checking your log file, open the PyKeylogger control panel, and choose Actions > Flush Write Buffers from the menu, if you want to look at the most recent input. If you use Wordpad, you will notice that Wordpad refuses to open a file that is being used, so you will have to make a copy of the logfile and open the copy with Wordpad, rather than open the logfile directly.
As of version 0.6.6, PyKeylogger automatically flushes the file write buffer periodically, so that even in the event of a system crash, you are less likely to lose the recent input. [Thanks to anonymous forum poster for this suggestion.]
Wiki: Download_Instructions
Wiki: Frequently_Asked_Questions
Wiki: Installation_Instructions
Wiki: Main_Page