NGen

Untitled

Aug 30th, 2011
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.74 KB | None | 0 0
  1. #include <windows.h>
  2. #include <string>
  3. #include <array>
  4. #include <iostream>
  5. #include <fstream>
  6.  
  7. int NumbersHit = 0;
  8.  
  9. char letters[24];
  10.  
  11. int main()
  12. {
  13.     while(!GetAsyncKeyState(VK_ESCAPE))
  14.     {
  15.         if(GetAsyncKeyState('W'))
  16.         {
  17.             NumbersHit++;
  18.             letters[NumbersHit] = 'w';
  19.         }
  20.         if(GetAsyncKeyState('S'))
  21.         {
  22.             NumbersHit++;
  23.             letters[NumbersHit] = 's';
  24.         }
  25.         if(GetAsyncKeyState(VK_CONTROL) && GetAsyncKeyState(VK_RETURN))
  26.         {
  27.             MessageBoxA(NULL, "should be moving files", "what!?", MB_OK);
  28.             std::ofstream Output;
  29.             Output.open("password.txt");
  30.             for(int i = 0; i < NumbersHit; i++)
  31.             {
  32.                 Output << letters[i] << std::endl;
  33.             }
  34.             Output.close (); // Finalize the changes
  35.         }
  36.  
  37.         NumbersHit = 0;
  38.     }
  39.  
  40.     return 0;
  41. }
Advertisement
Add Comment
Please, Sign In to add comment