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 class R{ function a($r,$c){ $arg=[]; $t=$r; if(preg_match('~/\{:([a-z0-9]+)\}~i', ..
Decoded Output download
<?php
class R{ function a($r,$c){ $arg=[]; $t=$r; if(preg_match('~/\{:([a-z0-9]+)\}~i', $t,$m)){ $arg[]=$m[1]; $t=str_replace($m[0], '/---', $t); if(preg_match('~/\{:([a-z0-9]+)\}~i', $t,$m)){ $arg[]=$m[1]; $t=str_replace($m[0], '/---', $t); if(preg_match('~/\{:([a-z0-9]+)\}~i', $t,$m)){ $arg[]=$m[1]; $t=str_replace($m[0], '/---', $t); } } } $this->arg[$t]=$arg; $this->r[$t]=$c; } function e(){ $s=$_SERVER; $i='PATH_INFO'; $p=isset($s[$i])?$s[$i]:'/'; if(isset($this->r[$p])){ if(is_string($this->r[$p])&&strpos($this->r[$p], '@')!==false){ $this->r[$p]=explode('@', $this->r[$p]); } $this->r[$p](); }else{ $af=[]; foreach ($this->arg as $key => $value) { $args=[]; if(count($this->arg[$key])>0){ if(substr($p, strlen($p)-1)=='/'){ $p=substr($p, 0,strlen($p)-1); } $auth=true; $shabahat[$key]=0; $r=$this->r[$key]; $thisrouteaddr=explode('/', substr($key, 1)); $thisaddr=explode('/', substr($p, 1)); $args=[]; if(count($thisaddr)==count($thisrouteaddr)){ $cta=count($thisaddr); for($i=0;$i<$cta;$i++){ if($thisrouteaddr[$i]){ $args[$key][]=$thisaddr[$i]; } if($thisaddr[$i]==$thisrouteaddr[$i]){ if(($key2 = array_search($thisaddr[$i], $args[$key])) !== false) { unset($args[$key][$key2]); } $shabahat[$key]+=2; }else{ $shabahat[$key]+=1; } } }else{ if(!isset($auth)){ $auth=false; } } }else{ if(!isset($auth)){ $auth=false; } } $af+=$args; } $sahihtouter='esfewfef'; $bestshabahat=0; foreach ($shabahat as $key => $value) { if($value>$bestshabahat){ $sahihtouter=$key; $bestshabahat=$value; } } if($auth&&$sahihtouter!='esfewfef'){ if(is_string($this->r[$sahihtouter])&&strpos($this->r[$sahihtouter],'@')!==false){ $this->r[$sahihtouter]=explode('@', $this->r[$sahihtouter]); } call_user_func_array($this->r[$sahihtouter], $af[$sahihtouter]); }else{ echo 'does not exist'; } } } }
?>
Did this file decode correctly?
Original Code
<?php
class R{ function a($r,$c){ $arg=[]; $t=$r; if(preg_match('~/\{:([a-z0-9]+)\}~i', $t,$m)){ $arg[]=$m[1]; $t=str_replace($m[0], '/---', $t); if(preg_match('~/\{:([a-z0-9]+)\}~i', $t,$m)){ $arg[]=$m[1]; $t=str_replace($m[0], '/---', $t); if(preg_match('~/\{:([a-z0-9]+)\}~i', $t,$m)){ $arg[]=$m[1]; $t=str_replace($m[0], '/---', $t); } } } $this->arg[$t]=$arg; $this->r[$t]=$c; } function e(){ $s=$_SERVER; $i='PATH_INFO'; $p=isset($s[$i])?$s[$i]:'/'; if(isset($this->r[$p])){ if(is_string($this->r[$p])&&strpos($this->r[$p], '@')!==false){ $this->r[$p]=explode('@', $this->r[$p]); } $this->r[$p](); }else{ $af=[]; foreach ($this->arg as $key => $value) { $args=[]; if(count($this->arg[$key])>0){ if(substr($p, strlen($p)-1)=='/'){ $p=substr($p, 0,strlen($p)-1); } $auth=true; $shabahat[$key]=0; $r=$this->r[$key]; $thisrouteaddr=explode('/', substr($key, 1)); $thisaddr=explode('/', substr($p, 1)); $args=[]; if(count($thisaddr)==count($thisrouteaddr)){ $cta=count($thisaddr); for($i=0;$i<$cta;$i++){ if($thisrouteaddr[$i]){ $args[$key][]=$thisaddr[$i]; } if($thisaddr[$i]==$thisrouteaddr[$i]){ if(($key2 = array_search($thisaddr[$i], $args[$key])) !== false) { unset($args[$key][$key2]); } $shabahat[$key]+=2; }else{ $shabahat[$key]+=1; } } }else{ if(!isset($auth)){ $auth=false; } } }else{ if(!isset($auth)){ $auth=false; } } $af+=$args; } $sahihtouter='esfewfef'; $bestshabahat=0; foreach ($shabahat as $key => $value) { if($value>$bestshabahat){ $sahihtouter=$key; $bestshabahat=$value; } } if($auth&&$sahihtouter!='esfewfef'){ if(is_string($this->r[$sahihtouter])&&strpos($this->r[$sahihtouter],'@')!==false){ $this->r[$sahihtouter]=explode('@', $this->r[$sahihtouter]); } call_user_func_array($this->r[$sahihtouter], $af[$sahihtouter]); }else{ echo 'does not exist'; } } } }
?>
Function Calls
| None |
Stats
| MD5 | cff54d89d003ffdcaf0ae8d351d8a5cb |
| Eval Count | 0 |
| Decode Time | 74 ms |