gulnyr

Untitled

Jan 31st, 2016
106
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3. $uA = $_SERVER['HTTP_USER_AGENT'];
  4.  
  5. $url = "http://site.ru/admin.php";
  6. $ch = curl_init($url);
  7. curl_setopt($ch, CURLOPT_REFERER, $url);
  8. curl_setopt($ch, CURLOPT_COOKIEJAR,$_SERVER['DOCUMENT_ROOT'].'/cookiefile2.txt');
  9. curl_setopt($ch, CURLOPT_USERAGENT, $uA);
  10. curl_setopt($ch, CURLOPT_POST,1);
  11. curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  12. curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
  13. curl_setopt($ch, CURLOPT_USERPWD, "jugger:12345");
  14. curl_exec($ch);
  15. curl_close($ch);
  16.  
  17. $uA2 = $_SERVER['HTTP_USER_AGENT'];
  18.  
  19. $url2 = "http://site.ru/addnews";
  20. $ch2 = curl_init($url2);
  21. curl_setopt($ch2, CURLOPT_REFERER, $url2);
  22. curl_setopt($ch2, CURLOPT_USERAGENT, $uA2);
  23. curl_setopt($ch2, CURLOPT_POST,1);
  24. curl_setopt($ch2, CURLOPT_COOKIEJAR,$_SERVER['DOCUMENT_ROOT'].'/cookiefile2.txt');
  25. curl_setopt($ch2, CURLOPT_POSTFIELDS, "title=тест007&short_story=тест008&full_story=тест009");
  26. curl_setopt($ch2, CURLOPT_RETURNTRANSFER, 1);
  27. curl_setopt($ch2, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
  28. curl_setopt($ch2, CURLOPT_USERPWD, "jugger:12345");
  29. curl_exec($ch2);
  30. curl_close($ch2);
  31.  
  32. ?>
RAW Paste Data