GithubHelp home page GithubHelp logo

osx-keylogger's Introduction

OSX-Keylogger

Features

  • Records the keys you pressed in a log file along with the time
  • Records mouse clicks (both left and right)
  • Records mouse stats
    • Mouse movements
      • Total distance
      • Distance x and y
      • Average x and y
      • Positive and negative x and y
    • Scroll wheel movements
      • Total distance
      • Distance x and y
      • Average x and y
      • Positive and negative x and y
  • Constantly saves the file to ensure no lost data
  • Saves file in an easy format for reading into other applications
  • Saves files for keyboard buttons, mouse buttons, and both in three seperate log files
Features to be added
  • For some reason it only saves the a-z, 0-9 keys, punctuation, and whitespace keys. I am working on getting it to save the modifier keys as well as backspace and function keys.
  • Getting rid of that stupid System Preferences bug (see below)
  • Expanding to add the user options such as more control over:
    • which keys are recorded
    • format of saved file
    • format of saved time
    • Schedule of when to save keys
    • Easy button to start or stop keylogging

Installation

Requires Python 2.7

This keylogger requires some dependencies from other sources.

Install PyObjC from this website in order for the app to work. I had to perform a manual installation, which is featured lower down on the website.

If you are using IDLE, follow these instructions. I am unaware of the requirements for other Python IDEs.

Since System Preferences is stupid, you must add IDLE to the Accessibility pane in the Security page.

Go to System Preferences, Security & Privacy, Privacy, Accessibility, then add basically all of the apps in your Python folder. I added IDLE, Python Launcher, and Build Applet. I'm not sure which are required since I am lazy, just do it. Also everytime you run it, IDLE will get unchecked from the pane so you will have to check it again. Although it might just be me. Who knows.

Usage

In the actual python file, replace the given path with where you want the log file to be saved.

Remember to add IDLE to the security pane in System Preferences each time. My apologies, I am working on a fix for that. However, the script should keep running if you close your laptop, so this should not happen often.

osx-keylogger's People

Contributors

counterfeitllama avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

osx-keylogger's Issues

No module named keycode

Hi @CounterfeitLlama,

OSX 10.11.6

When i'm trying to launch the command :

# python2.6 --version
Python 2.6.9

# I already did : pip install -U pyobjc

# python2.6 Keylogger2.py
Traceback (most recent call last):
  File "Keylogger2.py", line 24, in <module>
    import keycode
ImportError: No module named keycode

May you have you an idea ?

Thanks !

It's not working for me

I followed all the steps, about the IDLE, Python Launcher... tried with python2 and 3 (making the necessary adjustments), I've download source and installed the keycode module and changed the paths.

When I run it, the terminal gets stuck (not even ctrl+c kills it, just ctrl+z) and no log file is created when I try to type in or out the terminal.

Can you help me please?

Unable to close the application from terminal on pressing ctrl+C

I use python Keylogger2.py
when I press ctrl+C i get following error and app is still running.

^C2017-06-13 16:20:22.390 Python[1094:45293] An uncaught exception was raised
2017-06-13 16:20:22.390 Python[1094:45293] <type 'exceptions.KeyboardInterrupt'>:
2017-06-13 16:20:22.392 Python[1094:45293] (
0 CoreFoundation 0x00007fff9d033452 __exceptionPreprocess + 178
1 libobjc.A.dylib 0x00007fff9da53f7e objc_exception_throw + 48
2 CoreFoundation 0x00007fff9d033399 -[NSException raise] + 9
3 _objc.so 0x0000000104283ba4 PyObjCErr_ToObjCWithGILState + 46
4 _objc.so 0x0000000104270792 PyObjCFFI_MakeClosure + 5033
5 libffi.dylib 0x00007fff93924a24 ffi_closure_unix64_inner + 516
6 libffi.dylib 0x00007fff93924096 ffi_closure_unix64 + 70
7 HIToolbox 0x00007fff92d0c7be _ZL23DispatchEventToHandlersP14EventTargetRecP14OpaqueEventRefP14HandlerCallRec + 1231
8 HIToolbox 0x00007fff92d0bc48 _ZL30SendEventToEventTargetInternalP14OpaqueEventRefP20OpaqueEventTargetRefP14HandlerCallRec + 404
9 HIToolbox 0x00007fff92d0baab SendEventToEventTargetWithOptions + 43
10 HIToolbox 0x00007fff92d4908d _ZL29ToolboxEventDispatcherHandlerP25OpaqueEventHandlerCallRefP14OpaqueEventRefPv + 2029
11 HIToolbox 0x00007fff92d0ce0f _ZL23DispatchEventToHandlersP14EventTargetRecP14OpaqueEventRefP14HandlerCallRec + 2848
12 HIToolbox 0x00007fff92d0bc48 _ZL30SendEventToEventTargetInternalP14OpaqueEventRefP20OpaqueEventTargetRefP14HandlerCallRec + 404
13 HIToolbox 0x00007fff92d219e6 SendEventToEventTarget + 40
14 AppKit 0x00007fff947fa5e9 _DPSNextEvent + 3102
15 AppKit 0x00007fff947f9226 -[NSApplication _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 454
16 AppKit 0x00007fff947edd80 -[NSApplication run] + 682
17 libffi.dylib 0x00007fff93923f14 ffi_call_unix64 + 76
18 ??? 0x00007ff99e1626b0 0x0 + 140710075836080
)

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.