✘✘ GRAYBYTE WORDPRESS FILE MANAGER ✘✘

​🇳​​🇦​​🇲​​🇪♯➤ server303.web-hosting.com ​🇻​♯➤ 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP 🇾​♯➤ 2025

𝗛𝗢𝗠𝗘 𝗜𝗗 ♯➤ 199.188.205.31 ♯➤ 𝗔𝗗𝗠𝗜𝗡 𝗜𝗗 216.73.216.7
𝗢𝗣𝗧𝗜𝗢𝗡𝗦 ♯ CRL ♯➤ 𝗢𝗞 ┃ WGT ♯➤ 𝗢𝗞 ┃ SDO ♯➤ 𝗢𝗙𝗙 ┃ PKEX ♯➤ 𝗢𝗙𝗙
𝗗𝗘𝗔𝗖𝗧𝗜𝗩𝗔𝗧𝗘𝗗 ♯➤ 𝗔𝗟𝗟 𝗪𝗢𝗥𝗞𝗜𝗡𝗚....

𝗛𝗢𝗠𝗘
𝗖𝗨𝗥𝗥𝗘𝗡𝗧 𝗙𝗜𝗟𝗘 : /usr/lib/python3.6/site-packages/up2date_client//rhnserver.py
#   rhn-client-tools
#
# Copyright (c) 2006--2016 Red Hat, Inc.
#
#   This program is free software; you can redistribute it and/or modify
#   it under the terms of the GNU General Public License as published by
#   the Free Software Foundation; version 2 of the License.
#
#   This program is distributed in the hope that it will be useful,
#   but WITHOUT ANY WARRANTY; without even the implied warranty of
#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#   GNU General Public License for more details.
#
#   You should have received a copy of the GNU General Public License
#   along with this program; if not, write to the Free Software
#   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
#   02110-1301  USA
#
# In addition, as a special exception, the copyright holders give
# permission to link the code of portions of this program with the
# OpenSSL library under certain conditions as described in each
# individual source file, and distribute linked combinations
# including the two.
# You must obey the GNU General Public License in all respects
# for all of the code used other than OpenSSL.  If you modify
# file(s) with this exception, you may extend this exception to your
# version of the file(s), but you are not obligated to do so.  If you
# do not wish to do so, delete this exception statement from your
# version.  If you delete this exception statement from all source
# files in the program, then also delete it here.


from up2date_client import rpcServer
from up2date_client import up2dateErrors
import sys
import requests

try: # python2
    import xmlrpclib
except ImportError: # python3
    import xmlrpc.client as xmlrpclib

class _DoCallWrapper(object):

    """
    A callable object that will handle multiple levels of attributes,
    and catch exceptions.
    """

    def __init__(self, server, method_name):
        self._server = server
        self._method_name = method_name

    def __getattr__(self, method_name):
        """ Recursively build up the method name to pass to the server. """
        return _DoCallWrapper(self._server,
            "%s.%s" % (self._method_name, method_name))

    def __call__(self, *args, **kwargs):
        """ Call the method. Catch faults and translate them. """
        method = getattr(self._server, self._method_name)

        try:
            return rpcServer.doCall(method, *args, **kwargs)
        except xmlrpclib.Fault:
            raise self.__exception_from_fault(sys.exc_info()[1])
        except requests.exceptions.SSLError:
            error = str(sys.exc_info()[1])
            error = error.strip("[()]")
            pieces = error.split(',')
            message = ""
            if len(pieces) > 2:
                message = pieces[2]
            elif len(pieces) == 2:
                message = pieces[1]
            message = message.strip(" '")
            if 'certificate verify failed' in message:
                raise up2dateErrors.SSLCertificateVerifyFailedError()
            else:
                raise up2dateErrors.NetworkError(message)

    def __exception_from_fault(self, fault):
            if fault.faultCode == -3:
                # This username is already taken, or the password is incorrect.
                exception = up2dateErrors.AuthenticationOrAccountCreationError(fault.faultString)
            elif fault.faultCode == -2:
                # Invalid username and password combination.
                exception = up2dateErrors.AuthenticationOrAccountCreationError(fault.faultString)
            elif fault.faultCode == -110:
                # Account is disabled
                exception = up2dateErrors.AuthenticationOrAccountCreationError(fault.faultString)
            elif fault.faultCode == -1:
                exception = up2dateErrors.UnknownMethodException(fault.faultString)
            elif fault.faultCode == -13:
                # Username is too short.
                exception = up2dateErrors.LoginMinLengthError(fault.faultString)
            elif fault.faultCode == -14:
                # too short password
                exception = up2dateErrors.PasswordMinLengthError(
                                          fault.faultString)
            elif fault.faultCode == -15:
                # bad chars in username
                exception = up2dateErrors.ValidationError(fault.faultString)
            elif fault.faultCode == -16:
                # Invalid product registration code.
                # TODO Should this really be a validation error?
                exception = up2dateErrors.ValidationError(fault.faultString)
            elif fault.faultCode == -19:
                # invalid
                exception = up2dateErrors.NoBaseChannelError(fault.faultString)
            elif fault.faultCode == -31:
                # No entitlement
                exception = up2dateErrors.InsuffMgmntEntsError(fault.faultString)
            elif fault.faultCode == -36:
                # rhnException.py says this means "Invalid action."
                # TODO find out which is right
                exception = up2dateErrors.PasswordError(fault.faultString)
            elif abs(fault.faultCode) == 49:
                exception = up2dateErrors.AbuseError(fault.faultString)
            elif abs(fault.faultCode) == 60:
                exception = up2dateErrors.AuthenticationTicketError(fault.faultString)
            elif abs(fault.faultCode) == 74:
                exception = up2dateErrors.RegistrationDeniedError()
            elif abs(fault.faultCode) == 105:
                exception = up2dateErrors.RhnUuidUniquenessError(fault.faultString)
            elif fault.faultCode == 99:
                exception = up2dateErrors.DelayError(fault.faultString)
            elif abs(fault.faultCode) == 91:
                exception = up2dateErrors.InsuffMgmntEntsError(fault.faultString)
            elif fault.faultCode == -106:
                # Invalid username.
                exception = up2dateErrors.ValidationError(fault.faultString)
            elif fault.faultCode == -600:
                # Invalid username.
                exception = up2dateErrors.InvalidRegistrationNumberError(fault.faultString)
            elif fault.faultCode == -601:
                # No entitlements associated with given hardware info
                exception = up2dateErrors.NotEntitlingError(fault.faultString)
            elif fault.faultCode == -602:
                # No entitlements associated with reg num
                exception = up2dateErrors.NotEntitlingError(fault.faultString)
            elif fault.faultCode == -2001 or fault.faultCode == -700:
                exception = up2dateErrors.AuthenticationOrAccountCreationError(
                                          fault.faultString)
            elif fault.faultCode == -701:
                exception = up2dateErrors.PasswordMaxLengthError(
                                          fault.faultString)
            elif fault.faultCode == -61:
                exception = up2dateErrors.ActivationKeyUsageLimitError(
                                          fault.faultString)
            elif fault.faultCode == -5:
                exception = up2dateErrors.UnableToCreateUser(
                            fault.faultString)
            else:
                exception = up2dateErrors.CommunicationError(fault.faultString)

            return exception


class RhnServer(object):
    """
    An rpc server object that calls doCall for you, and catches lower
    level exceptions
    """

    def __init__(
        self,
        serverOverride=None,
        timeout=None,
        rpcServerOverride=None,
        registration=False,
    ):
        if rpcServerOverride is None:
            self._server = rpcServer.getServer(
                serverOverride=serverOverride,
                timeout=timeout,
                registration=registration,
            )
        else:
            self._server = rpcServerOverride

    def add_header(self, key, value):
        self._server.add_header(key, value)

    def __getattr__(self, method_name):
        """Return a callable object that will do the work for us."""
        return _DoCallWrapper(self._server, method_name)


class RegistrationRhnServer(RhnServer):
    """
    A specialized RhnServer subclass for handling registration-related calls.

    Intended to be used as a shorthand for registration tasks instead of
    the plain RhnServer.
    """

    def __init__(self, serverOverride=None, timeout=None, rpcServerOverride=None):
        super(RegistrationRhnServer, self).__init__(
            serverOverride=serverOverride,
            timeout=timeout,
            rpcServerOverride=rpcServerOverride,
            registration=True,
        )


Current_dir [ 𝗡𝗢𝗧 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ] Document_root [ 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ]


[ Back ]
𝗡𝗔𝗠𝗘
𝗦𝗜𝗭𝗘
𝗟𝗔𝗦𝗧 𝗧𝗢𝗨𝗖𝗛
𝗨𝗦𝗘𝗥
𝗦𝗧𝗔𝗧𝗨𝗦
𝗙𝗨𝗡𝗖𝗧𝗜𝗢𝗡𝗦
..
--
9 Jun 2026 8.34 AM
root / root
0755
__pycache__
--
19 Jun 2026 8.31 AM
root / root
0755
__init__.py
0 KB
11 Jun 2026 10.58 AM
root / root
0644
clpwd.py
3.558 KB
11 Jun 2026 10.58 AM
root / root
0644
config.py
13.259 KB
11 Jun 2026 10.58 AM
root / root
0644
hardware.py
5.094 KB
11 Jun 2026 10.58 AM
root / root
0644
pkgplatform.py
0.302 KB
11 Jun 2026 11.31 AM
root / root
0644
rhncli.py
7.461 KB
11 Jun 2026 10.58 AM
root / root
0644
rhnreg.py
10.517 KB
11 Jun 2026 10.58 AM
root / root
0644
rhnserver.py
8.536 KB
11 Jun 2026 10.58 AM
root / root
0644
rpcServer.py
11.544 KB
11 Jun 2026 10.58 AM
root / root
0644
statistics.py
1.274 KB
11 Jun 2026 10.58 AM
root / root
0644
up2dateAuth.py
10.492 KB
11 Jun 2026 10.58 AM
root / root
0644
up2dateErrors.py
7.986 KB
11 Jun 2026 10.58 AM
root / root
0644
up2dateLog.py
2.059 KB
11 Jun 2026 10.58 AM
root / root
0644
up2dateUtils.py
1.729 KB
11 Jun 2026 11.31 AM
root / root
0644

✘✘ GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME ✘✘
Static GIF Static GIF