/ Published in: C++
Well its a very simple code
-k9flow -from p7
Expand |
Embed | Plain Text
#include <iostream> #include <string> #include <windows.h> #include <iostream> #include <fstream> using namespace std; int main() { string task; string acc; string pass; string dele; string ran1; string yn; system("cls"); system("title WARNING, YOU MUST BE USING ADMIN MODE TO RUN THIS PROGRAM!!!!\n"); Sleep(1000); system("cls"); system("title AccountP V2"); system("color 4a"); cout << "Command: "; cin >> task; if (task == "help") { system("cls"); cout << "- These Are Commands You Can Excute Using V2 -\n"; cout << "\n"; cout << "help - View help info\n"; cout << "create - Create an user account\n"; cout << "delete - Delete an account\n"; cout << "view - View all accounts on this computer\n"; cout << "exit - Close program\n"; cout << "\n"; system("PAUSE"); main(); } if (task == "create") { system("cls"); cout << "Account Name: "; cin >> acc; ofstream accname; accname.open ("acc.bat"); accname << "net user /add " << acc; accname.close(); cout << "\n"; cout << "\n"; ofstream accpass; accpass.open ("accp.bat"); accpass << "net user " << acc << " *"; accpass.close(); system("C:\\accv2\\acc.bat"); Sleep(500); system("C:\\accv2\\accp.bat"); Sleep(500); system("cls"); cout << "\n"; cout << "\n"; cout << "Account Created!\n"; Sleep(1000); main(); } if (task == "view") { system("cls"); cout << "Accounts:::\n"; cout << "\n"; system("net user"); system("PAUSE"); main(); } if (task == "delete") { system("cls"); cout << "Current Accounts:::\n"; cout << "\n"; system("net user"); cout << "\n"; cout << "-- Type The Account Name 100% Correct Or It Won't Work -- \n"; cout << "\n"; cout << "Name: "; cin >> dele; ofstream del; del.open ("dela.bat"); del << "net user /delete " << dele; del.close(); system("cls"); cout << "\n"; cout << "\n"; system("C:\\accv2\\dela.bat"); cout << "\n"; system("PAUSE"); main(); } if (task == "ran1") { system("cls"); cout << "Are You Sure?\n"; cout << " ( y or n )\n"; cout << "Insert: "; cin >> yn; if (yn == "y") { system("exit"); } if (yn == "n") { main(); } return 0; } }
You need to login to post a comment.
