403Webshell
Server IP : 192.158.238.246  /  Your IP : 18.191.86.218
Web Server : LiteSpeed
System : Linux uniform.iwebfusion.net 4.18.0-553.27.1.lve.1.el8.x86_64 #1 SMP Wed Nov 20 15:58:00 UTC 2024 x86_64
User : jenniferflocom ( 1321)
PHP Version : 8.1.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /usr/local/lsws/add-ons/cpanel/lsws_whm_plugin/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/local/lsws/add-ons/cpanel/lsws_whm_plugin/index.php
<?php

/** ******************************************
 * LiteSpeed Web Server Plugin for WHM
 *
 * @author LiteSpeed Technologies, Inc. (https://www.litespeedtech.com)
 * @copyright (c) 2013-2020
 * ******************************************* */

use \Lsc\Wp\LSCMException;
use \LsPanel\WhmMod_LiteSpeed_ControlApp;
use \LsPanel\WhmPluginException;
use \LsPanel\WhmPluginLogger;

/**
 *
 * @return int
 */
function checkacl()
{
    $user = $_ENV['REMOTE_USER'];

    if ( $user == 'root' ) {
        return 1;
    }

    $reseller = file_get_contents('/var/cpanel/resellers');

    foreach ( explode("\n", $reseller) as $line ) {

        if ( preg_match("/^{$user}:/", $line) ) {
            $line = preg_replace("/^{$user}:/", '', $line);

            foreach ( explode(',', $line) as $perm ) {

                if ( $perm == 'all' ) {
                    return 1;
                }
            }
        }
    }

    return 0;
}

/**
 *
 * @since 3.3.4
 *
 * @param string $msg
 */
function displayCustomExceptionMsg( $msg )
{
    WhmPluginLogger::error($msg);

    header("status: 500\n");
    echo "<h1>Exception Caught - {$msg}</h1>";
}

if ( checkacl() == 0 ) {
    header("status: 403\n");
    echo '<h1>Only root privileged users can access this module!</h1>';
}
else {
    require_once __DIR__ . '/autoloader.php';

    try
    {
        WhmPluginLogger::Initialize();
        WhmPluginLogger::setAdditionalTagInfo(
                "[{$_SERVER['REMOTE_ADDR']}-" . getmypid() . ']');

        $app = new WhmMod_LiteSpeed_ControlApp();
        $app->Run();
    }
    catch ( WhmPluginException $e )
    {
        displayCustomExceptionMsg($e->getMessage());
    }
    catch ( LSCMException $e )
    {
        displayCustomExceptionMsg($e->getMessage());
    }
}

Youez - 2016 - github.com/yon3zu
LinuXploit