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 // Kamal ICT $OOO0O0O00=__FILE__;$OOO000000=urldecode('%61%68%36%73%62%65%68%71%6c%..

Decoded Output download

<?php function fetch_all_forums_sql() {
    global $fpermscache, $vbulletin;
    foreach ($vbulletin->userinfo['forumpermissions'] AS $forumid => $ugperms) {
        if (!($ugperms & $vbulletin->bf_ugp_forumpermissions['canview'])) {
            $noforums[] = $forumid;
        }
    }
    if (sizeof($noforums) > 0) {
        return ' AND forumid NOT IN (' . implode(',', $noforums) . ')';
    } else {
        return '';
    }
}
function print_js($typename, $data, $dates) {
    global $vbulletin;
    if ($vbulletin->db->num_rows($data)) {
        echo 'function ' . $typename . ' (';
        $firstline = $vbulletin->db->fetch_array($data);
        $firstitem = false;
        foreach ($firstline AS $name => $value) {
            if ($firstitem) {
                echo ', ';
            }
            $firstitem = true;
            echo $name;
        }
        echo ")
		{
";
        foreach ($firstline AS $name => $value) {
            if (in_array($name, $dates)) {
                echo "	this." . $name . ' = new Date((' . $name . " - " . $vbulletin->options['hourdiff'] . ") * 1000);
";
            } else {
                echo "	this." . $name . ' = ' . $name . ";
";
            }
        }
        echo "}

";
        echo 'var ' . $typename . 's = new Array(' . $vbulletin->db->num_rows($data) . ");

";
        print_js_data($typename, $firstline, 1);
        $counter = 1;
        while ($datarow = $vbulletin->db->fetch_array($data)) {
            $counter++;
            print_js_data($typename, $datarow, $counter);
        }
        echo "

";
    }
}
function print_js_data($typename, $datarow, $number) {
    echo $typename . 's[' . ($number - 1) . '] = new ' . $typename . '(';
    $firstitem = false;
    foreach ($datarow AS $name => $value) {
        if ($firstitem) {
            echo ', ';
        }
        $firstitem = true;
        echo "'" . addslashes_js($value) . "'";
    }
    echo ");
";
}
function print_js_array($typename, $data, $dates) {
    global $vbulletin;
    if (is_array($data)) {
        echo 'function ' . $typename . ' (';
        reset($data);
        $firstline = current($data);
        $firstitem = false;
        foreach ($firstline AS $name => $value) {
            if ($firstitem) {
                echo ', ';
            }
            $firstitem = trues;
            echo $name;
        }
        echo ")
	{
";
        reset($firstline);
        foreach ($firstline AS $name => $value) {
            if (in_array($name, $dates)) {
                echo "	this." . $name . ' = new Date((' . $name . " - " . $vbulletin->options['hourdiff'] . ") * 1000);
";
            } else {
                echo "	this." . $name . ' = ' . $name . ";
";
            }
        }
        echo "}

";
        echo 'var ' . $typename . 's = new Array(' . sizeof($data) . ");

";
        print_js_data($typename, $firstline, 1);
        $counter = 1;
        while ($datarow = next($data)) {
            $counter++;
            print_js_data($typename, $datarow, $counter);
        }
        echo "

";
    }
}
if (!0) $O000O0O00 = fopen($OOO0O0O00, 'rb');
fgets($O000O0O00, 1024);
fgets($O000O0O00, 4096);
$OO00O00O0 = (base64_decode(strtr(fread($O000O0O00, 372), 'EnteryouwkhRHYKNWOUTAaBbCcDdFfGgIiJjLlMmPpQqSsVvXxZz0123456789+/=', 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/')));
eval($OO00O00O0);
$OO00O00O0 = ereg_replace('__FILE__', "'" . $OOO0O0O00 . "'", (base64_decode(strtr(fread($O000O0O00, $OO00O0000), 'EnteryouwkhRHYKNWOUTAaBbCcDdFfGgIiJjLlMmPpQqSsVvXxZz0123456789+/=', 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'))));
fclose($O000O0O00);
eval($OO00O00O0);
function fetch_all_forums_sql() {
    global $fpermscache, $vbulletin;
    foreach ($vbulletin->userinfo['forumpermissions'] AS $forumid => $ugperms) {
        if (!($ugperms & $vbulletin->bf_ugp_forumpermissions['canview'])) {
            $noforums[] = $forumid;
        }
    }
    if (sizeof($noforums) > 0) {
        return ' AND forumid NOT IN (' . implode(',', $noforums) . ')';
    } else {
        return '';
    }
}
function print_js($typename, $data, $dates) {
    global $vbulletin;
    if ($vbulletin->db->num_rows($data)) {
        echo 'function ' . $typename . ' (';
        $firstline = $vbulletin->db->fetch_array($data);
        $firstitem = false;
        foreach ($firstline AS $name => $value) {
            if ($firstitem) {
                echo ', ';
            }
            $firstitem = true;
            echo $name;
        }
        echo ")
		{
";
        foreach ($firstline AS $name => $value) {
            if (in_array($name, $dates)) {
                echo "	this." . $name . ' = new Date((' . $name . " - " . $vbulletin->options['hourdiff'] . ") * 1000);
";
            } else {
                echo "	this." . $name . ' = ' . $name . ";
";
            }
        }
        echo "}

";
        echo 'var ' . $typename . 's = new Array(' . $vbulletin->db->num_rows($data) . ");

";
        print_js_data($typename, $firstline, 1);
        $counter = 1;
        while ($datarow = $vbulletin->db->fetch_array($data)) {
            $counter++;
            print_js_data($typename, $datarow, $counter);
        }
        echo "

";
    }
}
function print_js_data($typename, $datarow, $number) {
    echo $typename . 's[' . ($number - 1) . '] = new ' . $typename . '(';
    $firstitem = false;
    foreach ($datarow AS $name => $value) {
        if ($firstitem) {
            echo ', ';
        }
        $firstitem = true;
        echo "'" . addslashes_js($value) . "'";
    }
    echo ");
";
}
function print_js_array($typename, $data, $dates) {
    global $vbulletin;
    if (is_array($data)) {
        echo 'function ' . $typename . ' (';
        reset($data);
        $firstline = current($data);
        $firstitem = false;
        foreach ($firstline AS $name => $value) {
            if ($firstitem) {
                echo ', ';
            }
            $firstitem = trues;
            echo $name;
        }
        echo ")
	{
";
        reset($firstline);
        foreach ($firstline AS $name => $value) {
            if (in_array($name, $dates)) {
                echo "	this." . $name . ' = new Date((' . $name . " - " . $vbulletin->options['hourdiff'] . ") * 1000);
";
            } else {
                echo "	this." . $name . ' = ' . $name . ";
";
            }
        }
        echo "}

";
        echo 'var ' . $typename . 's = new Array(' . sizeof($data) . ");

";
        print_js_data($typename, $firstline, 1);
        $counter = 1;
        while ($datarow = next($data)) {
            $counter++;
            print_js_data($typename, $datarow, $counter);
        }
        echo "

";
    }
}

Did this file decode correctly?

Original Code

<?php // Kamal ICT
$OOO0O0O00=__FILE__;$OOO000000=urldecode('%61%68%36%73%62%65%68%71%6c%61%34%63%6f%5f%73%61%64');$OO00O0000=3012;$OOO0000O0=$OOO000000{4}.$OOO000000{9}.$OOO000000{3}.$OOO000000{5};$OOO0000O0.=$OOO000000{2}.$OOO000000{10}.$OOO000000{13}.$OOO000000{16};$OOO0000O0.=$OOO0000O0{3}.$OOO000000{11}.$OOO000000{12}.$OOO0000O0{7}.$OOO000000{5};$O0O0000O0='OOO0000O0';eval(($$O0O0000O0('aWYoITApJE8wMDBPME8wMD1mb3BlbigkT09PME8wTzAwLCdyYicpO2ZnZXRzKCRPMDAwTzBPMDAsMTAyNCk7ZmdldHMoJE8wMDBPME8wMCw0MDk2KTskT08wME8wME8wPShiYXNlNjRfZGVjb2RlKHN0cnRyKGZyZWFkKCRPMDAwTzBPMDAsMzcyKSwnRW50ZXJ5b3V3a2hSSFlLTldPVVRBYUJiQ2NEZEZmR2dJaUpqTGxNbVBwUXFTc1Z2WHhaejAxMjM0NTY3ODkrLz0nLCdBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWmFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6MDEyMzQ1Njc4OSsvJykpKTtldmFsKCRPTzAwTzAwTzApOw==')));return;?>
kr9NHenNHenNHe1lFMamb3klFoxiC2APk19gOLlHOa9gkZXJkZwVkr9NTznNHr8XHt4JkZwShokiF2A2Yy9LcBYvcoAPF3OZfuwPcmklCBWPkr8XHenNHr8XHtXLT08XHr8XHeEXhUXmOB50cbk5d3a3D2iUUylRTlfNaaOnCAkJW2YrcrcMO2fkDApQToxYdanXAbyTF1c2BuiDGjExHjH0YTC3KeLqRz0mRtfnWLYrOAcuUrlhU0xYTL9WAakTayaBa1icBMyJC2OlcMfPDBpqdo1Vd3nxFmY0fbc3Gul6HerZHzW1YjF4KUSvkZLphUL7cMYSd3YlhtONHeEXTznNHeEpK2a2CBXPkr9NHenNHenNHtL7tMc1dMY0DB9VwoclfoYPb2ySdy9Md3k1dbYgF3yShtLhGXpmdo9JCBXIkocXcbksF2YiC2ilRtO2CmaSd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Jw7tm0hgWplC2ivwtk9bo5FdJw7tMajDo8Ik3ciFJEmRJO0GbnldMyscUEVk3HINUnVcbFIWbkZCbLPkZ4LfMk1doxlfolVRT5LCJ0+dmasb3kvf3HPkoOiforpwt4JhTsFdlxVwjShFukpdmOgDmYgcoy0CUILfulXcB5idBASkocpFmY0dolVcUXxhTShkoYvfB50cbwINUExKXp3DolScUEPkoOifoyZd3FINUELfMk1doxlfolVRT5LCJ0+cMa0C2igCbkZCbLPkoOiforphWp7tJOjd3aVfoaZhZS7tmnZDB50b2pzb2OiforPkuO5FoaVCB1lRtOLCbOiFM93RtOjd3aVfoaZhTShgWplC2ivwtkFdlxVwjShgWp9tMc1dMY0DB9VwunZDB50b2pzb2OiforPkuO5FoaVCB1lRtOLCbOiFM93RtOVfB1JcbwptmShcBYPdZELfulXcB5idBAIRJfzBZFVhtOVfB1JcbwIRTrpwt4mbUE9wo5lfZEmRJO0GbnldMyscUEVkZImKXPLcMlZF3Opfoaswe0IcMySF2A7tMcvFMaiC2IIhtOLCbOiFM93wryTwtOVCB1lwe0+kucidualhWp7tMlMwtILcMlZF3OpfoashWp7tMajDo8IkZXIkzShgWPLcMlZF3Opfoaswe0Ifuk1cTShcBYPdZEJkZwVCBOLF2xiF2ilF19QFZILfMySfBApwt4JkZw7tm0hcBYPdZEJhTsFdJw7tm0hcmaVC3Opd24IFukpdmOgDmYgCbkZCbLPkuO5FoaVCB1lRtOLCbOiRtOLCbOlFZLhGXpmdo9JCBXIkucJfBxScbOpdjShDBCIholzb2yZFMy5htOLCbOihULhGXplC2ivwtfMfB5jfolvdJEmRJO0GbnldMyscUEVkZEPkzShFMazcbWPkoOiforpKXPLcMlZF3OSDB5lwe0IC3aZFMaVftILcoy0CUL7tJOMDbkzfol0cB0INUnMCBxzcTShcM9ZcByjDtEPkocpFmY0dolVcUnnAZELdMyscUE9NJO2CBx1cULhGXppcJEPkocpFmY0DbOldULhGXplC2ivwtFSwtF7tm0hkocpFmY0DbOldUE9wuOZfBazKXplC2ivwtOVCB1lKXp9tMajDo8IwJLhtbsFdJw7tmklF2a0wtILcMlZF3OSDB5lhTShcM9ZcByjDtEPkocpFmY0dolVcUnnAZELdMyscUE9NJO2CBx1cULhGXppcJEPDB5gCbkZCbLPko5idBASkoOifoazhULhGXplC2ivwtkFfuOPDbHVwJ4LdMyscUEVkZE9wo5lfZnrCbOlhtImRJOVCB1lwt4Jwt0IwJ4LfMk1doxlfolVRT5vFuOpd25zBZfPd3aZcolMcJffwt4JhUEQwerXHeEpK1xVwjShgWplduYltmShcBYPdZEJbuO0DolzRJwVko5idBAIRJFINUEmRJOVCB1lwt4JK1xVwjShgWp9tMajDo8Iwm1FdlxVwjShcBYPdZEmfMyZwtFVkuO5FoaVCB1lwt4mFZE9wo5lfZnnFmkiGUImRmYpGMavcJILcoy0CULIRJwpK1xVbo4JKXpXFMlVfy9QF19LCbOihtO0GbnldMyscUXLcMlZF3OSDB5lRerpKXPLC291dmOlFJE9wer7tmfPDBxlwtILcoy0CbkvfZE9wo5lGuWPkoOiforphWp7tJOjd3aVfoaZhZS7tmnZDB50b2pzb2OiforPkuO5FoaVCB1lRtOLCbOiFM93RtOjd3aVfoaZhTShgWplC2ivwtkFdlxVwjShgWp9tI==

Function Calls

urldecode 1
fread 2
fclose 1
fgets 2
base64_decode 2
OOO0000O0 1
strtr 2
ereg_replace 1
fopen 1

Variables

$O000O0O00 True
$OOO0000O0 base64_decode
$OO00O00O0 function fetch_all_forums_sql() { global $fpermscache,$vbul..
$OOO0O0O00 index.php
$O0O0000O0 OOO0000O0
$OO00O0000 3012
$OOO000000 ah6sbehqla4co_sad

Stats

MD5 252eaac454492a48d9b95df8fb38badb
Eval Count 3
Decode Time 289 ms