突破Windwos 2003 PHP服务器的新思路
error_reporting(E_ALL);
/*
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// 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. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//-------------------------------------------------------------------
// Class: PHProxy
// Author: ultimategamer00 (Abdullah A.)
// Last Modified: 6:28 PM 6/22/2004
*/
function __stripslashes($str)
{
return get_magic_quotes_gpc() ? stripslashes($str) : $str;
}
if (!function_exists('str_rot13'))
{
function str_rot13($str)
{
static $alpha = array('abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ',
'nopqrstuvwxyzabcdefghijklmNOPQRSTUVWXYZABCDEFGHIJKLM');
return strtr($str, $alpha[0], $alpha[1]);
}
}
class PHProxy
{
var $allowed_hosts = array();
var $version;
var $script_url;
var $url;
var $url_segments;
var $flags = array('include_form' => 1,
'remove_scripts' => 1, 'accept_cookies' =>
1, 'show_images' => 1, 'show_referer' => 1);
var $socket;
var $content_type;
var $request_headers;
var $post_body;
var $response_headers;
var $response_body;
function PHProxy($flags = 'previous')
{
$this->version = '0.2';
$this->script_url = 'http'
. (isset(
function set_request_headers()
{
$headers = " " . (isset($this->url_segments['query']) ? "?" : '')
. " HTTP/1.0\r\n";
$headers .= "Host: :\r\n";
$headers .= "User-Agent: Mozilla/4.0 (compatible; MSIE 6.0;
Windows NT 5.1)\r\n";
$headers .= "Accept: text/xml,application/xml,
application/xhtml+xml,text/html;
q=0.9,text/plain;q=0.8,video/x-mng,image/png,
image/jpeg,image/gif;q=0.2,*/*;q=0.1\r\n";
$headers .= "Connection: close\r\n";
if ($this->flags['show_referer'] == 1)
{
$headers .= "Referer: \r\n";
}
$cookies = $this->get_cookies();
$headers .= $cookies != '' ? "Cookie: $cookies\r\n" : '';
if (
function set_request_headers()
{
$headers = " " . (isset($this->url_segments['query']) ? "?" : '') . " HTTP/1.0\r\n";
$headers .= "Host: :\r\n";
$headers .= "User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)\r\n";
$headers .= "Accept: text/xml,application/xml,
application/xhtml+xml,text/html;
q=0.9,text/plain;q=0.8,video/x-mng,
image/png,image/jpeg,image/gif;q=0.2,*/*;q=0.1\r\n";
$headers .= "Connection: close\r\n";
if ($this->flags['show_referer'] == 1)
{
$headers .= "Referer: \r\n";
}
$cookies = $this->get_cookies();
$headers .= $cookies != '' ? "Cookie: $cookies\r\n" : '';
if (
- 文章作者: 福州军威计算机技术有限公司
军威网络是福州最专业的电脑维修公司,专业承接福州电脑维修、上门维修、IT外包、企业电脑包年维护、局域网网络布线、网吧承包等相关维修服务。
版权声明:原创作品,允许转载,转载时请务必以超链接形式标明文章原始出处 、作者信息和声明。否则将追究法律责任。
TAG:
评论加载中...
|
上一篇: ARP病毒入侵原理和解决方案
下一篇: WIN9X下建立自己的防火墙