!C99Shell v. 1.0 pre-release build #13!

Software: Apache. PHP/5.5.15 

uname -a: Windows NT SVR-DMZ 6.1 build 7600 (Windows Server 2008 R2 Enterprise Edition) i586 

SYSTEM 

Safe-mode: OFF (not secure)

E:\oracle\product\10.2.0\client_2\oo4o\CPP\WORKBOOK\LOB\   drwxrwxrwx
Free 4.95 GB of 239.26 GB (2.07%)
Detected drives: [ a ] [ c ] [ d ] [ e ] [ f ]
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     CLOBREAD.CPP (1.44 KB)      -rw-rw-rw-
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#include <oracl.h>
#include <iostream.h>
#include <fstream.h>

// Example for OClob::Read
int main()
{

    //Initialize oo4o, connect, execute sql
    OStartup();
    ODatabase odb("ExampleDB", "scott", "tiger");
    ODynaset odyn(odb, "SELECT * FROM PART");

    if (!odyn.IsOpen())
    {    
        cout <<"Connect Error: "<<odb.GetErrorText()<<endl;
        cout <<"SQL Error: "<<odyn.GetErrorText()<<endl;
        return 1;
    }
        
    OClob oclob;
    odyn.GetFieldValue("PART_DESC", &oclob);

    unsigned char *buffer = 0;
    try
    {
        fstream fs;
        fs.open("descout.txt", ios::out);
        fs.setmode(filebuf::binary);

        unsigned long size = oclob.GetSize();
        
        // calculate an optimum buffersize of approximately 32k bytes
        unsigned long optchunk = oclob.GetOptimumChunkSize();        
        unsigned int bufsize = ((int)(32768/optchunk)) *optchunk;
        if (bufsize > size)
            bufsize = size;

        buffer = (unsigned char *)malloc(bufsize);

        //By taking advantage of streaming we get the best performance
        //and do not need to allocate a large buffer
        oclob.EnableStreaming(size);

        short status= OLOB_NEED_DATA;
        unsigned long amtread=0;
        
        while(status == OLOB_NEED_DATA)
        {
            amtread = oclob.Read(&status, buffer, bufsize);        
            fs.write(buffer, amtread);
        }
        
        oclob.DisableStreaming();    
        fs.close();
    }
    catch(OException E)
    {
        cout<<E.GetFailedMethodName()<< " Error: "<<E.GetErrorText()<<endl;
    }

    if (buffer)
        free(buffer);
    
    return 0;
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

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

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

--[ c99shell v. 1.0 pre-release build #13 powered by Captain Crunch Security Team | http://ccteam.ru | Generation time: 0.0312 ]--