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

Software: Apache. PHP/7.3.33 

uname -a: Linux acloudg.aryanict.com 4.18.0-513.9.1.lve.el8.x86_64 #1 SMP Mon Dec 4 15:01:22 UTC
2023 x86_64
 

uid=1095(katebhospital) gid=1098(katebhospital) groups=1098(katebhospital) 

Safe-mode: OFF (not secure)

/opt/cloudlinux/venv/lib/python3.11/site-packages/xray/console_utils/   drwxr-xr-x
Free 291.87 GB of 429.69 GB (67.92%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     run_agent.py (1.71 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
# -*- coding: utf-8 -*-

# Copyright © Cloud Linux GmbH & Cloud Linux Software, Inc 2010-2021 All Rights Reserved
#
# Licensed under CLOUD LINUX LICENSE AGREEMENT
# http://cloudlinux.com/docs/LICENSE.TXT

"""
This module contains X Ray Agent main run function
"""
import os
from typing import Optional

from xray import gettext as _
from xray.agent.daemon import Agent
from xray.internal import constants
from xray.internal.utils import (
    configure_logging,
    create_socket,
    write_sys_id,
    read_sys_id
)


PIDFILE = '/var/run/xray-agent.pid'

def _save_pid(pid: int, pidfile: str):
    """
    Save agent process pid to file that other tools can use.
    """
    with open(pidfile, 'w') as f:
        f.write(str(pid))


def _read_pid(pidfile: str) -> Optional[int]:
    try:
        with open(pidfile, 'r') as f:
            pid = int(f.read())
    except (OSError, IOError, ValueError):
        return None

    # check that process is really still alive
    # and not just failed to clean the pidfile
    try:
        os.kill(pid, 0)
    except ProcessLookupError:
        return None

    return pid


def run(agent = None,
        pidfile: str = PIDFILE,
        system_id_cache_file: str = constants.agent_file) -> None:
    """
    Main run function
    """
    if _read_pid(pidfile):
        print(_('Another daemon instance is already running, please, stop it first.'))
        exit(1)

    configure_logging(constants.agent_log)

    if agent is None:
        agent = Agent(system_id=read_sys_id())

    write_sys_id(agent.sys_id, agent_system_id_path=system_id_cache_file)
    _save_pid(pid=os.getpid(), pidfile=pidfile)

    with create_socket(constants.agent_sock) as socket:
        agent.start(socket, background_routine=True)

:: 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 KaizenLouie | C99Shell Github | Generation time: 0.0039 ]--