Advertisement
OriHackingTutorials

openFilePSEXEC

Nov 19th, 2018
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 4.40 KB | None | 0 0
  1.  
  2. void openURL(string ip, string username, string password) {
  3.     clear();
  4.     system("title psexec HackTool - open URL");
  5.  
  6.     short int numOfTabsToOpen;
  7.     signed long int delayBetweenStartingTabs;
  8.     signed long int delayBeforeOpening;
  9.    
  10.     string sIncognito, AnswerIncognito;
  11.  
  12.     std::string URL;
  13.    
  14.     cout << endl << endl << endl << endl;
  15.     color('Y');
  16.     cout << "    Please enter the URL you want to be opened: ";
  17.     color('G');
  18.     cin >> URL;
  19.     cout << endl;
  20.    
  21.     color('Y');
  22.     cout << "    How many times do you want to open this URL? ";
  23.     color('G');
  24.     cin >> numOfTabsToOpen;
  25.     cout << endl;
  26.  
  27.     color('Y');
  28.     cout << "    Do you want to open the tab in incognito mode? (y/n): ";
  29.     color('G');
  30.     cin >> sIncognito;
  31.     color('B');
  32.     cout << endl;
  33.  
  34.     color('Y');
  35.     cout << "    How much time do you want to delay before opening the URL? (in milliseconds): ";
  36.     color('G');
  37.     cin >> delayBeforeOpening;
  38.  
  39.     cout << endl;
  40.     //-------------------------------------------------------------------------------------------
  41.     //=                       START TO CHECK FOR URL IN THE urls.txt FILE                       =
  42.     //-------------------------------------------------------------------------------------------
  43.     std::string shortcutname;
  44.     std::string url;
  45.     std::ifstream file("urls.txt");
  46.     std::vector<std::string> urls(100);
  47.     std::vector<std::string> shortcutNames(100);
  48.        
  49.     while (!file) {
  50.         color('R');
  51.         cout << "      ERROR FILE NOT FOUND. CREATING FILE..." << endl;
  52.         cout << "      Please make sure that";
  53.         color('G');
  54.         cout << " urls.txt ";
  55.         color('R');
  56.         cout << "is always on the same folder as your .exe file."<< endl;
  57.         color('C');
  58.  
  59.         ofstream createFile;
  60.         createFile.open("urls.txt");
  61.         createFile << "OriChannel https://www.youtube.com/channel/UCS7HaiFfEvvMIHGaOz1BF7Q/ \n";
  62.         createFile << "[name] [URL]";
  63.         createFile.close();
  64.         break;
  65.     }
  66.  
  67.     int numofshortcuts = 0;
  68.     while (file >> url >> shortcutname) {
  69.  
  70.         shortcutNames[numofshortcuts] = shortcutname;
  71.         urls[numofshortcuts] = url;
  72.         numofshortcuts++;
  73.     }
  74.     for (int c = 0; c <= numofshortcuts; c++) {
  75.         if (urls[c] == URL) {
  76.             URL = shortcutNames[c];
  77.         }
  78.         //else if(urls[c] == ALIAS){
  79.    
  80.         //}
  81.     }
  82.     Sleep(500);
  83.     file.close();
  84.    
  85.     //-------------------------------------------------------------------------------------------
  86.     //=                  START TO CHECK FOR NUMBER OF TABS TO OPEN, AND DELAY                   =
  87.     //-------------------------------------------------------------------------------------------
  88.     if (numOfTabsToOpen > 1) {
  89.         color('Y');
  90.         cout << "    Please enter the time of delay between every tab opening (in milliseconds): ";
  91.         color('G');
  92.         cin >> delayBetweenStartingTabs;
  93.         if (delayBetweenStartingTabs < 100)
  94.             delayBetweenStartingTabs = 100;
  95.     }
  96.     else {
  97.         delayBetweenStartingTabs = 100;
  98.     }
  99.  
  100.     //-------------------------------------------------------------------------------------------
  101.     //=                            START TO CHECK FOR INCOGNITO MODE                            =
  102.     //-------------------------------------------------------------------------------------------
  103.     if (sIncognito == "y" || sIncognito == "Y" || sIncognito == "yes" || sIncognito == "Yes") {
  104.         AnswerIncognito = " -incognito";
  105.         color('B');
  106.     }
  107.     else if(sIncognito == "n" || sIncognito == "N" || sIncognito == "no" || sIncognito == "No")
  108.         AnswerIncognito = "";
  109.  
  110.     cout << endl << endl << endl;
  111.     color('G');
  112.     cout << "    [+] Opening the URL: ";
  113.     color('R');
  114.     cout << URL;
  115.     color('G');
  116.     cout << ", ";
  117.     color('R');
  118.     cout << numOfTabsToOpen;
  119.     color('G');
  120.     cout << " times." << endl;
  121.  
  122.     Sleep(delayBeforeOpening);
  123.     for (int c = 0; c < numOfTabsToOpen; c++) {
  124.         system(("psexec -i -d \\\\" + ip + " -u " + username + " -p " + password + ' ' + '"' + "C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe" + '"' + ' ' + '"' + URL + '"' + AnswerIncognito + " -accepteula" ).c_str());
  125.         //------------------------------------------------------------------------------------------------------
  126.         //
  127.         //USING CMD:::
  128.         //system(("psexec -s -i \\\\" + IP + " -u " + USername + " -p " + PAssword + " cmd.exe /c start chrome " + URL + ' ' + AnswerIncognito + " -accepteula" ).c_str());
  129.         //
  130.         //------------------------------------------------------------------------------------------------------
  131.         Sleep(delayBetweenStartingTabs);
  132.     }
  133.    
  134.     color('Y');
  135.  
  136.     cout << endl << endl << endl;
  137.     pause();
  138.     chooseoption(ip, username, password);
  139.     return;
  140. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement