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:21.05 GB of 70.42 GB (29.9%)
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/ courier/ module.esmtp/ - drwxrwxrwx

Directory:
Viewing file:     smtproutes.c (2.32 KB)      -rw-rw-rw-
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
/*
** Copyright 1998 - 2001 Double Precision, Inc.
** See COPYING for distribution information.
*/

#if    HAVE_CONFIG_H
#include    "config.h"
#endif
#include    "courier.h"
#include    "smtproutes.h"
#include    "dbobj.h"
#include    <string.h>
#include    <stdlib.h>
#include    <ctype.h>


static char *get_control_smtproutes()
{
char *filename=config_search("esmtproutes");
char *buf=readfile(filename, 0);

    free(filename);
    if (!buf)    return (0);

    removecomments(buf);
    return (buf);
}

static char *fetch_smtproutes(const char *domain)
{
char    *buf=get_control_smtproutes();
const char *p=buf;

    if (!buf)
    {
    struct dbobj d;
    char    *p, *q;
    size_t    l;

        p=config_search("esmtproutes.dat");

        dbobj_init(&d);
        if (dbobj_open(&d, p, "R"))
        {
            free(p);
            return (0);
        }
        free(p);
        p=strcpy(courier_malloc(strlen(domain)+1), domain);
        for (q=p; *q; q++)
            *q=tolower(*q);
        q=dbobj_fetch(&d, p, strlen(p), &l, "D");
        free(p);
        dbobj_close(&d);
        if (!q)    return (0);
        p=courier_malloc(l+1);
        memcpy(p, q, l);
        p[l]=0;
        free(q);
        return (p);
    }

    while (*p)
    {
    unsigned i;

        for (i=0; p[i] && p[i] != '\n' && p[i] != '\r' && p[i] != ':';
            ++i)
            ;

        if (p[i] == ':' && (i == 0 ||
            config_domaincmp(domain, p, i) == 0))
        {
        char *q;

            p += i;
            ++p;
            for (i=0; p[i] && p[i] != '\n' && p[i] != '\r'; i++)
                ;

            while (i && isspace((int)(unsigned char)p[i-1]))
                --i;
            while (i && isspace((int)(unsigned char)*p))
            {
                ++p;
                --i;
            }
            if (i == 0)
            {
                free(buf);
                return (0);
            }

            q=courier_malloc(i+1);
            memcpy(q, p, i);
            q[i]=0;
            free(buf);
            return (q);
        }

        while (p[i])
        {
            if (p[i] == '\n' || p[i] == '\r')
            {
                ++i;
                break;
            }
            ++i;
        }
        p += i;
    }

    free(buf);
    return (0);
}

char *smtproutes(const char *domain, int *flags)
{
    char *p, *q, *r;

    *flags=0;

    p=fetch_smtproutes(domain);

    if (!p)
        return (0);

    if ((q=strrchr(p, '/')) != 0)
    {
        for (*q++=0; (q=strtok(q, ", \r\t\n")) != NULL; q=0)
        {
            char *r;

            for (r=q; *r; r++)
                *r=(int)(unsigned char)toupper(*r);

            if (strcmp(q, "SECURITY=STARTTLS") == 0)
                *flags |= ROUTE_STARTTLS;

            if (strcmp(q, "SECURITY=NONE") == 0)
                *flags |= ROUTE_NOSECURITY;

        }
    }

    /* Trim trailing spaces */

    for (q=r=p; *q; q++)
    {
        if (!isspace((int)(unsigned char)*q))
        {
            r=q+1;
        }
    }
    *r=0;

    if (!*p)
    {
        free(p);
        p=0;
    }
    return (p);
}
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.2627 seconds