实时警报通知:微信告警通知的重要性解析
938
2023-02-12
[sh2log]Linux键盘记录 keylogger notes
不仅可以记录到击键信息,而且包括终端下的输出信息
编译选项
1 2 3 4 5 6 7 8 9 10 11 | [root@Centos sh2log-1.0]# make Please specify the target: make linux make freebsd make openbsd make cygwin make sunos make irix make hpux make aix make osf |
如下:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | [root@Centos sh2log-1.0]# make linux gcc-g-W-Wall-osh2log rc4.csha1.csh2log.c-lutil-DLINUX gcc-g-W-Wall-osh2logd rc4.csha1.csh2logd.c gcc-g-W-Wall-oparser rc4.csha1.cparser.c-lX11-L/usr/X11R6/lib parser.c:35:22:error:X11/Xlib.h:No such file ordirectory parser.c:Infunction‘main’: parser.c:291:error:‘Display’undeclared(first useinthisfunction) parser.c:291:error:(Eachundeclared identifier isreported only once parser.c:291:error:foreachfunctionit appears in.) parser.c:291:error:‘dpi’undeclared(first useinthisfunction) parser.c:292:error:‘Window’undeclared(first useinthisfunction) parser.c:292:error:expected‘;’before‘wnd’ parser.c:293:error:‘XWindowAttributes’undeclared(first useinthisfunction) parser.c:293:error:expected‘;’before‘xwa’ parser.c:515:warning:implicit declaration of function‘XOpenDisplay’ parser.c:522:error:‘wnd’undeclared(first useinthisfunction) parser.c:524:warning:implicit declaration of function‘XSetWindowBorderWidth’ parser.c:525:warning:implicit declaration of function‘XSync’ parser.c:525:error:‘False’undeclared(first useinthisfunction) parser.c:526:warning:implicit declaration of function‘XGetWindowAttributes’ parser.c:526:error:‘xwa’undeclared(first useinthisfunction) parser.c:714:warning:implicit declaration of function‘XMoveResizeWindow’ parser.c:772:warning:implicit declaration of function‘XCloseDisplay’ make:***[linux]Error1 |
错误:
1 | parser.c:35:22:error:X11/Xlib.h:No such file ordirectory |
安装X11
1 | [root@Centos sh2log-1.0]# yum install libX11-devel |
再编译:
1 2 3 4 | [root@Centos sh2log-1.0]# make linux gcc-g-W-Wall-osh2log rc4.csha1.csh2log.c-lutil-DLINUX gcc-g-W-Wall-osh2logd rc4.csha1.csh2logd.c gcc-g-W-Wall-oparser rc4.csha1.cparser.c-lX11-L/usr/X11R6/lib |
先删除演示:
1 | [root@Centos sh2log-1.0]# rm test.bin |
配置:
发现sh2logd 已经启动了 当前目录下生成了以时间命名的BIN文件
1 | -rw-------1root root0Jan705:24sh2log-20130107-052402.bin |
查看记录
先打开个终端操作以下:
1 2 3 4 5 6 7 8 9 10 | [root@Centos log]# bash [root@Centos log]# ls -la total112 drwxr-xr-x3root root4096Jan705:17. drwxrwxrwt17root root4096Jan705:18.. drwxr-xr-x2root root4096Jan705:24sh2log-1.0 -rw-r--r--1root root80240Nov82006sh2log-1.0.tgz [root@Centos log]# pwd /tmp/log [root@Centos log]# |
查看日志:
1 2 3 4 5 6 7 8 9 10 | [root@Centos sh2log-1.0]# ./parser sh2log-20130107-052402.bin SID SOURCE IP UID PID START DATE ENDDATE DURATION 1[127.0.0.1]0(27293)07/0105:25|07/0105:25X03s 2[127.0.0.1]0(27407)07/0105:26|07/0105:26X02s Ininteractive mode,useEnter tofast forward,Space topause andqtoquit. Note that xterm isrequired forwindow resizing. Session ID->2 Interactive mode(y/n)?n 07/0105:26:53->ls-la 07/0105:26:53->pwd |
发表评论
暂时没有评论,来抢沙发吧~