Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- File: System Tools.cpp
- Author: Z3r0
- Synopsis: This is just a small reference progam
- */
- #include <iostream>
- #include <cstdlib>
- #include <cstdio>
- #include <ctime>
- #include <string>
- #include <fstream>
- #include <stdio.h>
- #include <stdlib.h>
- #include <windows.h>
- #include <shellAPI.h>
- #include <dos.h>
- #include <unistd.h>
- #include <conio.h>
- #define CLRSCR system("cls");
- #define SLEEP Sleep(10000);
- #define PAUSE system("PAUSE");
- #define COLOR system("color 1f");
- #define AUTHOR "Z3r0"
- #define EXIT exit(0);
- using namespace std;
- int main(int argc, char *argv[]) {
- COLOR
- int a;
- int b;
- int c;
- int d;
- int e;
- int f;
- int firstadditionnumber;
- int secoundadditionnumber;
- int sum;
- int firstsubtractionnumber;
- int secoundsubtractionnumber;
- int subtractanswer;
- int firstmultiplicationnumber;
- int secoundmultiplicationnumber;
- int multiplicationanswer;
- int firstdivisionnumber;
- int secounddivisionnumber;
- int divisonanswer;
- int firstmodulonumber;
- int secoundmodulonumber;
- int modulonumber;
- int standardwebchoice;
- int shutdownchoice;
- int cmdchoice;
- int instructablescmdchoice;
- int openlinkcommandprompt;
- string linkone = "http://www.google.com";
- string linktwo = "https://www.bing.com/?toWww=1&redig=BD5850EE305849AE8C3F25753143BCED";
- string linkthree = "https://www.ask.com";
- string linkfour = "https://www.cnn.com";
- string linkfive = "https://www.foxnews.com";
- string linksix = "https://www.securityfocus.com";
- string linkseven = "https://www.wikipedia.org";
- string linkeight = "https://www.instructables.com/id/How-to-make-the-BEST-Command-Prtompt-cmd/";
- string linknine = "https://www.instructables.com/id/How-to-create-your-own-command-prompt-in-windows-x/";
- string linkten = "https://ghostbin.com/paste/hz5j7";
- string linkeleven = "https://ghostbin.com/paste/kqv4r";
- string url;
- cout << "Welcome to System Tools by Z3r0\n" << endl;
- cout << "Please select an option\n" << endl;
- cout << "[1] Calculator\n" << endl;
- cout << "[2] Time\n" << endl;
- cout << "[3] Open links\n" << endl;
- cout << "[4] Run System info/scan\n" << endl;
- cout << "[5] Run one or more commands\n" << endl;
- cout << "[6] Spawn 'file'\n" << endl;
- cout << "[7] Exit Program\n" << endl;
- cout << "[8] Shutdown Computer\n" << endl;
- cout << "Please select an option:\t " << endl;
- cin>>a;
- if(a == 1) {
- PAUSE
- CLRSCR
- cout << "Welcome to The calcuator program\n" << endl;
- cout << "Please select an option\n" << endl;
- cout << "[1] addition\n" << endl;
- cout << "[2] subtraction\n" << endl;
- cout << "[3] multiplication\n" << endl;
- cout << "[4] Division\n" << endl;
- cout << "[5] Floor Division\n" << endl;
- cout << "Please select an option:\t" << endl;
- cin>>b;
- if(b == 1) {
- PAUSE
- CLRSCR
- cout << "Please enter the first number:\t" << endl;
- cin>>firstadditionnumber;
- cout << "\n";
- cout << "Please enter the secound number:\t" << endl;
- cin>>secoundadditionnumber;
- cout << "\n";
- sum = firstadditionnumber + secoundadditionnumber;
- cout << "The answer is: "<< sum << endl;
- }
- if(b == 2) {
- PAUSE
- CLRSCR
- cout << "Please enter the first number:\t" << endl;
- cin>>firstsubtractionnumber;
- cout << "\n";
- cout << "Please enter the secound number:\t" << endl;
- cin>>secoundsubtractionnumber;
- cout << "\n";
- subtractanswer = firstsubtractionnumber - secoundsubtractionnumber;
- cout << "The answer is: "<< subtractanswer << endl;
- }
- if(b == 3) {
- PAUSE
- CLRSCR
- cout << "Please enter the first number:\t" << endl;
- cin>>firstmultiplicationnumber;
- cout << "\n";
- cout << "Please enter the secound number:\t" << endl;
- cin>>secoundmultiplicationnumber;
- cout << "\n";
- multiplicationanswer = firstmultiplicationnumber * secoundmultiplicationnumber;
- cout << "The answer is: "<< multiplicationanswer << endl;
- }
- if(b == 4) {
- PAUSE
- CLRSCR
- cout << "Please enter the first number:\t" << endl;
- cin>>firstdivisionnumber;
- cout << "\n";
- cout << "Please enter the secound number:\t" << endl;
- cin>>secounddivisionnumber;
- cout << "\n";
- divisonanswer = firstdivisionnumber / secounddivisionnumber;
- cout << "The answer is: "<< divisonanswer << endl;
- }
- if(b == 5) {
- PAUSE
- CLRSCR
- cout << "Please enter the first number:\t" << endl;
- cin>>firstmodulonumber;
- cout << "\n";
- cout << "Please enter the secound number:\t" << endl;
- cin>>secoundmodulonumber;
- cout << "\n";
- modulonumber = firstmodulonumber % secoundmodulonumber;
- cout << "The answer is: "<< modulonumber << endl;
- }
- }
- if(a == 2) {
- PAUSE
- CLRSCR
- cout << "Welcome to The Time Program\n" << endl;
- cout << "Please select an option\n" << endl;
- cout << "[1] Just display time once\n" << endl;
- cout << "[2] Display the time multiple times\n" << endl;
- cout << "Please select an option:\t" << endl;
- cin>>c;
- if(c == 1) {
- PAUSE
- CLRSCR
- time_t now = time(0);
- char* dt = ctime(&now);
- cout << "The local time and date is: " << dt << endl;
- tm *gmtm = gmtime(&now);
- dt = asctime(gmtm);
- cout << "The UTC date and time is:" << dt << endl;
- }
- if(c == 2) {
- PAUSE
- CLRSCR
- for(;;) {
- Sleep(15000);
- time_t now = time(0);
- char* dt = ctime(&now);
- cout << "\n";
- cout << "The local time and date is: " << dt << endl;
- tm *gmtm = gmtime(&now);
- dt = asctime(gmtm);
- cout << "The UTC date and time is:" << dt << endl;
- }
- }
- }
- if(a == 3) {
- PAUSE
- CLRSCR
- // Research how to open a link.
- cout << "Please select an option\n" << endl;
- cout << "[1] Open a single link\n" << endl;
- cout << "[2] Open multiple links\n" << endl;
- cout << "Please select an option:\t";
- cin>>d;
- if(d == 1) {
- PAUSE
- CLRSCR
- cout << "Link opener test program\n" << endl;
- cout << "Type in a URL address:\t ";
- cin>>url;
- ShellExecute(NULL, "open", url.c_str(), NULL, NULL, SW_SHOWNORMAL);
- cout << "Opening..." << endl;
- }
- if(d == 2) {
- PAUSE
- CLRSCR
- cout << "Please select an option\n" << endl;
- cout << "[1] Google\n" << endl;
- cout << "[2] Bing\n" << endl;
- cout << "[3] Ask\n" << endl;
- cout << "[4] CNN\n" << endl;
- cout << "[5] Fox News\n" << endl;
- cout << "[6] Security Focus\n" << endl;
- cout << "[7] Wikipedia\n" << endl;
- cout << "Please select an option:\t";
- cin>>standardwebchoice;
- if(standardwebchoice == 1) {
- ShellExecute(NULL, "open", linkone.c_str(), NULL, NULL, SW_SHOWNORMAL);
- }
- if(standardwebchoice == 2) {
- ShellExecute(NULL, "open", linktwo.c_str(), NULL, NULL, SW_SHOWNORMAL);
- }
- if(standardwebchoice == 3) {
- ShellExecute(NULL, "open", linkthree.c_str(), NULL, NULL, SW_SHOWNORMAL);
- }
- if(standardwebchoice == 4) {
- ShellExecute(NULL, "open", linkfour.c_str(), NULL, NULL, SW_SHOWNORMAL);
- }
- if(standardwebchoice == 5) {
- ShellExecute(NULL, "open", linkfive.c_str(), NULL, NULL, SW_SHOWNORMAL);
- }
- if(standardwebchoice == 6) {
- ShellExecute(NULL, "open", linksix.c_str(), NULL, NULL, SW_SHOWNORMAL);
- }
- if(standardwebchoice == 7) {
- ShellExecute(NULL, "open", linkseven.c_str(), NULL, NULL, SW_SHOWNORMAL);
- }
- }
- }
- if(a == 4) {
- // Run system info and or scan
- PAUSE
- CLRSCR
- cout << "Please select an option\n" << endl;
- cout << "[1] Run the 'systeminfo' command\n" << endl;
- cout << "[2] Run the 'ipconfig' command\n" << endl;
- cout << "[3] Run the 'ping' command\n" << endl;
- cout << "[4] Run a system diagnostic\n" << endl;
- cout << "[5] Snatch some wifi passwords\n" << endl;
- cout << "Please select an option:\t ";
- cin>>e;
- if(e == 1) {
- PAUSE
- CLRSCR
- system("systeminfo");
- }
- if(e == 2) {
- PAUSE
- CLRSCR
- system("ipconfig");
- }
- if(e == 3) {
- PAUSE
- CLRSCR
- system("ping www.google.com");
- }
- if(e == 4) {
- PAUSE
- CLRSCR
- // System check
- system("systeminfo");
- }
- if(e == 5) {
- PAUSE
- CLRSCR
- cout << "How to get wifi passwords on Windows 7/8/8.1/10\n" << endl;
- cout << "[1] Open Command Prompt in Admin mode\n" << endl;
- cout << "[2] type 'netsh wlan show profiles'\n" << endl;
- cout << "[3] then from there select the profile by typing 'netsh wlan show profile name=profilename key=clear'\n" << endl;
- }
- }
- if(a == 5) {
- PAUSE
- CLRSCR
- cout << "Please select an option\n" << endl;
- cout << "[1] The 'Start' command\n" << endl;
- cout << "[2] The 'Ping' command\n" << endl;
- cout << "Please select an option:\t " << endl;
- cin>>f;
- if(f == 1) {
- PAUSE
- CLRSCR
- system("start cmd.exe");
- }
- if(f == 2) {
- PAUSE
- CLRSCR
- system("ping www.google.com");
- }
- }
- if(a == 6) {
- PAUSE
- CLRSCR
- // Spawn a cmd shell
- cout << "Please select an option\n" << endl;
- cout << "[1] CMD tutorial links\n" << endl;
- cout << "[2] Download file\n" << endl;
- cout << "Please select an option:\t ";
- cin>>cmdchoice;
- if(cmdchoice == 1) {
- //ShellExecute(NULL, "open", linkone.c_str(), NULL, NULL, SW_SHOWNORMAL);
- PAUSE
- CLRSCR
- cout << "Please select an option\n" << endl;
- cout << "[1] Command Prompt instructions by 'Tuxmascot' (Average)\n" << endl;
- cout << "[2] Command Prompt instructions by 'account3r2' (Best)\n" << endl;
- cout << "Please select an option:\t ";
- cin>>instructablescmdchoice;
- if(instructablescmdchoice == 1) {
- ShellExecute(NULL, "open", linkeight.c_str(), NULL, NULL, SW_SHOWNORMAL);
- }
- if(instructablescmdchoice == 2) {
- ShellExecute(NULL, "open", linknine.c_str(), NULL, NULL, SW_SHOWNORMAL);
- }
- }
- if(cmdchoice == 2) {
- PAUSE
- CLRSCR
- cout << "Please select an option\n" << endl;
- cout << "[1] Average command prompt\n" << endl;
- cout << "[2] Amazingly created command prompt\n" << endl;
- cout << "Please select an option:\t ";
- cin>>openlinkcommandprompt;
- if(openlinkcommandprompt == 1) {
- ShellExecute(NULL, "open", linkten.c_str(), NULL, NULL, SW_SHOWNORMAL);
- }
- if(openlinkcommandprompt == 2) {
- ShellExecute(NULL, "open", linkeleven.c_str(), NULL, NULL, SW_SHOWNORMAL);
- }
- }
- }
- if(a == 7) {
- PAUSE
- CLRSCR
- EXIT
- }
- if(a == 8) {
- // system("c:\\windows\\system32\\shutdown /i"); shutdown command
- PAUSE
- CLRSCR
- cout << "Please select an option\n" << endl;
- cout << "[1] Standard Shutdown\n" << endl;
- cout << "[2] Restart\n" << endl;
- cout << "[3] 'Forced' Shutdown\n" << endl;
- cout << "Please select an option:\t ";
- cin>>shutdownchoice;
- if(shutdownchoice == 1) {
- system("c:\\windows\\system32\\shutdown /s");
- }
- if(shutdownchoice == 2) {
- system("c:\\windows\\system32\\shutdown /r");
- }
- if(shutdownchoice == 3) {
- system("c:\\windows\\system32\\shutdown /i");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment