Adm1n_0v3rride

System Tools

Oct 30th, 2018
489
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 12.07 KB | None | 0 0
  1. /*
  2.  
  3. File: System Tools.cpp
  4. Author: Z3r0
  5. Synopsis: This is just a small reference progam
  6.  
  7. */
  8. #include <iostream>
  9. #include <cstdlib>
  10. #include <cstdio>
  11. #include <ctime>
  12. #include <string>
  13. #include <fstream>
  14. #include <stdio.h>
  15. #include <stdlib.h>
  16. #include <windows.h>
  17. #include <shellAPI.h>
  18. #include <dos.h>
  19. #include <unistd.h>
  20. #include <conio.h>
  21.  
  22. #define CLRSCR system("cls");
  23.  
  24. #define SLEEP Sleep(10000);
  25.  
  26. #define PAUSE system("PAUSE");
  27.  
  28. #define COLOR system("color 1f");
  29.  
  30. #define AUTHOR "Z3r0"
  31.  
  32. #define EXIT exit(0);
  33.  
  34. using namespace std;
  35.  
  36. int main(int argc, char *argv[]) {
  37.    
  38.     COLOR
  39.     int a;
  40.     int b;
  41.     int c;
  42.     int d;
  43.     int e;
  44.     int f;
  45.     int firstadditionnumber;
  46.     int secoundadditionnumber;
  47.     int sum;
  48.     int firstsubtractionnumber;
  49.     int secoundsubtractionnumber;
  50.     int subtractanswer;
  51.     int firstmultiplicationnumber;
  52.     int secoundmultiplicationnumber;
  53.     int multiplicationanswer;
  54.     int firstdivisionnumber;
  55.     int secounddivisionnumber;
  56.     int divisonanswer;
  57.     int firstmodulonumber;
  58.     int secoundmodulonumber;
  59.     int modulonumber;
  60.     int standardwebchoice;
  61.     int shutdownchoice;
  62.     int cmdchoice;
  63.     int instructablescmdchoice;
  64.     int openlinkcommandprompt;
  65.     string linkone = "http://www.google.com";
  66.     string linktwo = "https://www.bing.com/?toWww=1&redig=BD5850EE305849AE8C3F25753143BCED";
  67.     string linkthree = "https://www.ask.com";
  68.     string linkfour = "https://www.cnn.com";
  69.     string linkfive = "https://www.foxnews.com";
  70.     string linksix = "https://www.securityfocus.com";
  71.     string linkseven = "https://www.wikipedia.org";
  72.     string linkeight = "https://www.instructables.com/id/How-to-make-the-BEST-Command-Prtompt-cmd/";
  73.     string linknine = "https://www.instructables.com/id/How-to-create-your-own-command-prompt-in-windows-x/";
  74.     string linkten = "https://ghostbin.com/paste/hz5j7";
  75.     string linkeleven = "https://ghostbin.com/paste/kqv4r";
  76.     string url;
  77.    
  78.     cout << "Welcome to System Tools by Z3r0\n" << endl;
  79.    
  80.     cout << "Please select an option\n" << endl;
  81.    
  82.     cout << "[1] Calculator\n" << endl;
  83.    
  84.     cout << "[2] Time\n" << endl;
  85.    
  86.     cout << "[3] Open links\n" << endl;
  87.    
  88.     cout << "[4] Run System info/scan\n" << endl;
  89.    
  90.     cout << "[5] Run one or more commands\n" << endl;
  91.    
  92.     cout << "[6] Spawn 'file'\n" << endl;
  93.    
  94.     cout << "[7] Exit Program\n" << endl;
  95.    
  96.     cout << "[8] Shutdown Computer\n" << endl;
  97.    
  98.     cout << "Please select an option:\t " << endl;
  99.     cin>>a;
  100.    
  101.     if(a == 1) {
  102.        
  103.         PAUSE
  104.        
  105.         CLRSCR
  106.        
  107.         cout << "Welcome to The calcuator program\n" << endl;
  108.        
  109.         cout << "Please select an option\n" << endl;
  110.        
  111.         cout << "[1] addition\n" << endl;
  112.        
  113.         cout << "[2] subtraction\n" << endl;
  114.        
  115.         cout << "[3] multiplication\n" << endl;
  116.        
  117.         cout << "[4] Division\n" << endl;
  118.        
  119.         cout << "[5] Floor Division\n" << endl;
  120.        
  121.         cout << "Please select an option:\t" << endl;
  122.         cin>>b;
  123.        
  124.         if(b == 1) {
  125.            
  126.             PAUSE
  127.                    
  128.             CLRSCR
  129.        
  130.             cout << "Please enter the first number:\t" << endl;
  131.             cin>>firstadditionnumber;
  132.            
  133.             cout << "\n";
  134.            
  135.             cout << "Please enter the secound number:\t" << endl;
  136.             cin>>secoundadditionnumber;
  137.            
  138.             cout << "\n";
  139.            
  140.             sum = firstadditionnumber + secoundadditionnumber;
  141.             cout << "The answer is: "<< sum << endl;
  142.            
  143.         }
  144.        
  145.         if(b == 2) {
  146.            
  147.             PAUSE
  148.                    
  149.             CLRSCR
  150.            
  151.             cout << "Please enter the first number:\t" << endl;
  152.             cin>>firstsubtractionnumber;
  153.            
  154.             cout << "\n";
  155.            
  156.             cout << "Please enter the secound number:\t" << endl;
  157.             cin>>secoundsubtractionnumber;
  158.            
  159.             cout << "\n";
  160.            
  161.             subtractanswer = firstsubtractionnumber - secoundsubtractionnumber;
  162.             cout << "The answer is: "<< subtractanswer << endl;
  163.            
  164.         }
  165.        
  166.         if(b == 3) {
  167.            
  168.             PAUSE
  169.                    
  170.             CLRSCR
  171.            
  172.             cout << "Please enter the first number:\t" << endl;
  173.             cin>>firstmultiplicationnumber;
  174.            
  175.             cout << "\n";
  176.            
  177.             cout << "Please enter the secound number:\t" << endl;
  178.             cin>>secoundmultiplicationnumber;
  179.            
  180.             cout << "\n";
  181.            
  182.             multiplicationanswer = firstmultiplicationnumber * secoundmultiplicationnumber;
  183.             cout << "The answer is: "<< multiplicationanswer << endl;
  184.            
  185.         }
  186.        
  187.         if(b == 4) {
  188.            
  189.             PAUSE
  190.                    
  191.             CLRSCR
  192.            
  193.             cout << "Please enter the first number:\t" << endl;
  194.             cin>>firstdivisionnumber;
  195.            
  196.             cout << "\n";
  197.            
  198.             cout << "Please enter the secound number:\t" << endl;
  199.             cin>>secounddivisionnumber;
  200.            
  201.             cout << "\n";
  202.            
  203.             divisonanswer = firstdivisionnumber / secounddivisionnumber;
  204.             cout << "The answer is: "<< divisonanswer << endl;
  205.            
  206.         }
  207.        
  208.         if(b == 5) {
  209.            
  210.             PAUSE
  211.                    
  212.             CLRSCR
  213.            
  214.             cout << "Please enter the first number:\t" << endl;
  215.             cin>>firstmodulonumber;
  216.            
  217.             cout << "\n";
  218.            
  219.             cout << "Please enter the secound number:\t" << endl;
  220.             cin>>secoundmodulonumber;
  221.            
  222.             cout << "\n";
  223.            
  224.             modulonumber = firstmodulonumber % secoundmodulonumber;
  225.             cout << "The answer is: "<< modulonumber << endl;
  226.            
  227.         }
  228.        
  229.     }
  230.    
  231.     if(a == 2) {
  232.        
  233.         PAUSE
  234.                    
  235.         CLRSCR
  236.        
  237.         cout << "Welcome to The Time Program\n" << endl;
  238.        
  239.         cout << "Please select an option\n" << endl;
  240.        
  241.         cout << "[1] Just display time once\n" << endl;
  242.        
  243.         cout << "[2] Display the time multiple times\n" << endl;
  244.        
  245.         cout << "Please select an option:\t" << endl;
  246.         cin>>c;
  247.        
  248.         if(c == 1) {
  249.            
  250.             PAUSE
  251.                    
  252.             CLRSCR
  253.        
  254.             time_t now = time(0);
  255.            
  256.             char* dt = ctime(&now);
  257.            
  258.             cout << "The local time and date is: " << dt << endl;
  259.            
  260.             tm *gmtm = gmtime(&now);
  261.             dt = asctime(gmtm);
  262.             cout << "The UTC date and time is:" << dt << endl;
  263.            
  264.         }
  265.        
  266.         if(c == 2) {
  267.            
  268.             PAUSE
  269.                    
  270.             CLRSCR
  271.            
  272.             for(;;) {
  273.                
  274.                 Sleep(15000);
  275.                
  276.                 time_t now = time(0);
  277.            
  278.                 char* dt = ctime(&now);
  279.                
  280.                 cout << "\n";
  281.                
  282.                 cout << "The local time and date is: " << dt << endl;
  283.  
  284.                 tm *gmtm = gmtime(&now);
  285.                 dt = asctime(gmtm);
  286.                 cout << "The UTC date and time is:" << dt << endl;
  287.                
  288.             }
  289.         }
  290.     }
  291.    
  292.     if(a == 3) {
  293.        
  294.         PAUSE
  295.            
  296.         CLRSCR
  297.            
  298.         // Research how to open a link.
  299.         cout << "Please select an option\n" << endl;
  300.        
  301.         cout << "[1] Open a single link\n" << endl;
  302.        
  303.         cout << "[2] Open multiple links\n" << endl;
  304.        
  305.         cout << "Please select an option:\t";
  306.         cin>>d;
  307.        
  308.         if(d == 1) {
  309.            
  310.             PAUSE
  311.                    
  312.             CLRSCR
  313.        
  314.             cout << "Link opener test program\n" << endl;
  315.            
  316.             cout << "Type in a URL address:\t ";
  317.             cin>>url;
  318.             ShellExecute(NULL, "open", url.c_str(), NULL, NULL, SW_SHOWNORMAL);
  319.             cout << "Opening..." << endl;
  320.            
  321.         }
  322.        
  323.         if(d == 2) {
  324.            
  325.             PAUSE
  326.                    
  327.             CLRSCR
  328.            
  329.             cout << "Please select an option\n" << endl;
  330.            
  331.             cout << "[1] Google\n" << endl;
  332.            
  333.             cout << "[2] Bing\n" << endl;
  334.            
  335.             cout << "[3] Ask\n" << endl;
  336.            
  337.             cout << "[4] CNN\n" << endl;
  338.            
  339.             cout << "[5] Fox News\n" << endl;
  340.            
  341.             cout << "[6] Security Focus\n" << endl;
  342.            
  343.             cout << "[7] Wikipedia\n" << endl;
  344.            
  345.             cout << "Please select an option:\t";
  346.             cin>>standardwebchoice;
  347.            
  348.             if(standardwebchoice == 1) {
  349.                
  350.                 ShellExecute(NULL, "open", linkone.c_str(), NULL, NULL, SW_SHOWNORMAL);
  351.                
  352.             }
  353.            
  354.             if(standardwebchoice == 2) {
  355.                
  356.                 ShellExecute(NULL, "open", linktwo.c_str(), NULL, NULL, SW_SHOWNORMAL);
  357.                
  358.             }
  359.            
  360.             if(standardwebchoice == 3) {
  361.                
  362.                 ShellExecute(NULL, "open", linkthree.c_str(), NULL, NULL, SW_SHOWNORMAL);
  363.                
  364.             }
  365.            
  366.             if(standardwebchoice == 4) {
  367.                
  368.                 ShellExecute(NULL, "open", linkfour.c_str(), NULL, NULL, SW_SHOWNORMAL);
  369.                
  370.             }
  371.            
  372.             if(standardwebchoice == 5) {
  373.                
  374.                 ShellExecute(NULL, "open", linkfive.c_str(), NULL, NULL, SW_SHOWNORMAL);
  375.                
  376.             }
  377.            
  378.             if(standardwebchoice == 6) {
  379.                
  380.                 ShellExecute(NULL, "open", linksix.c_str(), NULL, NULL, SW_SHOWNORMAL);
  381.                
  382.             }
  383.            
  384.             if(standardwebchoice == 7) {
  385.                
  386.                 ShellExecute(NULL, "open", linkseven.c_str(), NULL, NULL, SW_SHOWNORMAL);
  387.                
  388.             }  
  389.         }
  390.     }
  391.    
  392.     if(a == 4) {
  393.         // Run system info and or scan
  394.         PAUSE
  395.        
  396.         CLRSCR
  397.        
  398.         cout << "Please select an option\n" << endl;
  399.        
  400.         cout << "[1] Run the 'systeminfo' command\n" << endl;
  401.        
  402.         cout << "[2] Run the 'ipconfig' command\n" << endl;
  403.        
  404.         cout << "[3] Run the 'ping' command\n" << endl;
  405.        
  406.         cout << "[4] Run a system diagnostic\n" << endl;
  407.        
  408.         cout << "[5] Snatch some wifi passwords\n" << endl;
  409.        
  410.         cout << "Please select an option:\t ";
  411.         cin>>e;
  412.        
  413.         if(e == 1) {
  414.            
  415.             PAUSE
  416.        
  417.             CLRSCR
  418.            
  419.             system("systeminfo");
  420.            
  421.         }
  422.        
  423.         if(e == 2) {
  424.            
  425.             PAUSE
  426.            
  427.             CLRSCR
  428.            
  429.             system("ipconfig");
  430.            
  431.         }
  432.        
  433.         if(e == 3) {
  434.            
  435.             PAUSE
  436.            
  437.             CLRSCR
  438.            
  439.             system("ping www.google.com");
  440.            
  441.         }
  442.        
  443.         if(e == 4) {
  444.            
  445.             PAUSE
  446.            
  447.             CLRSCR
  448.            
  449.             // System check
  450.            
  451.             system("systeminfo");
  452.            
  453.         }
  454.        
  455.         if(e == 5) {
  456.            
  457.             PAUSE
  458.            
  459.             CLRSCR
  460.            
  461.             cout << "How to get wifi passwords on Windows 7/8/8.1/10\n" << endl;
  462.            
  463.             cout << "[1] Open Command Prompt in Admin mode\n" << endl;
  464.            
  465.             cout << "[2] type 'netsh wlan show profiles'\n" << endl;
  466.            
  467.             cout << "[3] then from there select the profile by typing 'netsh wlan show profile name=profilename key=clear'\n" << endl;
  468.            
  469.         }
  470.        
  471.     }
  472.    
  473.     if(a == 5) {
  474.        
  475.         PAUSE
  476.        
  477.         CLRSCR
  478.        
  479.         cout << "Please select an option\n" << endl;
  480.        
  481.         cout << "[1] The 'Start' command\n" << endl;
  482.        
  483.         cout << "[2] The 'Ping' command\n" << endl;
  484.        
  485.         cout << "Please select an option:\t " << endl;
  486.         cin>>f;
  487.        
  488.         if(f == 1) {
  489.            
  490.             PAUSE
  491.        
  492.             CLRSCR
  493.            
  494.             system("start cmd.exe");
  495.            
  496.         }
  497.        
  498.         if(f == 2) {
  499.            
  500.             PAUSE
  501.        
  502.             CLRSCR
  503.            
  504.             system("ping www.google.com");
  505.            
  506.         }
  507.        
  508.     }
  509.    
  510.     if(a == 6) {
  511.        
  512.         PAUSE
  513.            
  514.         CLRSCR
  515.        
  516.         // Spawn a cmd shell
  517.        
  518.         cout << "Please select an option\n" << endl;
  519.        
  520.         cout << "[1] CMD tutorial links\n" << endl;
  521.        
  522.         cout << "[2] Download file\n" << endl;
  523.        
  524.         cout << "Please select an option:\t ";
  525.         cin>>cmdchoice;
  526.        
  527.         if(cmdchoice == 1) {
  528.             //ShellExecute(NULL, "open", linkone.c_str(), NULL, NULL, SW_SHOWNORMAL);
  529.             PAUSE
  530.                    
  531.             CLRSCR
  532.        
  533.             cout << "Please select an option\n" << endl;
  534.            
  535.             cout << "[1] Command Prompt instructions by 'Tuxmascot' (Average)\n" << endl;
  536.            
  537.             cout << "[2] Command Prompt instructions by 'account3r2' (Best)\n" << endl;
  538.            
  539.             cout << "Please select an option:\t ";
  540.             cin>>instructablescmdchoice;
  541.            
  542.             if(instructablescmdchoice == 1) {
  543.                
  544.                 ShellExecute(NULL, "open", linkeight.c_str(), NULL, NULL, SW_SHOWNORMAL);
  545.                
  546.             }
  547.            
  548.             if(instructablescmdchoice == 2) {
  549.                
  550.                 ShellExecute(NULL, "open", linknine.c_str(), NULL, NULL, SW_SHOWNORMAL);
  551.                
  552.             }
  553.            
  554.         }
  555.        
  556.         if(cmdchoice == 2) {
  557.            
  558.             PAUSE
  559.                    
  560.             CLRSCR
  561.        
  562.             cout << "Please select an option\n" << endl;
  563.            
  564.             cout << "[1] Average command prompt\n" << endl;
  565.            
  566.             cout << "[2] Amazingly created command prompt\n" << endl;
  567.            
  568.             cout << "Please select an option:\t ";
  569.             cin>>openlinkcommandprompt;
  570.            
  571.             if(openlinkcommandprompt == 1) {
  572.                
  573.                 ShellExecute(NULL, "open", linkten.c_str(), NULL, NULL, SW_SHOWNORMAL);
  574.                
  575.             }
  576.            
  577.             if(openlinkcommandprompt == 2) {
  578.                
  579.                 ShellExecute(NULL, "open", linkeleven.c_str(), NULL, NULL, SW_SHOWNORMAL);
  580.                
  581.             }
  582.         }
  583.        
  584.     }
  585.    
  586.     if(a == 7) {
  587.        
  588.         PAUSE
  589.            
  590.         CLRSCR
  591.        
  592.         EXIT
  593.        
  594.     }
  595.    
  596.     if(a == 8) {
  597.         // system("c:\\windows\\system32\\shutdown /i"); shutdown command
  598.         PAUSE
  599.        
  600.         CLRSCR
  601.        
  602.         cout << "Please select an option\n" << endl;
  603.        
  604.         cout << "[1] Standard Shutdown\n" << endl;
  605.        
  606.         cout << "[2] Restart\n" << endl;
  607.        
  608.         cout << "[3] 'Forced' Shutdown\n" << endl;
  609.        
  610.         cout << "Please select an option:\t ";
  611.         cin>>shutdownchoice;
  612.        
  613.         if(shutdownchoice == 1) {
  614.            
  615.             system("c:\\windows\\system32\\shutdown /s");
  616.  
  617.         }
  618.        
  619.         if(shutdownchoice == 2) {
  620.            
  621.             system("c:\\windows\\system32\\shutdown /r");
  622.  
  623.         }
  624.        
  625.         if(shutdownchoice == 3) {
  626.            
  627.             system("c:\\windows\\system32\\shutdown /i");
  628.  
  629.         }
  630.     }
  631.      
  632.      
  633. }
Advertisement
Add Comment
Please, Sign In to add comment