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:22.75 GB of 70.42 GB (32.31%)
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/ maildrop-2.2.0/ maildir/ - drwxr-xr-x

Directory:
Viewing file:     maildirshared2.c (1.64 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
/*
** Copyright 2000 Double Precision, Inc.
** See COPYING for distribution information.
*/

#include    "config.h"
#include    "maildirmisc.h"
#include    <stdio.h>
#include    <string.h>
#include    <stdlib.h>
#include    <ctype.h>
#include    <errno.h>

static const char rcsid[]="$Id: maildirshared2.c,v 1.2 2004/01/11 02:47:33 mrsam Exp $";

FILE *maildir_shared_fopen(const char *maildir, const char *mode)
{
char    *m;
FILE    *fp;

    m=malloc(strlen(maildir)+sizeof("/shared-maildirs"));
    if (!m)
    {
        perror("malloc");
        return (0);
    }
    strcat(strcpy(m, maildir), "/shared-maildirs");

    fp=fopen(m, mode);
    free(m);
    return (fp);
}

void maildir_shared_fparse(char *p, char **name, char **dir)
{
char    *q;

    *name=0;
    *dir=0;

    if ((q=strchr(p, '\n')) != 0)    *q=0;
    if ((q=strchr(p, '#')) != 0)    *q=0;

    for (q=p; *q; q++)
        if (isspace((int)(unsigned char)*q))    break;
    if (!*q)    return;
    *q++=0;
    while (*q && isspace((int)(unsigned char)*q))
        ++q;
    if (*q)
    {
        *name=p;
        *dir=q;
    }
}

char *maildir_shareddir(const char *maildir, const char *sharedname)
{
char    *p, *q;
const char *r;
size_t  l;

    if (!maildir)   maildir=".";
        l=strlen(maildir);

    if (strchr(sharedname, '.') == 0 || *sharedname == '.' ||
        strchr(sharedname, '/'))
    {
        errno=EINVAL;
        return (0);
    }

    for (r=sharedname; *r; r++)
    {
        if (*r == '.' && (r[1] == '.' || r[1] == '\0'))
        {
            errno=EINVAL;
            return (0);
        }
    }

    p=malloc(strlen(maildir)+sizeof("/" SHAREDSUBDIR "/")+strlen(sharedname));
    if (!p)    return (0);

        *p=0;
        if (strcmp(maildir, "."))
        strcat(strcpy(p, maildir), "/");
    strcat(p, SHAREDSUBDIR "/");
    q=p+strlen(p);
    strcpy(q, sharedname);
    *strchr(q, '.')='/';
    return (p);
}
Command:
Quick Commands:
Upload:
[Read-Only] Max size: 100MB
PHP Filesystem: <@ Ú
Search File:
regexp
Create File:
Overwrite [Read-Only]
View File:
Mass Defacement:
[+] Main Directory: [+] Defacement Url:
LmfaoX Shell - Private Build [BETA] - v0.1 -; Generated: 0.4226 seconds