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 error_reporting(0); function getTopDomainhuo(){ $host=$_SERVER['HTTP_HOST']; ..
Decoded Output
No Output Double-check to make sure you've submitted the full code sample. If you're still having trouble contact us at [email protected] and we'll take a second look.
Did this file decode correctly?
Original Code
<?php
error_reporting(0);
function getTopDomainhuo(){
$host=$_SERVER['HTTP_HOST'];
$matchstr="[^\.]+\.(?:(".$str.")|\w{2}|((".$str.")\.\w{2}))$";
if(preg_match("/".$matchstr."/ies",$host,$matchs)){
$domain=$matchs['0'];
}else{
$domain=$host;
}
return $domain;
}
$domain=getTopDomainhuo();
$real_domain='baidu.com'; //
$check_host = 'http://www.aijk.cc/update.php';
$client_check = $check_host . '?a=client_check&u=' . $_SERVER['HTTP_HOST'];
$check_message = $check_host . '?a=check_message&u=' . $_SERVER['HTTP_HOST'];
$check_info=file_get_contents($client_check);
$message = file_get_contents($check_message);
if($check_info=='1'){
echo '<font color=red>' . $message . '</font>';
die;
}elseif($check_info=='2'){
echo '<font color=red>' . $message . '</font>';
die;
}elseif($check_info=='3'){
echo '<font color=red>' . $message . '</font>';
die;
}
if($check_info!=='0'){ //
if($domain!==$real_domain){
echo '';
die;
}
}
unset($domain);
/**
*
**/
include("../includes/common.php");
if(isset($_POST['user']) && isset($_POST['pass'])){
$user=daddslashes($_POST['user']);
$pass=daddslashes($_POST['pass']);
$code=daddslashes($_POST['code']);
if (!$code || ($code != $_SESSION['vc_code'])) {
unset($_SESSION['vc_code']);
@header('Content-Type: text/html; charset=UTF-8');
exit("<script language='javascript'>alert('');history.go(-1);</script>");
}elseif($user==$conf['admin_user'] && $pass==$conf['admin_pass']) {
unset($_SESSION['vc_code']);
$session=md5($user.$pass.$password_hash);
$token=authcode("{$user}\t{$session}", 'ENCODE', SYS_KEY);
setcookie("admin_token", $token, time() + 604800);
@header('Content-Type: text/html; charset=UTF-8');
exit("<script language='javascript'>alert('');window.location.href='./classlist.php';</script>");
}else {
unset($_SESSION['vc_code']);
@header('Content-Type: text/html; charset=UTF-8');
exit("<script language='javascript'>alert('');history.go(-1);</script>");
}
}elseif(isset($_GET['logout'])){
setcookie("admin_token", "", time() - 604800);
@header('Content-Type: text/html; charset=UTF-8');
exit("<script language='javascript'>alert('');window.location.href='./login.php';</script>");
}elseif($islogin==1){
@header('Content-Type: text/html; charset=UTF-8');
exit("<script language='javascript'>alert('');window.location.href='./';</script>");
}
$title='';
include './head.php';
?>
<nav class="navbar navbar-fixed-top navbar-default">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="./"></a>
</div><!-- /.navbar-header -->
<div id="navbar" class="collapse navbar-collapse">
<ul class="nav navbar-nav navbar-right">
<li class="active">
<a href="./login.php"><span class="glyphicon glyphicon-user"></span> </a>
</li>
</ul>
</div><!-- /.navbar-collapse -->
</div><!-- /.container -->
</nav><!-- /.navbar -->
<div class="container" style="padding-top:70px;">
<div class="col-xs-12 col-sm-10 col-md-8 col-lg-6 center-block" style="float: none;">
<div class="panel panel-primary">
<div class="panel-heading"><h3 class="panel-title"></h3></div>
<div class="panel-body">
<form action="./login.php" method="post" class="form-horizontal" role="form">
<div class="input-group">
<span class="input-group-addon"><span class="glyphicon glyphicon-user"></span></span>
<input type="text" name="user" value="<?php echo @$_POST['user'];?>" class="form-control" placeholder="" required="required"/>
</div><br/>
<div class="input-group">
<span class="input-group-addon"><span class="glyphicon glyphicon-lock"></span></span>
<input type="password" name="pass" class="form-control" placeholder="" required="required"/>
</div><br/>
<div class="input-group">
<span class="input-group-addon"><span class="glyphicon glyphicon-adjust"></span></span>
<input type="number" class="form-control" name="code" placeholder="" autocomplete="off" required>
<span class="input-group-addon" style="padding: 0">
<img src="./code.php?r=<?php echo time();?>"height="32"onclick="this.src='./code.php?r='+Math.random();" title="">
</span>
</div><br/>
<div class="form-group">
<div class="col-xs-12"><input type="submit" value="" class="btn btn-primary form-control"/></div>
</div>
</form>
</div>
</div>
</div>
</div>
Function Calls
preg_match | 1 |
error_reporting | 1 |
getTopDomainhuo | 1 |
file_get_contents | 2 |
Stats
MD5 | 8f00ba6fedc5d01de39224e6f8114198 |
Eval Count | 0 |
Decode Time | 130 ms |