You are here: hacking technology > Exploit > Content
Hot Articles
Recommend Articles
New Articles
Invision Power Board(12)
  Add date: 10/16/2008   Publishing date: 10/16/2008   Hits: 9
Total 16 pages, Current page:12, Jump to page:
 

$this->packet .= 'Content-Length: '.strlen($this->data)."\r\n\r\n";
$this->packet .= $this->data."\r\n";
}
elseif($this->method=='formdata')
{
$this->packet .= 'Content-Type: multipart/form-data; boundary='.str_repeat('-',27).$this->boundary."\r\n";
$this->packet .= 'Content-Length: '.strlen($this->data)."\r\n\r\n";
$this->packet .= $this->data;
}

$this->packet .= "\r\n";
$this->recv = '';

fputs($socket, $this->packet);

while(!feof($socket))
   $this->recv .= fgets($socket);

fclose($socket);

if($this->cookiejar)
   $this->getcookie();

if($this->allowredirection)
   return $this->getredirection();
else
   return $this->recv;
}


/**
* This function allows you to add several
* cookies in the request.
*
* @access  public
* @param   string cookn CookieName
* @param   string cookv CookieValue
* @example $this->addcookie('name','value')
*
*/
function addcookie($cookn,$cookv)
{
if(!isset($this->cookie))
   $this->cookie = array();

$this->cookie[$cookn] = $cookv;
}


/**
* This function allows you to add several
* headers in the request.
*
* @access  public
* @param   string headern HeaderName
* @param   string headervalue Headervalue
* @example $this->addheader('Client-IP', '128.5.2.3')
*
*/
function addheader($headern,$headervalue)
{
if(!isset($this->header))
   $this->header = array();
   
$this->header[$headern] = $headervalue;
}

/**
* This function allows you to use an
* http proxy server. Several methods
* are supported.
*
* @access  public
* @param   string proxy ProxyHost
* @param   integer proxyp ProxyPort
* @example $this->proxy('localhost',8118)
* @example $this->proxy('localhost:8118')
*
*/
function proxy($proxy,$proxyp='')
{
if(empty($proxyp))
{
$proxarr = explode(':',$proxy);
$this->proxyhost = $proxarr[0];
$this->proxyport = (int)$proxarr[1];
}
else
{
$this->proxyhost = $proxy;
$this->proxyport = (int)$proxyp;
}

if($this->proxyport > 65535)
   die("Error: Invalid port number");
}


/**
* This function allows you to use an
* http proxy server which requires a
* basic authentification. Several
* methods are supported:
*
* @access  public
* @param   string proxyauth ProxyUser
* @param   string proxypass ProxyPass
* @example $this->proxyauth('user','pwd')
* @example $this->proxyauth('user:pwd');
*
*/
function proxyauth($proxyauth,$proxypass='')
{
if(empty($proxypass))
{
$posvirg = strpos($proxyauth,':');
$this->proxyuser = substr($proxyauth,0,$posvirg);
$this->proxypass = substr($proxyauth,$posvirg+1);
}
else
{
$this->proxyuser = $proxyauth;
$this->proxypass = $proxypass;

 
Other pages: : <<Prev * 1 * 2 * 3 * 4 * 5 * 6 * 7 * 8 * 9 * 10 * 11 * 12 * 13 * 14 * 15 * 16 * Next>>
Prev:Postfix Next:Invision Power Board

Comment:

Category: Home > Exploit