收藏的一个php小偷的核心程序
作者:bea
<? ob_start(); ob_implicit_flush(0);<aid="more-27"></a> functionCheckCanGzip(){ global$HTTP_ACCEPT_ENCODING; if(headers_sent()||connection_timeout()||connection_aborted()){ return0; } if(strpos($HTTP_ACCEPT_ENCODING,'x-gzip')
<?
ob_start();
ob_implicit_flush(0);<a id="more-27"></a>
function CheckCanGzip(){
global $HTTP_ACCEPT_ENCODING;
if (headers_sent() || connection_timeout() || connection_aborted()){
return 0;
}
if (strpos($HTTP_ACCEPT_ENCODING, 'x-gzip') !== false) return "x-gzip";
if (strpos($HTTP_ACCEPT_ENCODING,'gzip') !== false) return "gzip";
return 0;
}
/* $level = compression level 0-9, 0=none, 9=max */
function GzDocOut($level=1,$debug=0){
$ENCODING = CheckCanGzip();
if ($ENCODING){
print "
<!-- Use compress $ENCODING -->
";
$Contents = ob_get_contents();
ob_end_clean();
if ($debug){
$s = "<p>Not compress length: ".strlen($Contents);
$s .= "
Compressed length: ".strlen(gzcompress($Contents,$level));
$Contents .= $s;
}
header("Content-Encoding: $ENCODING");
print "x1fx8bx08x00x00x00x00x00";
$Size = strlen($Contents);
$Crc = crc32($Contents);
$Contents = gzcompress($Contents,$level);
$Contents = substr($Contents, 0, strlen($Contents) - 4);
print $Contents;
print pack('V',$Crc);
print pack('V',$Size);
exit;
}else{
ob_end_flush();
exit;
}
}
?>
有用 | 无用
ob_start();
ob_implicit_flush(0);<a id="more-27"></a>
function CheckCanGzip(){
global $HTTP_ACCEPT_ENCODING;
if (headers_sent() || connection_timeout() || connection_aborted()){
return 0;
}
if (strpos($HTTP_ACCEPT_ENCODING, 'x-gzip') !== false) return "x-gzip";
if (strpos($HTTP_ACCEPT_ENCODING,'gzip') !== false) return "gzip";
return 0;
}
/* $level = compression level 0-9, 0=none, 9=max */
function GzDocOut($level=1,$debug=0){
$ENCODING = CheckCanGzip();
if ($ENCODING){
print "
<!-- Use compress $ENCODING -->
";
$Contents = ob_get_contents();
ob_end_clean();
if ($debug){
$s = "<p>Not compress length: ".strlen($Contents);
$s .= "
Compressed length: ".strlen(gzcompress($Contents,$level));
$Contents .= $s;
}
header("Content-Encoding: $ENCODING");
print "x1fx8bx08x00x00x00x00x00";
$Size = strlen($Contents);
$Crc = crc32($Contents);
$Contents = gzcompress($Contents,$level);
$Contents = substr($Contents, 0, strlen($Contents) - 4);
print $Contents;
print pack('V',$Crc);
print pack('V',$Size);
exit;
}else{
ob_end_flush();
exit;
}
}
?>
有用 | 无用
猜你喜欢
您可能感兴趣的文章:
- mysql 全文搜索 技巧
- mysql 搜索之简单应用
- mysql 字段类型说明
- Discuz! 5.0.0论坛程序中加入一段js代码,让会员点击下载附件前自动弹出提示窗口
- PHP与SQL注入攻击[三]
- PHP与SQL注入攻击[二]
- PHP与SQL注入攻击[一]
- 使用Xdebug调试和优化PHP程序之[1]
- php下用GD生成生成缩略图的两个选择和区别
- 15种PHP Encoder的比较
- dede全站URL静态化改造[070414更正]
- 安装PHP可能遇到的问题“无法载入mysql扩展” 的解决方法
- 给apache2.2加上mod_encoding模块後 php5.2.0 处理url出现bug
- Linux下ZendOptimizer的安装与配置方法
- PHP 中英文混合排版中处理字符串常用的函数
- 如何提高MYSQL数据库的查询统计速度 select 索引应用
- 相对路径转化成绝对路径
- PHP实现MVC开发得最简单的方法——模型
- ASP和PHP都是可以删除自身的