if anyone can explain this loop ,how is it working? it is a basic keylogger type of programm code reading keystrokes. how FOR loop over here is working?

0 shivam vashisht · July 12, 2015


int main(){
char i;

while(1){
for(i=8;i<=190;i++)
if(GetAsyncKeyState(i)==-32767)
save(i,"LOG.txt");


}


}
/* ****************************** */
/* ****************************** */


int save(int key_stroke,char *file ){


cout<<key_stroke<<endl;
}

Post a Reply

Replies

Oldest  Newest  Rating
0 c student · July 12, 2015
for any ascii values between 8 and 190, if it corresponds to a vKey in GetAsyncKeyState and returns a key pressed down, call save function
  • 1

C++

106,945 followers
About

Used in many types of software including music players, video games, and many large scale applications.

Links
Moderators
Bucky Roberts Administrator