!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:     OracleConnection.php (6.14 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
class OracleConnection extends Connection
{
    protected 
$user;
    
    protected 
$pwd
    
    protected 
$sid;     

    protected 
$error;     
    
    function 
__construct$params )
    {
        
parent::__construct$params );
    }

    
/**
     * Set db connection's properties
     * @param Array params
     */
    
protected function assignConnectionParams$params )
    {
        
parent::assignConnectionParams$params );
        
        
$this->user $params["connInfo"][0];  //strConnectInfo1
        
$this->pwd $params["connInfo"][1];  //strConnectInfo2
        
$this->sid $params["connInfo"][2];  //strConnectInfo3
    
}
    
    
/**
     * Open a connection to db
     */
    
public function connect()
    {
##if @BUILDER.strCharset == "utf-8"##
        
if( !getenv"NLS_LANG" ) )
            
putenv"NLS_LANG=AMERICAN_AMERICA.UTF8");
##endif##
        
$this->conn = @ociplogon($this->user$this->pwd$this->sid);
        if( !
$this->conn ) {
            
$this->setErrorocierror() );
            
$this->triggerError($this->lastError());
        }
            
        
$stmt ociparse($this->conn"alter session set nls_date_format='YYYY-MM-DD HH24:MI:SS'");
        
ociexecute($stmt);
        
$this->closeQuery$stmt );
        
$stmt ociparse($this->conn"alter session set nls_timestamp_format='YYYY-MM-DD HH24:MI:SS'");
        
ociexecute($stmt);
        
$this->closeQuery$stmt );
        return 
$this->conn;
    }
    
    
/**
     * Close the db connection
     */
    
public function close()
    {
        return @
ocilogoff$this->conn );
    }
    
    
/**    
     * Send an SQL query
     * @param String sql
     * @return Mixed
     */
    
public function query$sql )
    {
        
$this->debugInfo($sql);
        
        
$stmt ociparse($this->conn$sql);
        if( !
$stmt )
        {
            
$this->setErroroci_error$this->conn ) );
            
$this->triggerError($this->lastError());
            return 
FALSE;
        }
        
$stmt_type ocistatementtype($stmt);
        if( !
ociexecute($stmt) )
        {
            
$this->setErroroci_error$stmt ) );
            
$this->closeQuery$stmt );
            
$this->triggerError($this->lastError());
            return 
FALSE;
        }
        
        return new 
QueryResult$this$stmt );
    }
    
    
/**    
     * Execute an SQL query
     * @param String sql
     * @return Mixed
     */
    
public function exec$sql )
    {
        
$this->debugInfo($sql);
        
        
$stmt ociparse($this->conn$sql);
        if( !
$stmt )
        {
            
$this->setErroroci_error$this->conn ) );
            
$this->triggerError($this->lastError());
            return 
FALSE;
        }
        
$stmt_type ocistatementtype($stmt);
        if( !
ociexecute($stmt) )
        {
            
$this->setErroroci_error$stmt ) );
            
$this->closeQuery$stmt );
            
$this->triggerError($this->lastError());
            return 
FALSE;
        }
        
        return 
1;
    }
    
    
/**    
     * Get a description of the last error
     * @return String
     */
    
public function lastError()
    {
        if( 
count($this->error) > )
            return 
$this->error["message"];
        
        return 
"";
    }

    
/**
     * Fetch a result row as an array
     * @param Mixed qHanle        The query handle
     * @param Number flags
     * @return Array
     */
    
protected function myoci_fetch_array($qHandle$flags)
    {
        if( 
function_exists("oci_fetch_array") )
            return 
oci_fetch_array($qHandle$flags);
            
        
$data = array();
        if( 
ocifetchinto($qHandle$data$flags) )
            return 
$data;
            
        return array();
    }    
    
    
/**
     * Fetch a result row as an associative array
     * @param Mixed qHanle        The query handle
     * @return Array
     */
    
public function fetch_array$qHandle )
    {
        return 
$this->myoci_fetch_array($qHandleOCI_ASSOC OCI_RETURN_NULLS OCI_RETURN_LOBS);
    }
    
    
/**    
     * Fetch a result row as a numeric array
     * @param Mixed qHanle        The query handle     
     * @return Array
     */
    
public function fetch_numarray$qHandle )
    {
        return 
$this->myoci_fetch_array($qHandleOCI_NUM OCI_RETURN_NULLS OCI_RETURN_LOBS);
    }
    
    
/**    
     * Free resources associated with a query result set 
     * @param Mixed qHanle        The query handle         
     */
    
public function closeQuery$qHandle )
    {
        if( 
function_exists("oci_free_statement") )
            
oci_free_statement($qHandle);
        else
            
ocifreestatement($qHandle);
    }

    
/**
     * Get number of fields in a result
     * @param Mixed qHanle        The query handle
     * @return Number
     */
    
public function num_fields$qHandle )
    {
        return 
OCINumCols($qHandle);
    }    
    
    
/**    
     * 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 
OCIColumnName($qHandle$offset 1);
    }

    
/**
     * @param Mixed qHandle
     * @param Number pageSize
     * @param Number page
     */
    
public function seekRecord($qHandle$n)
    {
        for(
$i 0$i $n$i++)
        {
            
$this->myoci_fetch_array($qHandleOCI_NUM OCI_RETURN_NULLS);
        }
    }

    
/**
     * 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() )
    {
        
set_error_handler("empty_error_handler");
        
        
$locs = array();
        
        if( 
count($blobs) )
        {
            
$idx 1;
            
$sql.=" returning ";
            
            
$blobfields "";
            
$blobvars "";
            foreach(
$blobs as $ekey => $value)
            {
                if( 
count($locs) )
                {
                    
$blobfields.= ",";
                    
$blobvars.= ",";
                }
                
                
$blobfields .= $ekey;
                
$blobvars.= ":bnd".$idx;
                
$locs$ekey ] = OCINewDescriptor($this->connOCI_D_LOB);
                
$idx++;
            }
            
            
$sql.= $blobfields." into ".$blobvars;
        }
        
        
$stmt OCIParse($this->conn$sql);
        if( !
$stmt )
        {
            
$this->setErroroci_error$this->conn ) );
            return 
FALSE;
        }
    
        
        
$idx 1;
        foreach(
$locs as $ekey => $value)
        {
            
OCIBindByName($stmt":bnd".$idx$locs$ekey ], -OCI_B_BLOB);
            
$idx++;
        }

        
$result OCIExecute($stmtOCI_DEFAULT) !== false;
        if( !
$result )
        {
            
$this->setErroroci_error$stmt ) );
            
$this->closeQuery$stmt );
            return 
FALSE;
        }
    
        foreach(
$locs as $ekey => $value)
        {
            
$locs$ekey ]->save$blobs$ekey ] );
            
$locs$ekey ]->free();
        }
        
        
OCICommit($this->conn);
        
        
$this->closeQuery$stmt );
        
        
set_error_handler("runner_error_handler");
        return 
$result;
    }
    
    protected function 
setError$err )
    {
        
$this->error $err;
    }
}
?>

:: 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 ]--