Guest User

Untitled

a guest
Nov 18th, 2017
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. void tryURL()
  2. {
  3. randURL.clear();
  4. for (unsigned short i = 0; i < urlLength; i++) {
  5. randURL = randURL + (alphabet[(int)((double)rand() / (RAND_MAX + 1) * alphabetLength)]);
  6. }
  7. wcout << randURL << endl;
  8. HRESULT getImg = URLDownloadToFile(NULL, LPCWSTR( (beginURL + randURL + endURL).c_str() ), LPCWSTR( (randURL + L"/" + endURL).c_str() ), 0, NULL);
  9. if (SUCCEEDED(getImg))
  10. {
  11. wcout << L"Success" << endl;
  12. }
  13. }
  14.  
  15. tryURL();
  16. 0ybOAt
  17. tryURL();
  18. lTPKaR
  19. tryURL();
  20. Ivi05m
  21. ...
  22.  
  23. thread threads[10];
  24.  
  25. for (int i = 0; i < 10; ++i) {
  26. threads[i] = thread(tryURL);
  27. }
  28.  
  29. for (int i = 0; i < 10; ++i) {
  30. threads[i].join();
  31. }
  32.  
  33. 0ybOAt0ybOAt
  34. 0ybOAt
  35.  
  36. 0ybOAt0ybOAt
  37.  
  38. 0ybOAt
  39. 0ybOAt0ybOAt
  40. 0ybOAt
  41. 0ybOAt
Add Comment
Please, Sign In to add comment