Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void openURL(string ip, string username, string password) {
- clear();
- system("title psexec HackTool - open URL");
- short int numOfTabsToOpen;
- signed long int delayBetweenStartingTabs;
- signed long int delayBeforeOpening;
- string sIncognito, AnswerIncognito;
- std::string URL;
- cout << endl << endl << endl << endl;
- color('Y');
- cout << " Please enter the URL you want to be opened: ";
- color('G');
- cin >> URL;
- cout << endl;
- color('Y');
- cout << " How many times do you want to open this URL? ";
- color('G');
- cin >> numOfTabsToOpen;
- cout << endl;
- color('Y');
- cout << " Do you want to open the tab in incognito mode? (y/n): ";
- color('G');
- cin >> sIncognito;
- color('B');
- cout << endl;
- color('Y');
- cout << " How much time do you want to delay before opening the URL? (in milliseconds): ";
- color('G');
- cin >> delayBeforeOpening;
- cout << endl;
- //-------------------------------------------------------------------------------------------
- //= START TO CHECK FOR URL IN THE urls.txt FILE =
- //-------------------------------------------------------------------------------------------
- std::string shortcutname;
- std::string url;
- std::ifstream file("urls.txt");
- std::vector<std::string> urls(100);
- std::vector<std::string> shortcutNames(100);
- while (!file) {
- color('R');
- cout << " ERROR FILE NOT FOUND. CREATING FILE..." << endl;
- cout << " Please make sure that";
- color('G');
- cout << " urls.txt ";
- color('R');
- cout << "is always on the same folder as your .exe file."<< endl;
- color('C');
- ofstream createFile;
- createFile.open("urls.txt");
- createFile << "OriChannel https://www.youtube.com/channel/UCS7HaiFfEvvMIHGaOz1BF7Q/ \n";
- createFile << "[name] [URL]";
- createFile.close();
- break;
- }
- int numofshortcuts = 0;
- while (file >> url >> shortcutname) {
- shortcutNames[numofshortcuts] = shortcutname;
- urls[numofshortcuts] = url;
- numofshortcuts++;
- }
- for (int c = 0; c <= numofshortcuts; c++) {
- if (urls[c] == URL) {
- URL = shortcutNames[c];
- }
- //else if(urls[c] == ALIAS){
- //}
- }
- Sleep(500);
- file.close();
- //-------------------------------------------------------------------------------------------
- //= START TO CHECK FOR NUMBER OF TABS TO OPEN, AND DELAY =
- //-------------------------------------------------------------------------------------------
- if (numOfTabsToOpen > 1) {
- color('Y');
- cout << " Please enter the time of delay between every tab opening (in milliseconds): ";
- color('G');
- cin >> delayBetweenStartingTabs;
- if (delayBetweenStartingTabs < 100)
- delayBetweenStartingTabs = 100;
- }
- else {
- delayBetweenStartingTabs = 100;
- }
- //-------------------------------------------------------------------------------------------
- //= START TO CHECK FOR INCOGNITO MODE =
- //-------------------------------------------------------------------------------------------
- if (sIncognito == "y" || sIncognito == "Y" || sIncognito == "yes" || sIncognito == "Yes") {
- AnswerIncognito = " -incognito";
- color('B');
- }
- else if(sIncognito == "n" || sIncognito == "N" || sIncognito == "no" || sIncognito == "No")
- AnswerIncognito = "";
- cout << endl << endl << endl;
- color('G');
- cout << " [+] Opening the URL: ";
- color('R');
- cout << URL;
- color('G');
- cout << ", ";
- color('R');
- cout << numOfTabsToOpen;
- color('G');
- cout << " times." << endl;
- Sleep(delayBeforeOpening);
- for (int c = 0; c < numOfTabsToOpen; c++) {
- system(("psexec -i -d \\\\" + ip + " -u " + username + " -p " + password + ' ' + '"' + "C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe" + '"' + ' ' + '"' + URL + '"' + AnswerIncognito + " -accepteula" ).c_str());
- //------------------------------------------------------------------------------------------------------
- //
- //USING CMD:::
- //system(("psexec -s -i \\\\" + IP + " -u " + USername + " -p " + PAssword + " cmd.exe /c start chrome " + URL + ' ' + AnswerIncognito + " -accepteula" ).c_str());
- //
- //------------------------------------------------------------------------------------------------------
- Sleep(delayBetweenStartingTabs);
- }
- color('Y');
- cout << endl << endl << endl;
- pause();
- chooseoption(ip, username, password);
- return;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement