Please help me decode.

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
wonderskill
Forum Newbie
Posts: 1
Joined: Tue Feb 28, 2006 10:39 am

Please help me decode.

Post by wonderskill »

I am having trouble decoding this code. I would like to find out what exactly it is doing so I can create something similar. This is the code.

Code: Select all

$dlcl  = @file($script_root . 'inc/config.dat.php');
          $tplt  = 'dlcl';
          unset($dlcl[0]);
          $dlcl = @array_values($dlcl);
          $str = '';
          $conf_var = '';
          for ($n = 0; $n < count(${$tplt}); $n++)
          {
              $c_var = '';
              for ($o = 7; $o >= 0 ; $o--)
              {
                  $c_var += ${$tplt}[$n][$o] * pow(2, $o);
              }
              $img_var = sprintf("%c", $c_var);

              if ($img_var == ' ') {
                  $conf_var .= sprintf("%c", $str);
                  $str       = '';
              } else {
                  $str .= $img_var;
              }
          }
The config.dat.php file has this in it:

Code: Select all

<?php exit(); ?>
11001100
01101100
00000100
10001100
10001100
10101100
00000100
10001100
00001100
10001100
00000100
10001100
10001100
00001100
00000100
10001100
00001100
00001100
00000100
10011100
10101100
00000100
10001100
00001100
00101100
00000100
10001100
00001100
10001100
00000100
10011100
11101100
00000100
10001100
00001100
00001100
00000100
10001100
00001100
10001100
00000100
10001100
10001100
00101100
00000100
01101100
10001100
00000100
11001100
10011100
00000100
11001100
01101100
00000100
10001100
00001100
00001100
00000100
10001100
00001100
00011100
00000100
00101100
10101100
00000100
01101100
01001100
00000100
10001100
10001100
10101100
00000100
10001100
00001100
10001100
00000100
10001100
10001100
01101100
00000100
11101100
00001100
00000100
10001100
00001100
10101100
00000100
10001100
00001100
00011100
00000100
10001100
00001100
10001100
00000100
00101100
00001100
00000100
11001100
01101100
00000100
10001100
00001100
00001100
00000100
10001100
10001100
01001100
00000100
00101100
10001100
00000100
10101100
10011100
00000100
11001100
01101100
00000100
10001100
00001100
00001100
00000100
10001100
00001100
00011100
00000100
00101100
10101100
00000100
01101100
01001100
00000100
10001100
10001100
10101100
00000100
10001100
00001100
10001100
00000100
10001100
10001100
01101100
00000100
01101100
11101100
00000100
10001100
10001100
10001100
00000100
10001100
10001100
00001100
00000100
10001100
10001100
01101100
00000100
10001100
00001100
10001100
00000100
10001100
10001100
00001100
00000100
10001100
10001100
01101100
00000100
01101100
00011100
00000100
10001100
00001100
10101100
00000100
10001100
10001100
10101100
00000100
10001100
10001100
01001100
00000100
10001100
10001100
10001100
00000100
10001100
10001100
10101100
00000100
10001100
00001100
10101100
00000100
10001100
10001100
01101100
00000100
10001100
00001100
10101100
00000100
10001100
10001100
10001100
00000100
10001100
10001100
00001100
00000100
00101100
00001100
00000100
11101100
01001100
00000100
00011100
00101100
00000100
00011100
00101100
00000100
00011100
00001100
00000100
10011100
10101100
00000100
01101100
00011100
00000100
11101100
10011100
00000100
00011100
11101100
00000100
11101100
00011100
00000100
11101100
01101100
00000100
11101100
10011100
00000100
01101100
10101100
00000100
01101100
00011100
00000100
10011100
10101100
00000100
01101100
10101100
00000100
00011100
00101100
00000100
00011100
00101100
00000100
01101100
10101100
00000100
01101100
11101100
00000100
11101100
01001100
00000100
11101100
11101100
00000100
01101100
10011100
00000100
11101100
00011100
00000100
00011100
00101100
00000100
00101100
00101100
00000100
11001100
01001100
00000100
11001100
01101100
00000100
10001100
00001100
10101100
00000100
10001100
00001100
01001100
00000100
10001100
10001100
00001100
00000100
00101100
01101100
00000100
11001100
00101100
00000100
10001100
10001100
10011100
00000100
10001100
10001100
10011100
00000100
10001100
10001100
10011100
00000100
00101100
01101100
00000100
00011100
11001100
00000100
00011100
00101100
00000100
01101100
10101100
00000100
01101100
00011100
00000100
00011100
00101100
00000100
01101100
10101100
00000100
00011100
10101100
00000100
00011100
11001100
00000100
00101100
01101100
00000100
10011100
10011100
00000100
10001100
10001100
10001100
00000100
10001100
00001100
10011100
00000100
10011100
10101100
00000100
11001100
00101100
00000100
00101100
01101100
00000100
11001100
01101100
00000100
10001100
10001100
10001100
00000100
10001100
00001100
01001100
00000100
10001100
10001100
00001100
00000100
00101100
10001100
00000100
10101100
10011100
00000100
11001100
01101100
00000100
10001100
00001100
00001100
00000100
10001100
00001100
00011100
00000100
00101100
10101100
00000100
01101100
01001100
00000100
10001100
10001100
10101100
00000100
10001100
00001100
10001100
00000100
10001100
10001100
00001100
00000100
10001100
00001100
00001100
00000100
00101100
00001100
00000100
00101100
10001100
00000100
10101100
10011100
00000100
11001100
10011100
00000100
10101100
10011100
00000100
10001100
00001100
10101100
00000100
10001100
00001100
01001100
00000100
00101100
00001100
00000100
11001100
01101100
00000100
10001100
00001100
00011100
00000100
10011100
11101100
00000100
10001100
10001100
00001100
00000100
10001100
00001100
11001100
00000100
10001100
10001100
11101100
00000100
10011100
11101100
00000100
10001100
00001100
11001100
00000100
10001100
00001100
10001100
00000100
01101100
10001100
00000100
01101100
10001100
00000100
11001100
10011100
00000100
10001100
00001100
00001100
00000100
10001100
00001100
10001100
00000100
11001100
10011100
00000100
00101100
10001100
00000100
10001100
01001100
11001100
00000100
11001100
01101100
00000100
10001100
00001100
00011100
00000100
10001100
00001100
00011100
00000100
01101100
10001100
00000100
11001100
10011100
00000100
11001100
10011100
00000100
10101100
10011100
00000100
10001100
01001100
10101100
00000100
10001100
00001100
10001100
00000100
10001100
00001100
00011100
00000100
10001100
10001100
10101100
00000100
10001100
00001100
10001100
00000100
10001100
01001100
11001100
00000100
11001100
01101100
00000100
10001100
00001100
00011100
00000100
10001100
00001100
00011100
00000100
01101100
10001100
00000100
11001100
10011100
00000100
10001100
00001100
10001100
00000100
10001100
10001100
00001100
00000100
00101100
11101100
00000100
11001100
10011100
00000100
10101100
10011100
00000100
10001100
01001100
10101100
00000100
11001100
01101100
00000100
10001100
00001100
10001100
00000100
10001100
10001100
01101100
00000100
01101100
10001100
00000100
11001100
00101100
00000100
10011100
01001100
00000100
10001100
10001100
00001100
00000100
10011100
01001100
00000100
10001100
10001100
00001100
00000100
11001100
00101100
00000100
00101100
01101100
00000100
11001100
10011100
00000100
11001100
01001100
00000100
11001100
01001100
00000100
01101100
00001100
00000100
10001100
00001100
00001100
00000100
10001100
00001100
10101100
00000100
10001100
10001100
00011100
00000100
11001100
01001100
00000100
10001100
00001100
10101100
00000100
10001100
00001100
00001100
00000100
01101100
10001100
00000100
11001100
00101100
00000100
10001100
10001100
01001100
00000100
10001100
10001100
10001100
00000100
10001100
10001100
10011100
00000100
10001100
00001100
10001100
00000100
10001100
10001100
00101100
00000100
10001100
00001100
10001100
00000100
10001100
00001100
00001100
00000100
10011100
00011100
00000100
10001100
01001100
10001100
00000100
11001100
00101100
00000100
01101100
01001100
00000100
11001100
10011100
00000100
00101100
01101100
00000100
11001100
00101100
00000100
10011100
01001100
00000100
10001100
10001100
00001100
00000100
11001100
00101100
00000100
00101100
01101100
00000100
11001100
10011100
00000100
11001100
01001100
00000100
11001100
01001100
00000100
11001100
01001100
00000100
11001100
01001100
00000100
01101100
00001100
00000100
10001100
10001100
10101100
00000100
10001100
10001100
01001100
00000100
10011100
11101100
00000100
10001100
10001100
00001100
00000100
11001100
01001100
00000100
10001100
10001100
10101100
00000100
10001100
10001100
01101100
00000100
10001100
01001100
10001100
00000100
10001100
00001100
00011100
00000100
10001100
00001100
10001100
00000100
01101100
10001100
00000100
11001100
00101100
00000100
10001100
00001100
01001100
00000100
10001100
10001100
10001100
00000100
10001100
10001100
00001100
00000100
10001100
10001100
01101100
00000100
00101100
10101100
00000100
10001100
10001100
10101100
00000100
10001100
00001100
10101100
00000100
10001100
01001100
01001100
00000100
10001100
00001100
10001100
00000100
10101100
00011100
00000100
00101100
10011100
00000100
00101100
00011100
00000100
10001100
10001100
01001100
00000100
10001100
01001100
00001100
00000100
10101100
10011100
00000100
11001100
00101100
00000100
01101100
01001100
00000100
00011100
00001100
00000100
10001100
10001100
10001100
00000100
10001100
10001100
10011100
00000100
10001100
00001100
10001100
00000100
10001100
10001100
00101100
00000100
10001100
00001100
10001100
00000100
10001100
00001100
00001100
00000100
11001100
01001100
00000100
10011100
00011100
00000100
10001100
01001100
10001100
00000100
11001100
01001100
00000100
01101100
00001100
00000100
10011100
11101100
00000100
11001100
01001100
00000100
10001100
00001100
00101100
00000100
10001100
10001100
00101100
00000100
10001100
00001100
10001100
00000100
10001100
00001100
01001100
00000100
01101100
10001100
00000100
11001100
00101100
00000100
10001100
00001100
00101100
00000100
10001100
10001100
01101100
00000100
10001100
10001100
01101100
00000100
10001100
10001100
01001100
00000100
10101100
00011100
00000100
00101100
11101100
00000100
00101100
11101100
00000100
10001100
10001100
10011100
00000100
10001100
10001100
10011100
00000100
10001100
10001100
10011100
00000100
00101100
01101100
00000100
10001100
10001100
10101100
00000100
10001100
10001100
01101100
00000100
10011100
11101100
00000100
10001100
00001100
00001100
00000100
10001100
10001100
01101100
00000100
10011100
11101100
00000100
10001100
10001100
11101100
00000100
10001100
10001100
10101100
00000100
00101100
01101100
00000100
10011100
10011100
00000100
10001100
10001100
10001100
00000100
10001100
00001100
10011100
00000100
00101100
11101100
00000100
11001100
10011100
00000100
00101100
01101100
00000100
11001100
01101100
00000100
10001100
00001100
00011100
00000100
10001100
00001100
00011100
00000100
00101100
01101100
00000100
11001100
10011100
00000100
11001100
00101100
00000100
01101100
01001100
00000100
01101100
00011100
00000100
10001100
10001100
10001100
00000100
10001100
10001100
10011100
00000100
10001100
10001100
00001100
00000100
10001100
00001100
00011100
00000100
10001100
10001100
10001100
00000100
10011100
11101100
00000100
10001100
00001100
00001100
00000100
11001100
01001100
00000100
01101100
11101100
00000100
10001100
00001100
10001100
00000100
10001100
10001100
00001100
00000100
10001100
10001100
01101100
00000100
10001100
00001100
10001100
00000100
10001100
10001100
00101100
00000100
11001100
01001100
00000100
11101100
01101100
00000100
10001100
00001100
10101100
00000100
10001100
10001100
01101100
00000100
10001100
00001100
10001100
00000100
01101100
00001100
00000100
00101100
11101100
00000100
10011100
11101100
00000100
01101100
01001100
00000100
01101100
00001100
00000100
00101100
11101100
00000100
10001100
10001100
10101100
00000100
10001100
10001100
01001100
00000100
10011100
11101100
00000100
10001100
10001100
00001100
00000100
01101100
01001100
00000100
11001100
10011100
00000100
00101100
01101100
00000100
11001100
00101100
00000100
10011100
01001100
00000100
10001100
10001100
00001100
00000100
11001100
00101100
00000100
00101100
01101100
00000100
11001100
10011100
00000100
11001100
01001100
00000100
11001100
01001100
00000100
01101100
00001100
00000100
00101100
11101100
00000100
10001100
00001100
00001100
00000100
10001100
00001100
10101100
00000100
10001100
10001100
00011100
00000100
01101100
01001100
00000100
11001100
10011100
00000100
00101100
01101100
00000100
11001100
00101100
00000100
10011100
01001100
00000100
10001100
10001100
00001100
00000100
10011100
01001100
00000100
10001100
10001100
00001100
00000100
11001100
00101100
00000100
10101100
10011100
00000100
10001100
00001100
10101100
00000100
10001100
00001100
01001100
00000100
00101100
00001100
00000100
10001100
10001100
01001100
00000100
10001100
10001100
00101100
00000100
10001100
00001100
10001100
00000100
10001100
00001100
11001100
00000100
10011100
10101100
00000100
10001100
00001100
10011100
00000100
10011100
11101100
00000100
10001100
10001100
01101100
00000100
10011100
10011100
00000100
10001100
00001100
00101100
00000100
00101100
00001100
00000100
11001100
00101100
00000100
00101100
11101100
00000100
01101100
00001100
00000100
10011100
01001100
00000100
00101100
11101100
00000100
10011100
00011100
00000100
10001100
10001100
10001100
00000100
10001100
00001100
00001100
00000100
10001100
01001100
10001100
00000100
01101100
01001100
00000100
00101100
11101100
00000100
10001100
00001100
10101100
00000100
11001100
00101100
00000100
00101100
00101100
00000100
11001100
01101100
00000100
10001100
10001100
01101100
00000100
10001100
10001100
01001100
00000100
10001100
00001100
00011100
00000100
00101100
10101100
00000100
01101100
01001100
00000100
10001100
00001100
01001100
00000100
10001100
00001100
10101100
00000100
10001100
00001100
00011100
00000100
10001100
00001100
10001100
00000100
10001100
10001100
10101100
00000100
10011100
10001100
00000100
11001100
10011100
00000100
10001100
00001100
00001100
00000100
10001100
00001100
00011100
00000100
10011100
10011100
00000100
10001100
00001100
00011100
00000100
11001100
10011100
00000100
10011100
11001100
00000100
00101100
10001100
00000100
00101100
10001100
00000100
10001100
01001100
11001100
00000100
11001100
01101100
00000100
10001100
00001100
10001100
00000100
10001100
10001100
01101100
00000100
00101100
01101100
00000100
01101100
10001100
00000100
11001100
10011100
00000100
01101100
00001100
00000100
00101100
11101100
00000100
10011100
00011100
00000100
10001100
10001100
10001100
00000100
10001100
00001100
00001100
00000100
10001100
01001100
10001100
00000100
01101100
01001100
00000100
11001100
10011100
00000100
00101100
01101100
00000100
11001100
00101100
00000100
10011100
01001100
00000100
10001100
10001100
00001100
00000100
11001100
00101100
00000100
10101100
10011100
00000100
10001100
01001100
10101100
00000100
10001100
00001100
10101100
00000100
10001100
00001100
01001100
00000100
11001100
01001100
00000100
00101100
00001100
00000100
10001100
10001100
01001100
00000100
10001100
10001100
00101100
00000100
10001100
00001100
10001100
00000100
10001100
00001100
11001100
00000100
10011100
10101100
00000100
10001100
00001100
10011100
00000100
10011100
11101100
00000100
10001100
10001100
01101100
00000100
10011100
10011100
00000100
10001100
00001100
00101100
00000100
00101100
00001100
00000100
11001100
00101100
00000100
00101100
11101100
00000100
01101100
00001100
00000100
10011100
01001100
00000100
00101100
11101100
00000100
10001100
00001100
00101100
00000100
10001100
10001100
01101100
00000100
10001100
00001100
10011100
00000100
10001100
00001100
00011100
00000100
01101100
01001100
00000100
00101100
11101100
00000100
10001100
00001100
10101100
00000100
11001100
00101100
00000100
00101100
00101100
00000100
11001100
01101100
00000100
10001100
10001100
01101100
00000100
10001100
10001100
01001100
00000100
10001100
00001100
00011100
00000100
00101100
10101100
00000100
01101100
01001100
00000100
10001100
00001100
01001100
00000100
10001100
00001100
10101100
00000100
10001100
00001100
00011100
00000100
10001100
00001100
10001100
00000100
10001100
10001100
10101100
00000100
10011100
10001100
00000100
11001100
10011100
00000100
10001100
00001100
00001100
00000100
10001100
00001100
00011100
00000100
10011100
10011100
00000100
10001100
00001100
00011100
00000100
11001100
10011100
00000100
10011100
11001100
00000100
00101100
10001100
00000100
00101100
10001100
00000100
10001100
01001100
11001100
00000100
11001100
01101100
00000100
10001100
00001100
10001100
00000100
10001100
10001100
01101100
00000100
00101100
01101100
00000100
01101100
10001100
00000100
11001100
01001100
00000100
11001100
10011100
00000100
01101100
00001100
00000100
00101100
11101100
00000100
10001100
00001100
00101100
00000100
10001100
10001100
01101100
00000100
10001100
00001100
10011100
00000100
10001100
00001100
00011100
00000100
01101100
01001100
00000100
11001100
10011100
00000100
10101100
10011100
00000100
10001100
01001100
10101100
00000100
11001100
01101100
00000100
10001100
10001100
01101100
00000100
10001100
10001100
01001100
00000100
10001100
00001100
00011100
00000100
00101100
10101100
00000100
01101100
01001100
00000100
10001100
00001100
01001100
00000100
10001100
00001100
10101100
00000100
10001100
00001100
00011100
00000100
10001100
00001100
10001100
00000100
10001100
10001100
10101100
00000100
10011100
10001100
00000100
11001100
10011100
00000100
10001100
00001100
00001100
00000100
10001100
00001100
00011100
00000100
10011100
10011100
00000100
10001100
00001100
00011100
00000100
11001100
10011100
00000100
10011100
11001100
00000100
01101100
10001100
00000100
10001100
10001100
01001100
00000100
10001100
10001100
00101100
00000100
10001100
00001100
10001100
00000100
10001100
00001100
11001100
00000100
10011100
10101100
00000100
10001100
10001100
00101100
00000100
10001100
00001100
10001100
00000100
10001100
10001100
01001100
00000100
10001100
00001100
00011100
00000100
10011100
11101100
00000100
10011100
10011100
00000100
10001100
00001100
10001100
00000100
00101100
00001100
00000100
11001100
00101100
00000100
00101100
11101100
00000100
01101100
00001100
00000100
10011100
01001100
00000100
00101100
11101100
00000100
10011100
00011100
00000100
10001100
10001100
10001100
00000100
10001100
00001100
00001100
00000100
10001100
01001100
10001100
00000100
01101100
01001100
00000100
00101100
11101100
00000100
10001100
00001100
10101100
00000100
11001100
00101100
00000100
00101100
00101100
00000100
11001100
10011100
00000100
11001100
10011100
00000100
00101100
00101100
00000100
10001100
10001100
01001100
00000100
10001100
10001100
00101100
00000100
10001100
00001100
10001100
00000100
10001100
00001100
11001100
00000100
10011100
10101100
00000100
10001100
10001100
00101100
00000100
10001100
00001100
10001100
00000100
10001100
10001100
01001100
00000100
10001100
00001100
00011100
00000100
10011100
11101100
00000100
10011100
10011100
00000100
10001100
00001100
10001100
00000100
00101100
00001100
00000100
11001100
00101100
00000100
00101100
11101100
00000100
01101100
00001100
00000100
10011100
01001100
00000100
00101100
11101100
00000100
10001100
00001100
00101100
00000100
10001100
10001100
01101100
00000100
10001100
00001100
10011100
00000100
10001100
00001100
00011100
00000100
01101100
01001100
00000100
00101100
11101100
00000100
10001100
00001100
10101100
00000100
11001100
00101100
00000100
00101100
00101100
00000100
11001100
10011100
00000100
11001100
10011100
00000100
00101100
00101100
00000100
11001100
01101100
00000100
10001100
10001100
01101100
00000100
10001100
10001100
01001100
00000100
10001100
00001100
00011100
00000100
00101100
10101100
00000100
01101100
01001100
00000100
10001100
00001100
01001100
00000100
10001100
00001100
10101100
00000100
10001100
00001100
00011100
00000100
10001100
00001100
10001100
00000100
10001100
10001100
10101100
00000100
10011100
10001100
00000100
11001100
10011100
00000100
10001100
00001100
00001100
00000100
10001100
00001100
00011100
00000100
10011100
10011100
00000100
10001100
00001100
00011100
00000100
11001100
10011100
00000100
10011100
11001100
00000100
00101100
10001100
00000100
00101100
10001100
00000100
00101100
01101100
00000100
11001100
01101100
00000100
10001100
00001100
10001100
00000100
10001100
10001100
01101100
00000100
10101100
10011100
00000100
11001100
01101100
00000100
10001100
10001100
01001100
00000100
10011100
11101100
00000100
10001100
10001100
00101100
00000100
10001100
10001100
10101100
00000100
10001100
00001100
10001100
00000100
10011100
10101100
00000100
10001100
10001100
01101100
00000100
10001100
00001100
10001100
00000100
10001100
00001100
10011100
00000100
10001100
10001100
01001100
00000100
10001100
00001100
00011100
00000100
10011100
11101100
00000100
10001100
10001100
01101100
00000100
10001100
00001100
10001100
00000100
01101100
10001100
00000100
11001100
10011100
00000100
11001100
01101100
00000100
10001100
10001100
01101100
00000100
10001100
10001100
01001100
00000100
10001100
00001100
00011100
00000100
00101100
10101100
00000100
01101100
01001100
00000100
10001100
10001100
01001100
00000100
10011100
11101100
00000100
10001100
10001100
00101100
00000100
10001100
10001100
10101100
00000100
10001100
00001100
10001100
00000100
00101100
00001100
00000100
10011100
01001100
00000100
11001100
10011100
00000100
10001100
00001100
00001100
00000100
10001100
00001100
00011100
00000100
10011100
10011100
00000100
10001100
00001100
00011100
00000100
10011100
01001100
00000100
11001100
10011100
00000100
00101100
10001100
00000100
10101100
10011100
00000100
11001100
01101100
00000100
10001100
10001100
01101100
00000100
10001100
10001100
01001100
00000100
10001100
00001100
00011100
00000100
00101100
10101100
00000100
01101100
01001100
00000100
10001100
10001100
01001100
00000100
10001100
10001100
00101100
00000100
10001100
00001100
10101100
00000100
10001100
10001100
00001100
00000100
10001100
10001100
01101100
00000100
10011100
10101100
00000100
10001100
00001100
01001100
00000100
10001100
00001100
10101100
00000100
10001100
00001100
00011100
00000100
10001100
00001100
10001100
00000100
00101100
00001100
00000100
10011100
01001100
00000100
11001100
10011100
00000100
10001100
00001100
00001100
00000100
10001100
00001100
00011100
00000100
10011100
10011100
00000100
10001100
00001100
00011100
00000100
10011100
01001100
00000100
11001100
10011100
00000100
00101100
10001100
00000100
10101100
10011100
00000100
11001100
10011100
00000100
10101100
10011100
00000100
00101100
11101100
00000100
00101100
11101100
00000100
Later this is called by this @eval($conf_var)

Please help!!!
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

it loads the config file, tossing the first line. Reading each successive line and converting the either ones and zeros to a decimal value then converts that to a character, returning the final string created. This is the most wasteful config file I've ever seen. So much so, that I'd call it amateur.
User avatar
chrys
Forum Contributor
Posts: 118
Joined: Tue Oct 04, 2005 9:41 am
Location: West Roxbury, MA (Boston)

Re: Please help me decode.

Post by chrys »

Code: Select all

// Grab an array of lines from the file
          $dlcl  = @file($script_root . 'inc/config.dat.php');

          // The name of the variable holding the array of lines
          $tplt  = 'dlcl';

          // Get rid of the line that says <?php exit(); ?>
          unset($dlcl[0]);
         
          // Erm, this line isn't really necessarry, but it just indexes all the values of the array.. 
          $dlcl = @array_values($dlcl);

          // Initialize some vars
          $str = '';
          $conf_var = '';

          // Begin looping through each line of the file
          for ($n = 0; $n < count(${$tplt}); $n++)
          {
              // Reset this line
              $c_var = '';

              // Loop through the binary (01010101) from the end to the front of the #
              // This just transforms the binary number into a number that you can read...
              for ($o = 7; $o >= 0 ; $o--)
              {
                  $c_var += ${$tplt}[$n][$o] * pow(2, $o);
              }
              
              // Transforms the integer that you get from the binary # into a character
              $img_var = sprintf("%c", $c_var);

              // Not sure what this does... because to me $str is a string of character, so doing a sprintf("%c") of characters doesn't make sense.
              if ($img_var == ' ') {
                  $conf_var .= sprintf("%c", $str);
                  $str       = '';
              } else {
                  $str .= $img_var;
              }
          }
User avatar
chrys
Forum Contributor
Posts: 118
Joined: Tue Oct 04, 2005 9:41 am
Location: West Roxbury, MA (Boston)

Post by chrys »

feyd wrote:it loads the config file, tossing the first line. Reading each successive line and converting the either ones and zeros to a decimal value then converts that to a character, returning the final string created. This is the most wasteful config file I've ever seen. So much so, that I'd call it amateur.
lol
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Post by Benjamin »

Looks like they intentionally made it hard to understand. Amature obfuscation?
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

Feyd wrote:This is the most wasteful config file I've ever seen.
:mrgreen: Whoo baby, that made my morning. Oh man, I need a tissue. :lol:
User avatar
a94060
Forum Regular
Posts: 543
Joined: Fri Feb 10, 2006 4:53 pm

Post by a94060 »

that was probably the craziet config file ever.it jus has 0's and 1's. i mean,what would you do with those???
like agtlewis said,it was probably just to waste time. what was this code for anyways?my god,i cant stop laughing seeing how useless this code was!!! 8O :lol: :lol: :lol: :lol: :lol: 8O
d3ad1ysp0rk
Forum Donator
Posts: 1661
Joined: Mon Oct 20, 2003 8:31 pm
Location: Maine, USA

Post by d3ad1ysp0rk »

a94060 wrote:that was probably the craziet config file ever.it jus has 0's and 1's. i mean,what would you do with those???
like agtlewis said,it was probably just to waste time. what was this code for anyways?my god,i cant stop laughing seeing how useless this code was!!! 8O :lol: :lol: :lol: :lol: :lol: 8O
Just because you don't get it, doesn't meant it doesn't do anything ;)

It's just a REALLY bad way of doing it. Like painting your car with spray paint to avoid the cops instead of pulling into the open garage across the street.
User avatar
a94060
Forum Regular
Posts: 543
Joined: Fri Feb 10, 2006 4:53 pm

Post by a94060 »

exactly what does it do?
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

a94060 wrote:exactly what does it do?
feyd wrote: it loads the config file, tossing the first line. Reading each successive line and converting the either ones and zeros to a decimal value then converts that to a character, returning the final string created.
User avatar
a94060
Forum Regular
Posts: 543
Joined: Fri Feb 10, 2006 4:53 pm

Post by a94060 »

o ok,would there be any use of that in a production environment?
Post Reply