!C99Shell v. 2.0 [PHP 7 Update] [25.02.2019]!

Software: nginx/1.24.0. PHP/7.3.32 

uname -a: Linux ip-172-31-28-255.ec2.internal 6.1.159-181.297.amzn2023.x86_64 #1 SMP PREEMPT_DYNAMIC
Mon Dec 22 22:31:59 UTC 2025 x86_64
 

 

Safe-mode: OFF (not secure)

/www/wwwroot/itce.co.in/data/connections/   drwxr-xr-x
Free 30.74 GB of 49.93 GB (61.58%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     ADOConnection.php (6.21 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
class ADOConnection extends Connection
{
    
/**
     * A date format string
     * @type String
     */
    
protected $access_dmy;
    
    protected 
$ODBCString;
    

    protected 
$errExeprionMess "";

    
    function 
__construct$params )
    {
        
parent::__construct$params );
    }
    
    
/**
     * Set db connection's properties
     * @param Array params
     */
    
protected function assignConnectionParams$params )
    {
        
parent::assignConnectionParams$params );
        
        
$this->ODBCString $params["ODBCString"];
    }    
    
    
/**
     * Open a connection to db
     */
    
public function connect()
    {
        global 
$cCodepage;
            
        try 
        {
            
$this->conn = new COM("ADODB.Connection"NULL$cCodepage);
            
$this->conn->Open$this->ODBCString );
            
            if( 
$this->dbType == nDATABASE_Access )
            {
                
$rs $this->conn->Execute("select datevalue('2000-11-22') as qw");
                
$str $rs->Fields[0]->Value;
                
                
$this->access_dmy "mdy";
                
$y strpos($str,"2000");
                
$m strpos($str,"11");
                
$d strpos($str,"22");
                if( 
$y $m && $m $d )
                    
$this->access_dmy "ymd";
                
                if( 
$d $m && $m $y )
                    
$this->access_dmy "dmy";                
            }
        } 
        catch(
Exception $e)
        {
            
$this->triggerError$e->getMessage() );
        }
        
        return 
$this->conn;
    }
    
    
/**
     * Close the db connection
     */
    
public function close()
    {
        
$this->conn->Close();
    }
    
    
/**    
     * Send an SQL query
     * @param String sql
     * @return Mixed
     */
    
public function query$sql )
    {
        global 
$cCodepage;
        
        
$this->debugInfo($sql);
        
        try
        {
            
$recordset = new COM("ADODB.recordset"NULL$cCodepage);
            
$recordset->Open($sql$this->conn2);
            
            return new 
QueryResult$this$recordset );
        } 
        catch(
com_exception $e)
        {
            
$this->triggerError($e->getMessage());
        }
        
        return 
FALSE;
    }
    
    
/**    
     * Execute an SQL query
     * @param String sql
     */
    
public function exec$sql )
    {
        
$qResult $this->query$sql );
        if( 
$qResult )
            return 
$qResult->getQueryHandle();
        
        return 
FALSE;
    }
    
    
/**    
     * Get a description of the last error
     * @return String
     */
    
public function lastError()
    {
        if( 
$this->conn->Errors->Count )
        {
            
$description $this->errExeprionMess;
            
$this->errExeprionMess "";
                
            return 
$description." ".$this->conn->Errors$this->conn->Errors->Count ]->Description;
        }
        
        return 
'';
    }

    
/**
     * The stub openSchema method overrided in the ADO connection class
     * @param Number
     * @return Mixed
     */
    
public function openSchema$querytype )
    {
        
$recordset $this->conn->OpenSchema$querytype );
        return new 
QueryResult$this$recordset );
    }    
    
    
/**    
     * Fetch a result row as an  array
     * @param Mixed qHanle                The query handle
     * @param Number assoc (optional)
     * @return Array
     */
    
protected function _fetch_array$qHandle$assoc )
    {
        
$ret = array();
        
        if( 
$qHandle->EOF() )
              return 
false;
        
        try {            
            for( 
$i 0$i $this->num_fields$qHandle ); $i++ )
            {
                if( 
IsBinaryType$qHandle->Fields[$i]->Type ) && $qHandle->Fields[$i]->Type != 128 || $qHandle->Fields[$i]->Type == 203 )
                {
                    
$str "";
                    if( 
$qHandle->Fields[$i]->ActualSize )
                    {
                        
$size $qHandle->Fields[$i]->ActualSize;
                        
$val $qHandle->Fields[$i]->GetChunk$size );
                        
                        if( 
is_array($val) || is_object($val) )
                        {
                            
$str str_pad(""$size);
                            
$j 0;
                            foreach(
$val as $byte)
                            {
                                
$str$j++ ] = chr($byte);
                            }
                        }
                        else
                            
$str $val;
                    }
                    
                    if( 
$assoc )
                        
$ret$qHandle->Fields[$i]->Name ] = $str;
                    else
                        
$ret$i ] = $str;
                }
                else
                {
                    
$value $qHandle->Fields[$i]->Value;
                    
                    if( 
is_null($value) )
                        
$val NULL;
                    else
                    {
                        if( 
isdatefieldtype$qHandle->Fields[$i]->Type ) )
                            
$value localdatetime2db( (string)$qHandle->Fields[$i]->Value$this->access_dmy );
                        if( 
IsNumberType$qHandle->Fields[$i]->Type ) )
                            
$val floatval($value);
                        else
                            
$val strval($value);
                    }
                    
                    if( 
$assoc )
                        
$ret$qHandle->Fields[$i]->Name ] = $val;
                    else
                        
$ret$i ] = $val;
                }
            }
            
            
$qHandle->MoveNext();    
        } 
        catch(
com_exception $e)
        {
            
$this->triggerError($e->getMessage() );
        }

        return 
$ret;
    }

    
/**    
     * Fetch a result row as an associative array
     * @param Mixed qHanle        The query handle
     * @return Array | Boolean
     */
    
public function fetch_array$qHandle )
    {
        return 
$this->_fetch_array($qHandle1);
    }
    
    
/**    
     * Fetch a result row as a numeric array
     * @param Mixed qHanle        The query handle     
     * @return Array | Boolean
     */
    
public function fetch_numarray$qHandle )
    {
        return 
$this->_fetch_array($qHandle0);
    }

    
/**
     * Free resources associated with a query result set 
     * @param Mixed qHanle        The query handle         
     */
    
public function closeQuery$qHandle )
    {
        
$qHandle->Close();
    }
    
    
/**    
     * Get number of fields in a result
     * @param Mixed qHanle        The query handle
     * @return Number
     */
    
public function num_fields$qHandle )
    {
        return 
$qHandle->Fields->Count;
    }
    
    
/**
     * Get the name of the specified field in a result
     * @param Mixed qHanle        The query handle
     * @param Number offset
     * @return String
     */     
    
public function field_name$qHandle$offset )
    {
        return 
$qHandle->Fields$offset )->Name;
    }

    
/**
     * @param Mixed qHandle
     * @param Number pageSize
     * @param Number page
     */
    
public function seekRecord($qHandle$n )
    {
        if( 
$page == 
            return;
            
        if( 
$qHandle->EOF() )
            return;
            
       
$qHandle->Move$n );
    }
    
    
/**
     * Execute an SQL query with blob fields processing
     * @param String sql
     * @param Array blobs
     * @param Array blobTypes
     * @return Boolean
     */
    
public function execWithBlobProcessing$sql$blobs$blobTypes = array() )
    {
        global 
$cCodepage;
        
        
$this->debugInfo($sql);
        
        try
        {
            
$recordset = new COM("ADODB.recordset"NULL$cCodepage);
            
$recordset->Open($sql$this->conn2);
            return 
true;
        }
        catch(
com_exception $e)
        {
            
$this->errExeprionMess $e->getMessage();
            return 
false;
        }
    }
}
?>

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

:: Make Dir ::
 
[ ok ]
:: Make File ::
 
[ ok ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.0 [PHP 7 Update] [25.02.2019] maintained by KaizenLouie | C99Shell Github | Generation time: 0.0022 ]--