|
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 | : | 19.45 GB of 70.42 GB (27.63%) |
|
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,
|
[ System Info ]
[ Processes ]
[ SQL Manager ]
[ Eval ]
[ Encoder ]
[ Mailer ]
[ Back Connection ]
[ Backdoor Server ]
[ Kernel Exploit Search ]
[ MD5 Decrypter ]
[ Reverse IP ]
[ Kill Shell ]
[ FTP Brute-Force ]
|
|
/
usr/
src/
courier-0.66.1/
courier/
libs/
- drwxrwxrwx
|
Viewing file: comverp.c (1.83 KB) -rw-rw-rw-Select action/file-type:  ( +) |  ( +) |  ( +) | Code ( +) | Session ( +) |  ( +) | SDB ( +) |  ( +) |  ( +) |  ( +) |  ( +) |  ( +) |
/* ** Copyright 1998 - 2000 Double Precision, Inc. ** See COPYING for distribution information. */
#include "comverp.h" #include "courier.h" #include "comctlfile.h" #include <stdlib.h> #include <string.h>
static const char xdigit[]="0123456789ABCDEF";
/* ** Encode the recipient address. We have to handle UUCP addresses as well, ** that do not contain a @, so there's a slight deviation from the draft ** here... */
size_t verp_encode(const char *receipient, char *buf) { size_t i=1; unsigned j;
while (*receipient) { if (*receipient == '@' && strchr(receipient+1, '@') == 0) { if (buf) *buf++ = '='; ++i; ++receipient; continue; }
switch (*receipient) { case '=': if (strchr(receipient, '@')) { if (buf) *buf++ = *receipient;
++receipient; ++i; break; }
/* UUCP, no @, must encode it */
case '@': case ':': case '%': case '!': case '+': case '-': case '[': case ']': j=(unsigned)(unsigned char)*receipient++;
if (buf) { *buf++='+'; *buf++=xdigit[ j / 16 ]; *buf++=xdigit[ j % 16 ]; } i += 3; break; default: if (buf) *buf++ = *receipient;
++receipient; ++i; } } if (buf) *buf=0; return (i); }
/* ** Get the return address of a message. If the message has the VERP flag ** set, construct the VERPed address appropriately. */
char *verp_getsender(struct ctlfile *ctf, const char *receipient) { const char *p, *r; char *q, *s;
if (ctf->sender[0] == '\0') return (strcpy(courier_malloc(1), ""));
p=ctf->sender;
if (ctlfile_searchfirst(ctf, COMCTLFILE_VERP) < 0 || (r=strrchr(p, '@')) == 0) return (strcpy(courier_malloc(strlen(p)+1), p)); /* VERP not set */
q=courier_malloc(strlen(p)+1+verp_encode(receipient, 0)); memcpy(q, p, r-p); s=q + (r-p); *s++='-'; s += verp_encode(receipient, s)-1; strcpy(s, r); return (q); }
|