很多站长朋友们都不太清楚phpeval反编译,今天小编就来给大家整理phpeval反编译,希望对各位有所帮助,具体内容如下:
本文目录一览: 1、 PHP用eval时候如果eval的参数有语法错误 我想反回个FALSE 怎么去判断。 2、 解密php eval(base64_decode方法 3、 php eval(gzinflate(base64_decode 4、 php如何反编译? 5、 PHP解密 eval( base64_decode 6、 php中,如何将编译后的代码,反编译回去 PHP用eval时候如果eval的参数有语法错误 我想反回个FALSE 怎么去判断。手册上的,定义和用法
eval() 函数把字符串按照 PHP 代码来计算。
该字符串必须是合法的 PHP 代码,且必须以分号结尾。
如果没有在代码字符串中调用 return 语句,则返回 NULL。如果代码中存在解析错误,则 eval() 函数返回 false。
判断的时候就
if(eval(字符串)) {
} else {
false
}
解密php eval(base64_decode方法对于第一段:
eval(base64_decode('ZnVuY3Rpb24gdGhlbWVfZm9vdGVyX3QoKSB7IGlmICghKGZ1bmN0aW9uX2V4aXN0cygiY2hlY2tfdGhlbWVfZm9vdGVyIikgJiYgZnVuY3Rpb25fZXhpc3RzKCJjaGVja190aGVtZV9oZWFkZXIiKSkpIHsgdGhlbWVfdXNhZ2VfbWVzc2FnZSgpOyBkaWU7IH0gfSB0aGVtZV9mb290ZXJfdCgpOw=='));
你可以编写如下的测试程序:
<?php
exit(base64_decode('ZnVuY3Rpb24gdGhlbWVfZm9vdGVyX3QoKSB7IGlmICghKGZ1bmN0aW9uX2V4aXN0cygiY2hlY2tfdGhlbWVfZm9vdGVyIikgJiYgZnVuY3Rpb25fZXhpc3RzKCJjaGVja190aGVtZV9oZWFkZXIiKSkpIHsgdGhlbWVfdXNhZ2VfbWVzc2FnZSgpOyBkaWU7IH0gfSB0aGVtZV9mb290ZXJfdCgpOw=='));
?>
在命令行执行上面的测试程序,输出结果如下:
function theme_footer_t() { if (!(function_exists("check_theme_footer") function_exists("check_theme_header"))) { theme_usage_message(); die; } } theme_footer_t();
上面输出的结果,可以替换测试你的第一段代码,它们完全等效,或者说就是解密后的代码,你掌握这个方法,PHP根本就是不可能真正加密的,都是欺负初学者而已。
php eval(gzinflate(base64_decode把eval换为echo,运行一下就能现实解密后的内容。你压缩包里面的1.txt文件解密后的内容如下:
<?php
require "include/function.php";
chkuser();
if(isset($_GET['Page']))
{
$page=$_GET['Page'];
}
else
{
$page="1";
}
if(isset($_GET['kind']))
{
$kind=$_GET['kind'];
}
else
{
$kind="task";
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "">
<HTML
xmlns=""><HEAD><TITLE>任务管理-<?php echo $site_tit; ?></TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META content=<?php echo $site_des; ?> name=description>
<META content=<?php echo $site_key; ?> name=keywords>
<?php
require_once "head1.php";
?>
<script>
function copylink(o)
{
var link1=document.getElementById("link"+o);
clipboardData.setData('Text',link1.value);
alert("宝贝地址已经复制到剪贴板中,\n请打开一个新的浏览窗口,\n把地址粘贴到浏览器的地址栏中您就可以访问此宝贝了!");
window.open();
}
</script>
<META content="MSHTML 6.00.2900.3429" name=GENERATOR></HEAD>
<BODY class=FullWidth>
<DIV class=main>
<DIV class=sell_new>
<DIV class=sell_left>
<div style="width:100%;background:#fff;text-align:center">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="15"> </td>
<td height="15"> </td>
</tr>
<tr>
<td> </td>
<td><div id="nltit">您的位置: <a href="/index.html">首页</a> >> 任务管理 >>
<?php
if($kind=="task"){echo "我发布的任务";}
else {echo "我接手的任务";}
?>
</div>
<div style="margin-top:10px;width:650px">
<table width="95%" border="0" cellspacing="0" cellpadding="0">
<tr align="left">
<td height="25" colspan="8" style="border-bottom:1px dotted #ccc">任务分类:
<a href="task_list.php"><font color="#000000">我发布的任务</font></a> |
<a href="task_list.php?kind=witkey"><font color="#000000">我接手的任务</font></a>
</td>
</tr>
<tr align="center">
<td height="25">任务编号</td>
<td bgcolor="#efefef">发布用户</td>
<td height="25">宝贝地址</td>
<td height="25" bgcolor="#efefef">到期时间</td>
<td height="25">接手用户</td>
<td height="25" bgcolor="#efefef">任务来自</td>
<td>任务保证金</td>
<td bgcolor="#efefef">任务状态</td>
</tr>
<?php
$pagenum=15;
if($kind=="task"){
$sql="select top ".$pagenum." * from task_list where id not in(select Top ".strval($pagenum*($page-1))." id from task_list where taskuser='".$_SESSION['szuser']."') and taskuser='".$_SESSION['szuser']."'";
$rs=mssql_query($sql);
$all=execonn("select count(id) from task_list where taskuser='".$_SESSION['szuser']."'");
$pageacount= ceil($all/$pagenum);
}
if($kind=="witkey"){
$sql="select top ".$pagenum." * from task_list where id not in(select Top ".strval($pagenum*($page-1))." id from task_list where taskeruser='".$_SESSION['szuser']."') and taskeruser='".$_SESSION['szuser']."'";
$rs=mssql_query($sql);
$all=execonn("select count(id) from task_list where taskeruser='".$_SESSION['szuser']."'");
$pageacount= ceil($all/$pagenum);
}
while($row=mssql_fetch_array($rs))
{
?>
<tr align="center">
<td height="25"><a href="viewtask.php?tid=<?php echo $row['id']; ?>" target="_blank" title="点击查看任务详情"><?php echo $row['taskno']; ?></a></td>
<td bgcolor="#efefef"><a href="viewuser.php?uid=<?php echo $row['taskuser']; ?>" target="_blank" title="点击查看用户资料"><?php echo $row['taskuser']; ?></a></td>
<td height="25"><a href="#" onclick="copylink('<?php echo $row['id']; ?>');"><font color="#FF0000">点击这里</font></a>
<input name="link<?php echo $row['id']; ?>" type="hidden" value="<?php echo $row['shopurl']; ?>">
</td>
<td height="25" bgcolor="#efefef"><?php echo $row['enddate']; ?></td>
<td height="25"><a href="viewuser.php?uid=<?php echo $row['taskeruser']; ?>" target="_blank" title="点击查看用户资料"><?php echo $row['taskeruser']; ?></a></td>
<td height="25" bgcolor="#efefef"><?php echo $row['taskfrom']; ?></td>
<td><?php echo $row['taskmoney']; ?>元</td>
<td bgcolor="#efefef"><a href="viewtask.php?tid=<?php echo $row['id']; ?>" target="_blank" title="点击查看任务详情">
<?php if($kind=="task"){ ?>
<?php echo getstat2($row['taskstat'],0); ?>
<?php }
else { ?>
<?php echo getstat2($row['taskstat'],1); ?>
<?php } ?>
</a></td>
</tr>
<?php } ?>
<tr align="center">
<td height="25" colspan="8">
<?php
$outstr="";
$outstr.="共".$pageacount."页 ";
$p1=intval($page);
$p2=intval($pageacount);
if($page=="1")
{
$outstr=$outstr."首页 上一页";
}
else
{
$outstr=$outstr."<a href=task_list.php?kind=".$kind."Page=1>首页</a> <a href=task_list.php?kind=".$kind."Page=".strval($p1-1).">上一页</a>";
}
for($i=1;$i<=$p2;$i++)
{
$outstr=$outstr." <a href=task_list.php?kind=".$kind."Page=".$i.">".$i."</a> ";
}
if(strval($page)==strval($pageacount))
{
$outstr=$outstr."下一页 末页";
}
else {
$outstr=$outstr."<a href=task_list.php?kind=".$kind."Page=".strval($p1+1).">下一页</a> <a href=task_list.php?kind=".$kind."Page=".strval($p2).">末页</a>";
}
echo $outstr;
?>
</td>
</tr>
</table>
</div>
</td>
</tr>
</table><br><br>
</div>
<I class="sell_left_angle sell_left_tl"></I><I
class="sell_left_angle sell_left_tr"></I><I
class="sell_left_angle sell_left_bl"></I><I
class="sell_left_angle sell_left_br"></I> </DIV>
<?php
require_once "right.php";
require_once "foot.php";
mssql_close();
?>
</BODY></HTML>
php如何反编译?PHP没有编译和反编译之说,是解释型的语言,你如果看到的代码有两种可能,一种是用eval来执行的用简单base_encode之类函数加密的语句,反解密出来就可以了。
还有一种可能是使用ZendGuard或者其它加密代码的工具进行加密出来后的代码,你可以找找具体是哪种情况,然后找相应的解密工作就可以了。
PHP解密 eval( base64_decode这两个函数在php中是用得对php代码进行加密与解密码的base64_encode是加密,尔base64_decode是解密了,下面我们看两个简单实例。
base64_encode语法: string base64_decode(string data);
*/
$str='d3d3ljexmwnulm5ldnk7vtu9zlpmzfg='; //定义字符串
echo base64_decode($str); //一聚教程网 //输出解码后的内容/*
base64_encode语法: string base64_encode(string data);
*/
$str='一聚教程网'; //定义字符串
echo base64_encode($str); // d3d3ljexmwnulm5ldnk7vtu9zlpmzfg= //输出编码后的内容
看一下这个会不会对你有帮助。
php中,如何将编译后的代码,反编译回去PHP没有编译和反编译之说,是解释型的语言,你如果看到的代码有两种可能,一种是用eval来执行的用简单base_encode之类函数加密的语句,反解密出来就可以了。
还有一种可能是使用ZendGuard或者其它加密代码的工具进行加密出来后的代码,你可以找找具体是哪种情况,然后找相应的解密工作就可以了。
关于phpeval反编译的介绍到此就结束了,不知道本篇文章是否对您有帮助呢?如果你还想了解更多此类信息,记得收藏关注本站,我们会不定期更新哦。
查看更多关于phpeval反编译 php反编译工具的详细内容...