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


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

from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os
import configparser
import re

from typing import Dict  # NOQA

from clcommon.cpapi.cpapiexceptions import NotSupported
from clcommon.cpapi.plugins.universal import _dblogin_cplogin_pairs
from clcommon.const import Feature
from clcommon.cpapi.GeneralPanel import GeneralPanelPluginV1


__cpname__ = 'InterWorx'

PARSE_URI_PATTERN = re.compile(r'(.+)://(.+):(.+)@.*')


IWORX_INI = '/usr/local/interworx/iworx.ini'


# WARN: Probably will be deprecated for our "official" plugins.
# See pluginlib.detect_panel_fast()
def detect():
    return os.path.isfile(IWORX_INI)


def db_access(_conf_path=IWORX_INI):
    access = dict()
    data_config = configparser.ConfigParser(strict=False)
    data_config.read(_conf_path)

    mysql_uri = data_config.get(section='mysql', option='rootdsn').strip('\"')
    parse_result = PARSE_URI_PATTERN.search(mysql_uri)
    (db, login, passwd) = (None, None, None)
    if parse_result:
        (db, login, passwd) = parse_result.group(1, 2, 3)
    access['login'] = login
    access['pass'] = passwd
    access['host'] = data_config.get(section='mysql', option='default_server').strip('\"')
    access['db'] = db
    return access


def cpusers():
    raise NotSupported({
        'message': '%(action)s is not currently supported.',
        'context': {'action': 'Getting all users registered in the Control Panel'}
    })


def dblogin_cplogin_pairs(cplogin_lst=None, with_system_users=False):
    access = db_access()
    data = _dblogin_cplogin_pairs(cplogin_lst=cplogin_lst, access=access)
    return data


def get_user_login_url(domain):
    return 'https://{domain}:2443'.format(domain=domain)


class PanelPlugin(GeneralPanelPluginV1):
    def __init__(self):
        super(PanelPlugin, self).__init__()

    def getCPName(self):
        """
        Return panel name
        :return:
        """
        return __cpname__

    def get_cp_description(self):
        """
        Retrieve panel name and it's version
        :return: dict: { 'name': 'panel_name', 'version': 'panel_version', 'additional_info': 'add_info'}
            or None if can't get info
        """
        try:
            f = open(IWORX_INI, "r")
            out = f.read()
            f.close()
            return {'name': __cpname__,
                    'version': out.split('version')[4].replace('\n', '').replace('=', '').replace('"', '').split('[')[0],
                    'additional_info': None}
        except:
            return None

    def db_access(self):
        """
        Getting root access to mysql database.
        For example {'login': 'root', 'db': 'mysql', 'host': 'localhost', 'pass': '9pJUv38sAqqW'}

        :return: root access to mysql database
        :rtype: dict
        :raises: NoDBAccessData
        """
        return db_access()

    @staticmethod
    def useraliases(cpuser, domain):
        """
        Return aliases from user domain
        :param str|unicode cpuser: user login
        :param str|unicode domain:
        :return list of aliases
        """
        return []

    def cpusers(self):
        """
        Generates a list of cpusers registered in the control panel

        :return: list of cpusers registered in the control panel
        :rtype: tuple
        """
        return cpusers()

    def get_user_login_url(self, domain):
        """
        Get login url for current panel;
        :type domain: str
        :rtype: str
        """
        return get_user_login_url(domain)

    def get_supported_cl_features(self) -> Dict[str, bool]:
        supported_features = super(PanelPlugin, self).get_supported_cl_features()
        return {
            **supported_features,
            Feature.PHP_SELECTOR: True,
            Feature.RUBY_SELECTOR: False,
            Feature.PYTHON_SELECTOR: False,
            Feature.NODEJS_SELECTOR: False,
            Feature.LSAPI: True,
            Feature.GOVERNOR: True,
            Feature.CAGEFS: True,
            Feature.RESELLER_LIMITS: False,
            Feature.WPOS: False,
        }


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