shell bypass 403

UnknownSec Shell

: /proc/thread-self/root/scripts/ [ drwxr-xr-x ]

name : litespeed-check
#!/usr/local/cpanel/3rdparty/bin/perl

# cpanel - scripts/litespeed-check                 Copyright 2022 cPanel, L.L.C.
#                                                           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;

use Whostmgr::LiteSpeed ();

# Make sure we get exactly the args we want, with a little flexibility for calling --help, -h, -HELP, etc.
exit script() unless caller;

sub script {
    my $args_ok = 0;
    foreach my $arg (@ARGV) {
        if ( $arg =~ m/^-{1,2}h/i ) {
            show_usage();
            return 0;
        }
        elsif ( $arg eq '--run' ) {
            $args_ok = 1;
        }
        else {
            print "Unknown arguments passed.\n";
            show_usage(1);
            return 1;
        }
    }
    if ( $args_ok != 1 ) {
        show_usage();
        return 1;
    }

    # Allow for manual override of this automated check
    my $disable_touchfile = '/var/cpanel/disable_auto_lsws';

    if ( -e $disable_touchfile ) {
        print "Skipping automatic check for LiteSpeed Web Server license due to existence of $disable_touchfile\n";
        return 0;
    }

    my $handler            = Whostmgr::LiteSpeed->new();
    my $has_active_license = 0;

    # Retrieve the license from the store server
    my ( $rc, $serial_no ) = $handler->get_litespeed_license();

    # If there is no active license available, there is no need to continue, otherwise we'll save the serial number from the license server
    if ( $rc == 1 ) {
        $has_active_license = 1;
    }
    else {
        # No active license exists, no need to carry on
        print "No license found for LiteSpeed Web Server in cPanel Store.\n";
        return 0;
    }

    # If it's installed (at least in some fashion) we need to check to see if it's using the right license.
    # For example, if they are using a TRIAL key, or expired key, we want to replace it with the latest available
    # If it's not installed and we have a valid serial, install LS with the serial
    my $is_installed = $handler->is_litespeed_installed();
    if ($is_installed) {
        my ( $rc, $stdout, $stderr ) = $handler->ensure_using_latest_license($serial_no);
        if ( $rc == 1 ) {
            print "Successfully installed new license on existing install:\n$stdout\n";
            my ( $rc2, $stdout2, $stderr2 ) = $handler->lsws_cmd('SWITCH_TO_LSWS');
            if ( $rc2 == 1 ) {
                print "Successfully ensured LiteSpeed Web Server is the default.\n";
            }
            else {
                print "There was a problem trying to enable LiteSpeed Web Server:\n$stdout2\n$stderr2\n";
            }
        }
        elsif ( $rc == 2 ) {
            print "Valid license already in place on existing install\n";
        }
        else {
            print "Failed to install new license on existing install:\n$stdout\n$stderr\n";
        }
    }
    else {
        if ( $handler->install_litespeed( { 'quiet' => 1, 'license_key' => $serial_no } ) ) {
            print "Successfully installed LiteSpeed Web Server with new license.\n";
        }
    }
    return 0;
}
###[ Functions ]########################################################################################################

sub show_usage {
    my ($use_stderr) = @_;
    my $out_fh = ( $use_stderr ? \*STDERR : \*STDOUT );
    print $out_fh <<EOF;
This script checks to see if there is a LiteSpeed license available for the server it is run on in the cPanel Store,
and if so, ensures LiteSpeed is installed and running with a valid paid license, using the one from the store if not
already in place.

Usage:
    scripts/litespeed-check <--help|--run>

    --help  : Show this output
    --run   : Actually run the check for LiteSpeed license and installation

EOF
    return;
}

© 2025 UnknownSec
Web Design for Beginners | Anyleson - Learning Platform
INR (₹)
India Rupee
$
United States Dollar
Web Design for Beginners

Web Design for Beginners

in Design
Created by Linda Anderson
+2
5 Users are following this upcoming course
Course Published
This course was published already and you can check the main course
Course
Web Design for Beginners
in Design
4.25
1:45 Hours
8 Jul 2021
₹11.80

What you will learn?

Create any website layout you can imagine

Support any device size with Responsive (mobile-friendly) Design

Add tasteful animations and effects with CSS3

Course description

You can launch a new career in web development today by learning HTML & CSS. You don't need a computer science degree or expensive software. All you need is a computer, a bit of time, a lot of determination, and a teacher you trust. I've taught HTML and CSS to countless coworkers and held training sessions for fortune 100 companies. I am that teacher you can trust. 


Don't limit yourself by creating websites with some cheesy “site-builder" tool. This course teaches you how to take 100% control over your webpages by using the same concepts that every professional website is created with.


This course does not assume any prior experience. We start at square one and learn together bit by bit. By the end of the course you will have created (by hand) a website that looks great on phones, tablets, laptops, and desktops alike.


In the summer of 2020 the course has received a new section where we push our website live up onto the web using the free GitHub Pages service; this means you'll be able to share a link to what you've created with your friends, family, colleagues and the world!

Requirements

No prerequisite knowledge required

No special software required

Comments (0)

Report course

Please describe about the report short and clearly.

Share

Share course with your friends