-4

Who know, how to decode this code?

foreach(array(155=>'QnZYJQ|WZWOQ') as $i1=>$i2){
    $i3=strrev("rtrts");
    define("I".$i1,$i3($i2,'abcdeghijklmopqswyz ~`!@#%^&*()_-+|{}[];:<>,./?ABCDEGHIJKLMOPQSWYZ','ZYWSQPOMLKJIHGEDCBA?/.,><:;][}{|+-_)(*&^%#@!`~ zywsqpomlkjihgedcba'));
} 
$_isIndexPhpScript =TRUE;
unset($_GET[I155], $_POST[I155]);
$GLOBALS[I155] =1; 
require 'cm_ini.php'; 
require $GLOBALS['DEFAULT_INCLUDES_PATH'] .'pages.php';
sectus
  • 15,605
  • 5
  • 55
  • 97
IMWDS
  • 1
  • This question lacks context, and I'm suspicious its related dubious activity since this is obviously some sort of access obfuscation... Found a fuller code sample here... http://pastie.org/pastes/3206507# – 1owk3y Oct 26 '14 at 06:27

1 Answers1

1
  1. Creates constant I155 = 'enable_cache'
  2. Removes $_GET['enable_cache'], $_POST['enable_cache']
  3. Adds global variable $enable_cache = 1

The main part is here

foreach(array(155=>'QnZYJQ|WZWOQ') as $i1=>$i2){ 
// $i1 = 155, $i2 = 'QnZYJQ|WZWOQ'
    $i3=strrev("rtrts");
    // $i3 = strtr -- common php function
    define("I".$i1,$i3($i2,'abcdeghijklmopqswyz ~`!@#%^&*()_-+|{}[];:<>,./?ABCDEGHIJKLMOPQSWYZ','ZYWSQPOMLKJIHGEDCBA?/.,><:;][}{|+-_)(*&^%#@!`~ zywsqpomlkjihgedcba'));
    // executes strtr with QnZYJQ|WZWOQ and predefined dictionary, 
    // result is enable_cache
} 
sectus
  • 15,605
  • 5
  • 55
  • 97