Hello guys,
Today, I have found something VERY strange with IonCube.
We can view encoded code (not really, it completely differ from the original 'encoded file' but continue to read this thread please...) with ...
IZArc 4.1.6 and notepad++ !!!
Try yourself.
1) Download the official archive of GameCP :
http://gamecp.com/get/from/this/mirror/GameCPX.zip
Now Install IZArc 4.1.6 and notepad++ on your computer (I m using a win7 pro x64 legit FRENCH). Define notepad++ as the default viewer for *.php files.
2) Open GameCPX.zip with IZarc
3) Open "index.php" with notepad++ USING IZArc WINDOW and contextual menu (right clic, open)
You should see this code :
PHP Code:
<?php
/*
GameCP - Game Server Control Panel
Copyright (c) 2004 - 2010 All Rights Reserved.
----------------------------------------------
This document is bound under the GameCP Terms
of Use and MUST NOT be removed, distributed in any form, released
or modified, without written permission from GameCP.
The GameCP Terms of Use are agreed to upon installation
of this software. If you do not agree to them remove GamecP from
your system.
http://gamecp.com/terms.php
The source code or encoded versions of the source code
must ONLY exist on approved GameCP Licensed Servers.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*/
$loadIndex=true;
require('../includes/core/includes/user/session.inc.php');
require('../includes/config.inc.php');
if(isset($_REQUEST['mode']) && $_REQUEST['mode']=="regkey" && $_SESSION['ulevel'] == "1"){
sql_query($safesql->query("UPDATE settings SET value='%s' WHERE name='gcplickey';", array($GameCP->whitelist($_REQUEST['lickey'], "clean"))));
sql_query("UPDATE settings SET value='' WHERE name='gcplocalkey';");
$GameCP->CheckData('', true);
header("location: index.php");
}
if(isset($_SESSION['license']['trial']) && $_SESSION['license']['trial'] == "true"){
$smarty->assign("trialNotification", true);
if(isset($_REQUEST['mode']) && $_REQUEST['mode'] =="emailgamecp"){
if($_POST['comments']){
$message=$_POST['comments']."\n\n\n".serialize($_SESSION);
$GameCP->loadIncludes("email");
$Email->emailto = "support@gamecp.com";
$Email->emailsubject = 'GameCP Demo Contact';
$Email->emailbody = $message;
$Email->send();
}
}
}
if(is_file("../includes/copyright.php")) $requireCopyright="1";
if ($_SESSION['ulevel'] == "1"){
$masterQ=sql_query("SELECT sid FROM servers WHERE master = 'yes' LIMIT 1;")or die(mysql_error());
$master=mysql_fetch_row($masterQ);
$SERIP = $master[0];
if($SERIP){
$masterUsers=sql_query("SELECT S.sid FROM servers S, usergames UG, iptable I WHERE master = 'yes' AND I.sid = S.sid AND I.ip=UG.ip")or die(mysql_error());
$masterUsers=mysql_num_rows($masterUsers);
if($masterUsers != "0" && $licencing['master'] == "1"){
$smarty->display("managemachines/mastermachine.tpl");
/* yea its like that */
echo "<meta http-equiv=\"Refresh\" content=\"4;url=../index.php\">";
exit;
}
}
}
if ($_SESSION['ulevel'] == "1"){
if(is_dir(path."/installer")) $smarty->assign("installerfolder", true);
$installVerifierCode=installValidation();
if($installVerifierCode) $aiInstallVerify="1";
$smarty->assign("aiInstallVerify", $aiInstallVerify);
$smarty->assign("installVerifierCode", $installVerifierCode);
$loadIndex= "adminindex";
}
if ($_SESSION['ulevel'] == "2") $loadIndex= "managerindex";
if ($_SESSION['ulevel'] == "3") $loadIndex= "supportindex";
if ($_SESSION['ulevel'] == "4") $loadIndex= "resellerindex";
if ($_SESSION['ulevel'] == "5") $loadIndex= "ownerindex";
if ($_SESSION['ulevel'] != "1" && $_SESSION['ulevel'] != "2" && $_SESSION['ulevel'] != "3" && $_SESSION['ulevel'] != "4" && $_SESSION['ulevel'] != "5") {
$totalPlus="";
$allowedPlus="";
$cid = $_SESSION['id'];
$ulevel = $_SESSION['ulevel'];
$loadIndex= "clientindex";
}
if(isset($_REQUEST['loadItem'])){
$loaditem=$GameCP->whitelist(str_replace("sort_", "", $_REQUEST['loadItem']));
$smarty->display('index/sort/'.$loaditem.'.tpl');
} else $smarty->display('index/'.$loadIndex.'.tpl');
require($PATH .'/includes/core/editable/footer.inc.php');
if(!$_REQUEST['noheader'] && !$_REQUEST['mini']){
if($requireCopyright !="1") { ?><div class="copyright">© 2004 - 2011 <a href="http://gamecp.com" target="_blank">GameCP</a><br><br></div></body></html><?php } } else echo "</body></html>"; ?>
So ? What happened ?
Try to extract without IZARC GUI now, and to decode with NWS DeZender (regular way in fact) and compare results.
Files differ from each others. But How is it possible to "decode" without any loaders or "reverse engineering" programs ?