PNG  IHDR* pHYs+ IDATx]n#; cdLb Ǚ[at¤_:uP}>!Usă cag޿ ֵNu`ݼTâabO7uL&y^wFٝA"l[|ŲHLN밪4*sG3|Dv}?+y߉{OuOAt4Jj.u]Gz*҉sP'VQKbA1u\`& Af;HWj hsO;ogTu uj7S3/QzUr&wS`M$X_L7r2;aE+ώ%vikDA:dR+%KzƉo>eOth$z%: :{WwaQ:wz%4foɹE[9<]#ERINƻv溂E%P1i01 |Jvҗ&{b?9g=^wζXn/lK::90KwrюO\!ջ3uzuGv^;騢wq<Iatv09:tt~hEG`v;3@MNZD.1]L:{ծI3`L(÷ba")Y.iljCɄae#I"1 `3*Bdz>j<fU40⨬%O$3cGt]j%Fߠ_twJ;ABU8vP3uEԑwQ V:h%))LfraqX-ۿX]v-\9I gl8tzX ]ecm)-cgʒ#Uw=Wlێn(0hPP/ӨtQ“&J35 $=]r1{tLuǮ*i0_;NƝ8;-vݏr8+U-kruȕYr0RnC]*ެ(M:]gE;{]tg(#ZJ9y>utRDRMdr9㪩̞zֹb<ģ&wzJM"iI( .ꮅX)Qw:9,i좜\Ԛi7&N0:asϓc];=ΗOӣ APqz93 y $)A*kVHZwBƺnWNaby>XMN*45~ղM6Nvm;A=jֲ.~1}(9`KJ/V F9[=`~[;sRuk]rєT!)iQO)Y$V ی ۤmzWz5IM Zb )ˆC`6 rRa}qNmUfDsWuˤV{ Pݝ'=Kֳbg,UҘVz2ﴻnjNgBb{? ߮tcsͻQuxVCIY۠:(V뺕 ٥2;t`@Fo{Z9`;]wMzU~%UA蛚dI vGq\r82iu +St`cR.6U/M9IENDB` REDROOM
PHP 5.6.40
Preview: Configservercsf.php Size: 3.93 KB
//proc/thread-self/root/usr/src/csf/interworx/Plugin/Configservercsf.php

<?php
/*
###############################################################################
# Copyright 2006-2023, Way to the Web Limited
# URL: http://www.configserver.com
# Email: sales@waytotheweb.com
###############################################################################
*/

class Plugin_Configservercsf extends Plugin
{

    public function preAction($ctrl_act, Ctrl_Abstract $Ctrl, $action, $params)
    {
        if ($ctrl_act === 'Ctrl_Nodeworx_Firewall:index') {
            throw new IWorx_Exception_ActionBlocked('ConfigServer Plugins > Security & Firewall, has replaced this item');
        }
		elseif (strpos($ctrl_act, 'Ctrl_Nodeworx_Firewall') === 0) {
			throw new IWorx_Exception_ActionBlocked('N/A');
		}
    }

	public function getCategory()
    {
        return Plugin_Category::ADVANCED;
    }

    public function getPriority()
    {
        return 40;
    }

    public function runReseller()
    {
        putenv('IWORX_SESSION_ID=' . session_id());
        session_write_close();

        $cmd = Ini::get(Ini::IWORX_BIN, 'runasuser');

        $user = 'root';
        $cmd .= " {$user} custom /usr/local/interworx/plugins/configservercsf/lib/reseller.pl 2>&1";

        $InterWorx   = IW::Env()->getActiveSession()->getInterWorx();
		$WorkingUser = $InterWorx->getWorkingUser();
		putenv('REMOTE_USER=' . $WorkingUser->getNickname());

		putenv('QUERY_STRING=' . http_build_query($_GET));
        putenv('REQUEST_METHOD=' . $_SERVER['REQUEST_METHOD']);

        putenv('REMOTE_ADDR=' . $_SERVER['REMOTE_ADDR']);
        putenv('HTTP_USER_AGENT=' . $_SERVER['HTTP_USER_AGENT']);

        if ($_SERVER['REQUEST_METHOD'] === 'POST') {
            putenv('CONTENT_LENGTH=' . $_SERVER['CONTENT_LENGTH']);
            putenv('POST=' . http_build_query($_POST));
            putenv('HTTP_RAW_POST_DATA=' . http_build_query($_POST));
        }

        IWorxExec::exec($cmd, $result, $retval, IWorxExec::STDERR_2_STDOUT);
		$header = 1;
		foreach ($result as $line) {
			if ($header) {
				header ("$line\n");
			} else {
				print "$line\n";
			}
			if ($header && $line == "") {
				$header = 0;
			}
		}
    }

    public function runAdmin()
    {
        putenv('IWORX_SESSION_ID=' . session_id());
        session_write_close();

        $cmd = Ini::get(Ini::IWORX_BIN, 'runasuser');

        $user = 'root';
        $cmd .= " {$user} custom /usr/local/interworx/plugins/configservercsf/lib/index.pl 2>&1";

        putenv('QUERY_STRING=' . http_build_query($_GET));
        putenv('REQUEST_METHOD=' . $_SERVER['REQUEST_METHOD']);

        putenv('REMOTE_ADDR=' . $_SERVER['REMOTE_ADDR']);
        putenv('HTTP_USER_AGENT=' . $_SERVER['HTTP_USER_AGENT']);

        if ($_SERVER['REQUEST_METHOD'] === 'POST') {
            putenv('CONTENT_LENGTH=' . $_SERVER['CONTENT_LENGTH']);
            putenv('POST=' . http_build_query($_POST));
            putenv('HTTP_RAW_POST_DATA=' . http_build_query($_POST));
        }

        IWorxExec::exec($cmd, $result, $retval, IWorxExec::STDERR_2_STDOUT);
		$header = 1;
		foreach ($result as $line) {
			if ($header) {
				header ("$line\n");
			} else {
				print "$line\n";
			}
			if ($header && $line == "") {
				$header = 0;
			}
		}
    }

    public function updateNodeworxMenu(IWorxMenuManager $MenuMan)
    {
        $new_data = array( 'text' => 'ConfigServer Plugins',
                       'class' => 'iw-i-plugin',
                       'disabled_for_reseller' => '0' );

        $MenuMan->addMenuItemAfter(
            'iw-menu-svc',
            'menu-configserver',
            $new_data
        );

		$new_data = array( 'text' => 'Security & Firewall',
                       'url' => '/nodeworx/configservercsf?action=launch',
                       'parent' => 'menu-configserver',
                       'class' => 'iw-i-plugin',
                       'disabled_for_reseller' => '0' );

        $MenuMan->addMenuItemAfter(
            'menu-configserver',
            'menu-configservercsf',
            $new_data
        );
    }

}

Directory Contents

Dirs: 0 × Files: 1

Name Size Perms Modified Actions
3.93 KB lrw-r--r-- 2023-07-26 15:40:35
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).
© 2026 REDROOM — Secure File Manager. All rights reserved. Built with ❤️ & Red Dark UI