Coder Social home page Coder Social logo

alvinkuruvilla / kmlog Goto Github PK

View Code? Open in Web Editor NEW
2.0 3.0 3.0 222 KB

A sleek and lightweight Python TUI application to collect typing dynamics data from real people

License: MIT License

Python 99.65% Shell 0.35%
python3 datacollection sql yaml keylogging

kmlog's People

Contributors

alvinkuruvilla avatar radaley avatar rajeshjnu2006 avatar rishvantsingh avatar snyk-bot avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

kmlog's Issues

Add a Directory Watcher to cleanup partially created/empty files

The project should handle incomplete file creation, ie the user stopped the program before finishing inputting their info, or the keylogger made a file but the user did not type into it or stopped immediately after, a little better. To implement this we could consider the watchdog package

TypeError: list indices must be integers or slices, not tuple when printing the user information table when running as a shell executable on Mac and on Windows when creating a new user

After submitting the information needed to create a new user, KMLogger tries to display the information as a PrettyTable. The same is also true when displaying a returning user's saved information. When running locally this seems to work without issue. However, when running as a standalone shell executable or on Windows this functionality results in:

Traceback (most recent call last):
 File "tui.py", line 164, in <module>
 File "tui.py", line 135, in run
 File "base/user_ops/yml_ops.py", line 111, in create_user
 File "base/user_ops/yml_ops.py", line 65, in tuple_to_dict
TypeError: list indices must be integers or slices, not tuple

Add support for more backends

It could be good for project longevity to support alternative backends to store user information. But we must only store the bare minimum user information. To support these backends I think the best approach to this at the moment is to create thin wrapper classes around them, similar to what I did for YAML and MySQL. Some ideas for other backends include but are not limited to:

  • [] JSON
  • [] Postgress (I just came up with this one on the fly
  • [] Maybe other more secure local storage file formats
    I'm open to suggestions

Typing "other" gender during user registration crashes the program

Suppose the user selects another for the gender and completes the rest of the registration procedure. In that case, the app crashes before displaying the final table of user information with the following exception:
UnboundLocalError: local variable 'expanded_gender' referenced before assignment

Create a requirements.txt file

It's obnoxious to have to manually install dependencies. Especially with the MySQL connector dependency, because if the wrong one is installed kmlog will still fail to build

It could also be interesting if there was some form of conditional installation because if MySQL is not installed on the host system, that could mean that the user does not want to use it, so why should we force them to install it anyway?

Error user input prompts when given whitespace or raw Enter rather than crashing

Currently at any point where we wait for user keyboard input, if the user provides any whitespace as part of their input or just presses enter, we crash the application because we directly convert the user's input to an int with int() . Rather than crashing we should swallow the error, display an error to the user about bad input, and then just re-prompt them.

Use localhost.run to expose kmlog as a public service

My idea behind this is to use localhost.run to expose kmlog so clients on other computers can connect to a unique URL and we can collect keystrokes that way. This will allow them to run our data collection protocol directly from their computer and we can just intercept their keystrokes as web requests to our URL (or at least that's my initial idea). To collect their metadata we can just expose a web interface asking for some personal information which we will store securely as normal
This video shows how we can expose the service to the internet
https://www.youtube.com/watch?v=111ZDMKVTL4

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.