403Webshell
Server IP : 208.122.213.31  /  Your IP : 216.73.216.45
Web Server : Apache
System : Linux msd6191.mjhst.com 4.18.0-553.146.1.el8_10.x86_64 #1 SMP Tue Jul 21 15:46:30 UTC 2026 x86_64
User : WHMCS_MIA_382 ( 1001)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/share/postfixadmin/ADDITIONS/squirrelmail-plugin/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/share/postfixadmin/ADDITIONS/squirrelmail-plugin/functions.inc.php
<?php
/**
 * Postfixadmin (http://postfixadmin.sf.net) integration with Squirrelmail.
 * See http://squirrelmail-postfixadmin.palepurple.co.uk
 * @author David Goodwin and many others
 */


function do_header() {
    global $color;
    displayPageHeader($color, 'None');
}

function do_footer() {
    echo "</body></html>";
}

function _display_password_form() {
    bindtextdomain('postfixadmin', SM_PATH . 'plugins/postfixadmin/locale');
    textdomain('postfixadmin');
    do_header('Postfixadmin Squirrelmail - Login');
    echo _('The PostfixAdmin plugin needs your current mailbox password');
    echo "<form action='' method='post'>";
    echo _('Password for');
    echo " " . $_SESSION['username'] . " :";
    echo "<input type='password' name='password' value=''>";
    echo "<input type='submit' value='" . _('Submit') . "'></form>";
    do_footer();
}

/**
 * This returns a Zend_XmlRpc_Client instance - unless we can't log you in...
 */
function get_xmlrpc() {
    global $CONF;
    require_once('Zend/XmlRpc/Client.php');
    $client = new Zend_XmlRpc_Client($CONF['xmlrpc_url']);
    $http_client = $client->getHttpClient();
    $http_client->setCookieJar();

    $login_object = $client->getProxy('login');

    if (empty($_SESSION['password'])) {
        if (empty($_POST['password'])) {
            _display_password_form();
            exit(0);
        } else {
            try {
                $success = $login_object->login($_SESSION['username'], $_POST['password']);
            } catch (Exception $e) {
                //var_dump($client->getHttpClient()->getLastResponse()->getBody());
                error_log("Failed to login to xmlrpc instance - " . $e->getMessage());
                die('Failed to login to xmlrpc instance');
            }
            if ($success) {
                $_SESSION['password'] = $_POST['password'];
                // reload the current page as a GET request.
                header("Location: {$_SERVER['REQUEST_URI']}");
                exit(0);
            } else {
                _display_password_form();
                exit(0);
            }
        }
    } else {
        $success = $login_object->login($_SESSION['username'], $_SESSION['password']);
    }

    if (!$success) {
        unset($_SESSION['password']);
        die("Invalid details cached... refresh this page and re-enter your mailbox password");
    }
    return $client;
}

function include_if_exists($filename) {
    if (file_exists($filename)) {
        include_once($filename);
    }
    return;
}
global $optmode;
$optmode = 'display';

//
// check_email
// Action: Checks if email is valid and returns TRUE if this is the case.
// Call: check_email (string email)
//
function check_email($email) {
    $return = filter_var($email, FILTER_VALIDATE_EMAIL);
    if ($return === false) {
        return false;
    }
    return true;
}

Youez - 2016 - github.com/yon3zu
LinuXploit