BLACKSITE
:
216.73.217.4
:
104.37.75.190 / alpenpass.ca
:
Linux server3.pointsplan.com 5.14.0-503.38.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Apr 18 08:52:10 EDT 2025 x86_64
:
/
sbin
/
Upload File:
files >> //sbin/clncheck
#!/usr/bin/python3 # # 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("--serverURLipv6", action="store", help=_("Specify a url to use as a server over IPv6")), 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.serverURLipv6: rhnreg.cfg.set("serverURLipv6", self.options.serverURLipv6) 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()