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

Software: Apache. PHP/5.6.40 

uname -a: Linux cpanel06wh.bkk1.cloud.z.com 2.6.32-954.3.5.lve1.4.80.el6.x86_64 #1 SMP Thu Sep 24
01:42:00 EDT 2020 x86_64
 

uid=851(cp949260) gid=853(cp949260) groups=853(cp949260) 

Safe-mode: OFF (not secure)

/opt/alt/python37/lib/python3.7/site-packages/lvestats/utils/   drwxr-xr-x
Free 201.54 GB of 981.82 GB (20.53%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     v1import.py (2.81 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
# coding=utf-8
#
# Copyright © Cloud Linux GmbH & Cloud Linux Software, Inc 2010-2019 All Rights Reserved
#
# Licensed under CLOUD LINUX LICENSE AGREEMENT
# http://cloudlinux.com/docs/LICENSE.TXT

from __future__ import print_function
from __future__ import absolute_import
import os

CONFIG_PATH_v1 = '/etc/sysconfig/lvestats'
CONFIG_PATH_v2 = '/etc/sysconfig/lvestats2'

NOTIFY_PATH_v1 = '/etc/sysconfig/cloudlinux-notify'
NOTIFY_PATH_v2 = '/etc/sysconfig/lvestats.config/StatsNotifier.cfg'

IMPORT_STATUS_FILE = '/usr/share/lve-stats/utils/import-settings-status'

V1_DB_MIIGRATOR_CONFIG = '/etc/sysconfig/lvestats.config/V1DBMigrator.cfg'
V1_SQLITE_DB = 'sqlite:////var/lve/lveinfo.db'
V1_DB_MIIGRATOR_PLUGIN_SRC = '/usr/share/lve-stats/plugins.other/v1_db_migrator.py'
V1_DB_MIIGRATOR_PLUGIN_LINK = '/usr/share/lve-stats/plugins/v1_db_migrator.py'
V1_KEY = 'v1_connect_string'


def init_v1_db_migrator(config):
    if V1_KEY not in config:
        print('Cannot find db info to enable migration plugin')
        return

    if 'server_id' not in config:
        config['server_id'] = 'localhost'

    with open(V1_DB_MIIGRATOR_CONFIG, 'w') as cfg:
        cfg.write('v1_server_id=%s\nv1_connect_string=%s\n' % (config['server_id'], config[V1_KEY]))

    try:
        if not os.path.lexists(V1_DB_MIIGRATOR_PLUGIN_LINK):
            os.symlink(V1_DB_MIIGRATOR_PLUGIN_SRC, V1_DB_MIIGRATOR_PLUGIN_LINK)
    except (IOError, OSError) as e:
        print("Unable to enable db migration plugin: %s, continue: " % (str(e)))


def get_import_status():
    if os.path.exists(IMPORT_STATUS_FILE):
        f = open(IMPORT_STATUS_FILE, 'r')
        v = f.read()
        f.close()
        try:
            return int(v)
        except ValueError:
            raise Exception('Invalid status format for file %s' % IMPORT_STATUS_FILE)
    else:
        return 0


def set_import_status(flag):
    f = open(IMPORT_STATUS_FILE, 'w')
    f.write('%d' % flag)
    f.close()


def get_config_path(path):
    if os.path.exists(path):
        return path
    elif os.path.exists(path + '.rpmsave'):
        return path + '.rpmsave'
    return ''


def get_connection_string(lvestats_config):
    if 'db_type' in lvestats_config:
        if 'connect_string' in lvestats_config and lvestats_config['db_type'] in ('mysql', 'postgresql'):
            connect_string = lvestats_config['connect_string'].split(':')
            host = connect_string[0]
            database = connect_string[1]
            user = connect_string[2]
            password = connect_string[3]
            lvestats_config['connect_string'] = user + ':' + password + '@' + host + '/' + database
            lvestats_config[V1_KEY] = "{0}://{1}".format(lvestats_config['db_type'], lvestats_config['connect_string'])
        elif lvestats_config['db_type'] == 'sqlite':
            lvestats_config[V1_KEY] = V1_SQLITE_DB

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