HiveBrain v1.2.0
Get Started
← Back to all entries
patternpythonMinor

Python Keylogger With Built In Security Measures

Submitted by: @import:stackexchange-codereview··
0
Viewed 0 times
builtwithsecuritypythonkeyloggermeasures

Problem

The program I have developed is currently used for detecting and recording keystrokes. I have added some built in security measures that can easily(somewhat) be modified to suit individual user needs!

I won't go into the mechanics because the Source is readily available and easily understandable! I realize that this has been done hundreds of times but I learned a lot along the way and had tons of fun! And now we start!!

Program Output File has unique formatting for easy readability. The
cases are easily editable! Current cases include:

  • Errors



  • Exceptions



  • Special (email/password)



  • Inappropriate (Pornographic etc...)



  • Default (For anything else)



Current security measures include:

  • Screen Capture and Webcam picture, merged with a timestamp to capture the user, the current screen, and the time! -Image Below-



  • The default keyLog!



Currently the program checks for specific rules in keystrokes to be met before using security measures, such as:

  • If text contains porn, pornagraphy, sex (other explicit terms) it issues the security measure that records user and screen



  • If text contains @ it expects this to be an email and therefore expects the next input to be a password! This is then denoted in the keyLog!



Additional Features Include:

  • Runs silently in the background, the user can enter a specific set of input to pause, start, decrypt, encrypt, exit the logger!



  • Relatively low memory usage!!!



  • Encryption and Decryption of keyLogs available via custom Encryption Modules (also available for review!)



  • Currently an .exe version (Although I am having several issues currently)



Current Known Issues:

  • Not multi-platform compatible, Currently Only works on Windows



  • Minimal checking for user camera



  • Not fully documented



  • There are probably a lot of code inefficiencies



  • Python 2.7 dependant



Includes the base Logging class only. Security, Encryption, Constants, settings, build/dist/.exe .bat can be found at GitHub!
Okay I guess there is n

Solution

Suggestion:
Have a list of words that it checks for instead of hard coding the words it checks for.

The 'easiest' way would be to create something like:

keywords = ['explicit1', 'explicit2', 'explicit3']


Or my preferred method would be to create a .txt file with a list of words separated by newlines and reading those words from the file into a list:

with open(fname) as f:
    keywords = f.readlines()


And then do the following in your main file:

for word in keywords:
    if word in string: return true

Code Snippets

keywords = ['explicit1', 'explicit2', 'explicit3']
with open(fname) as f:
    keywords = f.readlines()
for word in keywords:
    if word in string: return true

Context

StackExchange Code Review Q#125818, answer score: 5

Revisions (0)

No revisions yet.