Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
session_start(); ob_start(); ..
Decoded Output download
<? session_start();
ob_start(); // Err404()
function Err404() { // Err404()
header($_SERVER['SERVER_PROTOCOL'] . ' 404 Not Found');
include_once("err404.php");
exit;
}
/**
1 - catalog file.php \ electronics_computers.html
2 - catalog, file.php, brend.php \ job_help.html electronics_mobilephones.html
3 - catalog, file.php brend.php , artikul \ bilding_foto.html
4 - catalog, catalog artikul \ foto_cannon.html
5 - $catalog, artikul \ foto.html 180728222519.html
6 - $catalog index.php \ electronics.html
Controller :
index - :
- category
- subcategory
- section
- artikul
- produce
- - prodcat
- - prodsub
- - prodsec
**/
################################################################################################################################################
if (!empty($_SERVER['REQUEST_URI'])) {
$uri=trim($_SERVER['REQUEST_URI'], '/');
}
$urii = preg_replace("~.html.html~",'',$uri); // ".html.html"
if ($urii==$uri) {}
else {Err404();}
################################################################################################################################################
$urii = preg_replace("~.html~",'',$uri);
if ($urii==$uri) {Err404();} // 404 html
$segments = explode('_', $uri);
if (!empty($segments[2])) {Err404();} // 404 URL "_"
############################################### 1 2 3 #################################################################################
if (!empty($segments[1])) { //URL $catalog_$file.html
$catalog =$segments[0]; // $catalog/brend.php
$file = preg_replace("~.html~",'',$segments[1]);
if (file_exists("$catalog/brend.php")) {
include "$catalog/brend.php";
if (file_exists("$catalog/$file.php")) { //1 - $catalog file.php
if (!empty($_SESSION['admin'])) {echo "<p>1 - catalog file.php</p>";}
include 'title.php';
exit;
}
else {
if (!empty($name)) { // if ($file==doors) {$name="";}, title.php
if (!empty($_SESSION['admin'])) {echo "<p>2 - catalog, file.php, brend.php</p>";}
$file=artikul; include 'title.php'; exit;} // $file=artikul; ,
else{
$artikul=$file; // $catalog/$file.php
include 'mysql/init.php';
$query = mysql_query("SELECT * FROM $table WHERE catalog='$catalog' and artikul='$artikul'");
echo $sql;
$result = mysql_fetch_array($query);
$name= trim( preg_replace( '/\s\s+/', " ", strip_tags($result[name]) ) );
$id = $result[id];
$artikul = $result[artikul];
$brend = $result[brend];
$name = $result[name];
$info = $result[info];
$format = $result[format];
$type = $result[type];
$price = $result[price];
$valut = $result[valut];
$seria = $result[seria];
$category = $result[category];
$product = $result[product];
$selekt = $result[selekt];
$menager = $result[menager];
$s1 = $result[s1];
$s2 = $result[s2];
$s3 = $result[s3];
if ( (!empty($catalog)) and (!empty($artikul)) ) { //$artikul
$num_rows = mysql_num_rows($query); // 3 catalog, file.php,
if (!empty($_SESSION['admin'])) {echo "<p>3 - catalog, file.php brend.php , artikul \ $table / $num_rows </p>";}
if ($num_rows=="1") {if (file_exists("title.php")) {include ("title.php"); exit;} } // 3 bilding_foto.html
else {echo "<p style='color:#a00;'> = $num_rows</p>"; Err404();}
exit;
}
else {Err404();}
}
}
}
}
####################################################### 4 #########################################################################
if (!empty($segments[1])) { //URL $catalog_$file.html
$catalog =$segments[0];
$file = preg_replace("~.html~",'',$segments[1]);
if (!file_exists("$catalog/brend.php")) { // $catalog/brend.php
$artikul=$file;
include 'mysql/init.php';
$query = mysql_query("SELECT * FROM $table WHERE catalog='$catalog' and artikul='$artikul'");
$result = mysql_fetch_array($query);
$name= trim( preg_replace( '/\s\s+/', " ", strip_tags($result[name]) ) );
$id = $result[id];
$artikul = $result[artikul];
$brend = $result[brend];
$name = $result[name];
$info = $result[info];
$format = $result[format];
$type = $result[type];
$price = $result[price];
$valut = $result[valut];
$seria = $result[seria];
$category = $result[category];
$product = $result[product];
$selekt = $result[selekt];
$menager = $result[menager];
$s1 = $result[s1];
$s2 = $result[s2];
$s3 = $result[s3];
if ( (!empty($catalog)) and (!empty($artikul)) ) { //4 - $catalog $artikul
$num_rows = mysql_num_rows($query);
if (!empty($_SESSION['admin'])) {echo "<p>4 - catalog, catalog artikul / $table / $num_rows </p>";}
if ($num_rows=="1") {if (file_exists("title.php")) {include ("title.php"); exit;} }
else {echo "<p style='color:#a00;'> = $num_rows</p>"; Err404();}
exit;
}
else {Err404();}
}
}
######################################################### 5 #######################################################################
if (empty($segments[1])) { //URL $catalog.html
#$artikul =$segments[0];
$artikul = preg_replace("~.html~",'',$segments[0]);
if (!file_exists("$catalog/brend.php")) { // $catalog/brend.php
include 'mysql/init.php';
$query = mysql_query("SELECT * FROM $table WHERE catalog='' and artikul='$artikul'");
$result = mysql_fetch_array($query);
$name= trim( preg_replace( '/\s\s+/', " ", strip_tags($result[name]) ) );
$id = $result[id];
$artikul = $result[artikul];
$brend = $result[brend];
$name = $result[name];
$info = $result[info];
$format = $result[format];
$type = $result[type];
$price = $result[price];
$valut = $result[valut];
$seria = $result[seria];
$category = $result[category];
$product = $result[product];
$selekt = $result[selekt];
$menager = $result[menager];
$s1 = $result[s1];
$s2 = $result[s2];
$s3 = $result[s3];
if (!empty($artikul)) { //5 - $catalog
$num_rows = mysql_num_rows($query); //5 - $catalog $artikul
if (!empty($_SESSION['admin'])) {echo "<p>5 - Artikul \id = $id \ catalog, artikul \ $table / $num_rows </p>";}
if ($num_rows=="1") {if (file_exists("title.php")) {include ("title.php"); exit;} } //5 - foto.html
else {echo "<p style='color:#a00;'> = $num_rows</p>"; Err404();}
exit;
}
else {Err404();}
}
}
############################################################# 6 ###################################################################
$catalog = preg_replace("~.html~",'',$segments[0]); // $catalog.html,
if ( (file_exists("$catalog")) and ($uri== $segments[0]) ) { // $catalog index.php,
if (file_exists("$catalog/index.php")) {
if (!empty($_SESSION['admin'])) {echo "<p>6 - $catalog index.php, index.php controller/catalog.php</p>";}
$file="index"; include 'title.php'; // , title.php
exit;
}
} ?>
Did this file decode correctly?
Original Code
session_start();
ob_start(); // Err404()
function Err404() { // Err404()
header($_SERVER['SERVER_PROTOCOL'] . ' 404 Not Found');
include_once("err404.php");
exit;
}
/**
1 - catalog file.php \ electronics_computers.html
2 - catalog, file.php, brend.php \ job_help.html electronics_mobilephones.html
3 - catalog, file.php brend.php , artikul \ bilding_foto.html
4 - catalog, catalog artikul \ foto_cannon.html
5 - $catalog, artikul \ foto.html 180728222519.html
6 - $catalog index.php \ electronics.html
Controller :
index - :
- category
- subcategory
- section
- artikul
- produce
- - prodcat
- - prodsub
- - prodsec
**/
################################################################################################################################################
if (!empty($_SERVER['REQUEST_URI'])) {
$uri=trim($_SERVER['REQUEST_URI'], '/');
}
$urii = preg_replace("~.html.html~",'',$uri); // ".html.html"
if ($urii==$uri) {}
else {Err404();}
################################################################################################################################################
$urii = preg_replace("~.html~",'',$uri);
if ($urii==$uri) {Err404();} // 404 html
$segments = explode('_', $uri);
if (!empty($segments[2])) {Err404();} // 404 URL "_"
############################################### 1 2 3 #################################################################################
if (!empty($segments[1])) { //URL $catalog_$file.html
$catalog =$segments[0]; // $catalog/brend.php
$file = preg_replace("~.html~",'',$segments[1]);
if (file_exists("$catalog/brend.php")) {
include "$catalog/brend.php";
if (file_exists("$catalog/$file.php")) { //1 - $catalog file.php
if (!empty($_SESSION['admin'])) {echo "<p>1 - catalog file.php</p>";}
include 'title.php';
exit;
}
else {
if (!empty($name)) { // if ($file==doors) {$name="";}, title.php
if (!empty($_SESSION['admin'])) {echo "<p>2 - catalog, file.php, brend.php</p>";}
$file=artikul; include 'title.php'; exit;} // $file=artikul; ,
else{
$artikul=$file; // $catalog/$file.php
include 'mysql/init.php';
$query = mysql_query("SELECT * FROM $table WHERE catalog='$catalog' and artikul='$artikul'");
echo $sql;
$result = mysql_fetch_array($query);
$name= trim( preg_replace( '/\s\s+/', " ", strip_tags($result[name]) ) );
$id = $result[id];
$artikul = $result[artikul];
$brend = $result[brend];
$name = $result[name];
$info = $result[info];
$format = $result[format];
$type = $result[type];
$price = $result[price];
$valut = $result[valut];
$seria = $result[seria];
$category = $result[category];
$product = $result[product];
$selekt = $result[selekt];
$menager = $result[menager];
$s1 = $result[s1];
$s2 = $result[s2];
$s3 = $result[s3];
if ( (!empty($catalog)) and (!empty($artikul)) ) { //$artikul
$num_rows = mysql_num_rows($query); // 3 catalog, file.php,
if (!empty($_SESSION['admin'])) {echo "<p>3 - catalog, file.php brend.php , artikul \ $table / $num_rows </p>";}
if ($num_rows=="1") {if (file_exists("title.php")) {include ("title.php"); exit;} } // 3 bilding_foto.html
else {echo "<p style='color:#a00;'> = $num_rows</p>"; Err404();}
exit;
}
else {Err404();}
}
}
}
}
####################################################### 4 #########################################################################
if (!empty($segments[1])) { //URL $catalog_$file.html
$catalog =$segments[0];
$file = preg_replace("~.html~",'',$segments[1]);
if (!file_exists("$catalog/brend.php")) { // $catalog/brend.php
$artikul=$file;
include 'mysql/init.php';
$query = mysql_query("SELECT * FROM $table WHERE catalog='$catalog' and artikul='$artikul'");
$result = mysql_fetch_array($query);
$name= trim( preg_replace( '/\s\s+/', " ", strip_tags($result[name]) ) );
$id = $result[id];
$artikul = $result[artikul];
$brend = $result[brend];
$name = $result[name];
$info = $result[info];
$format = $result[format];
$type = $result[type];
$price = $result[price];
$valut = $result[valut];
$seria = $result[seria];
$category = $result[category];
$product = $result[product];
$selekt = $result[selekt];
$menager = $result[menager];
$s1 = $result[s1];
$s2 = $result[s2];
$s3 = $result[s3];
if ( (!empty($catalog)) and (!empty($artikul)) ) { //4 - $catalog $artikul
$num_rows = mysql_num_rows($query);
if (!empty($_SESSION['admin'])) {echo "<p>4 - catalog, catalog artikul / $table / $num_rows </p>";}
if ($num_rows=="1") {if (file_exists("title.php")) {include ("title.php"); exit;} }
else {echo "<p style='color:#a00;'> = $num_rows</p>"; Err404();}
exit;
}
else {Err404();}
}
}
######################################################### 5 #######################################################################
if (empty($segments[1])) { //URL $catalog.html
#$artikul =$segments[0];
$artikul = preg_replace("~.html~",'',$segments[0]);
if (!file_exists("$catalog/brend.php")) { // $catalog/brend.php
include 'mysql/init.php';
$query = mysql_query("SELECT * FROM $table WHERE catalog='' and artikul='$artikul'");
$result = mysql_fetch_array($query);
$name= trim( preg_replace( '/\s\s+/', " ", strip_tags($result[name]) ) );
$id = $result[id];
$artikul = $result[artikul];
$brend = $result[brend];
$name = $result[name];
$info = $result[info];
$format = $result[format];
$type = $result[type];
$price = $result[price];
$valut = $result[valut];
$seria = $result[seria];
$category = $result[category];
$product = $result[product];
$selekt = $result[selekt];
$menager = $result[menager];
$s1 = $result[s1];
$s2 = $result[s2];
$s3 = $result[s3];
if (!empty($artikul)) { //5 - $catalog
$num_rows = mysql_num_rows($query); //5 - $catalog $artikul
if (!empty($_SESSION['admin'])) {echo "<p>5 - Artikul \id = $id \ catalog, artikul \ $table / $num_rows </p>";}
if ($num_rows=="1") {if (file_exists("title.php")) {include ("title.php"); exit;} } //5 - foto.html
else {echo "<p style='color:#a00;'> = $num_rows</p>"; Err404();}
exit;
}
else {Err404();}
}
}
############################################################# 6 ###################################################################
$catalog = preg_replace("~.html~",'',$segments[0]); // $catalog.html,
if ( (file_exists("$catalog")) and ($uri== $segments[0]) ) { // $catalog index.php,
if (file_exists("$catalog/index.php")) {
if (!empty($_SESSION['admin'])) {echo "<p>6 - $catalog index.php, index.php controller/catalog.php</p>";}
$file="index"; include 'title.php'; // , title.php
exit;
}
}
Function Calls
| ob_start | 1 |
| session_start | 1 |
Stats
| MD5 | affa6126660e977453cb5ab24180c9ef |
| Eval Count | 0 |
| Decode Time | 173 ms |