!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/reconfiguration/   drwxr-xr-x
Free 291.87 GB of 429.69 GB (67.93%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     migrate.py (2.16 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

import logging
import os
import time

from xray.apiclient import get_client
from xray.internal.exceptions import XRayError
from xray.internal.utils import read_sys_id
from xray.manager import initialize_manager
from xray.reconfiguration.system_id_shift import (
    remove_xray_inis,
    clear_dbm_file
)

storage = '/usr/share/alt-php-xray/running_tasks_list'
marker = '/usr/share/alt-php-xray/migrated'
migration_log = '/var/log/alt-php-xray/migration.log'

logger = logging.getLogger('migrate')


def running_tasks() -> list:
    """
    Get list of running tasks and save it into file
    """
    client = get_client('lists')(system_id=read_sys_id())
    try:
        tasks = client.get_task_list()
        logger.info('Loaded tasks: %s', tasks)
    except XRayError:
        return list()
    running = [t['tracing_task_id'] for t in tasks['result'] if
               t['status'] == 'running']
    logger.info('Running tasks: %s', running)
    with open(storage, 'w') as f:
        f.write('\n'.join(running))
    return running


def stop_tasks() -> None:
    """
    Stop running tasks.
    Try to remove ini and clear dbm storage after
    """
    manager = initialize_manager(read_sys_id())
    for task in running_tasks():
        logger.info('Stopping task %s', task)
        try:
            manager.stop(task)
        except XRayError:
            pass
        time.sleep(1)
    # clear if some garbage remains
    remove_xray_inis()
    clear_dbm_file()


def continue_tasks() -> None:
    """"""
    manager = initialize_manager(read_sys_id())
    try:
        with open(storage) as f:
            tasks = [l for l in f.read().split('\n') if l]
    except OSError:
        return

    logger.info('Saved task list loaded: %s', tasks)
    os.unlink(storage)
    for task in tasks:
        logger.info('Continue task %s', task)
        try:
            manager.continue_(task)
        except XRayError:
            pass
        time.sleep(1)
    # leave marker
    open(marker, 'w').close()

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