Пример #1
0
function doenable()
{
    global $y;
    enable();
    $y += 43;
}
Пример #2
0
<?php

declare (encoding='UTF-8');
# generator
if (php_sapi_name() == 'cli') {
    require_once __DIR__ . '/vicious/generator.php';
    exit;
}
# include the App class
require_once __DIR__ . '/vicious/Application.php';
# enable using register_shutdown_function to handle a request.
# there are consequences which you can read about at http://php.net/register-shutdown-function
enable('auto_dispatch');
# init the app
vicious\Application::init();
Пример #3
0
	include_once('ressources/class.squid.inc');
	
	
$usersmenus=new usersMenus();
if(!$usersmenus->AsDansGuardianAdministrator){
	$tpl=new templates();
	$alert=$tpl->_ENGINE_parse_body('{ERROR_NO_PRIVS}');
	echo "alert('$alert');";
	die();	
}

if(isset($_GET["popup"])){popup();exit;}
if(isset($_GET["now-search"])){popup_list();exit;}
if(isset($_POST["pattern"])){SaveBlks();exit;}
if(isset($_POST["delete-pattern"])){delete();exit;}
if(isset($_POST["enable-pattern"])){enable();exit;}
if(isset($_POST["AddDefaultMimeType-white"])){AddDefaultMimeType_white();exit;}


if(isset($_GET["squid-groups"])){squid_groups_popup();exit;}
if(isset($_GET["squid-groups-popup-list"])){squid_groups_popup_list();exit;}
if(isset($_GET["squid-groups-popup-selected"])){squid_groups_popup_selected();exit;}

if(isset($_GET["squid-UserAgent"])){squid_useragent();exit;}


js();


function js(){
	
Пример #4
0
include_once 'ressources/class.ldap.inc';
include_once 'ressources/class.users.menus.inc';
include_once 'ressources/class.dnsmasq.inc';
include_once 'ressources/class.main_cf.inc';
include_once 'ressources/class.system.network.inc';
if (posix_getuid() != 0) {
    $user = new usersMenus();
    if ($user->AsDnsAdministrator == false) {
        $tpl = new templates();
        echo $tpl->_ENGINE_parse_body("alert('{ERROR_NO_PRIVS}');");
        die;
        exit;
    }
}
if (isset($_POST["filename"])) {
    enable();
    exit;
}
if (isset($_GET["list"])) {
    rules_list();
    exit;
}
table();
function table()
{
    $page = CurrentPageName();
    $tpl = new templates();
    $t = time();
    $dnsmasq_address_text = $tpl->_ENGINE_parse_body("{dnsmasq_address_text}");
    $hosts = $tpl->_ENGINE_parse_body("{hosts}");
    $addr = $tpl->_ENGINE_parse_body("{addr}");
Пример #5
0
 public function testEnable()
 {
     enable('on');
     $c = clone vicious\Config::instance();
     $this->assertTrue($c->on);
 }
Пример #6
0
			break;
		default:
			$return = 'home';
			break;
	}

	if( $uid ){
		$user = User::getByID($uid);
	}
	else{
		$user = false;
	}

	if( $self == $user || $_SESSION['roleid'] < 3 ){
		if( $user->authentication->disabled ){
			if( enable($user->userid) ){
				header('Location: /' . $return . '.php?code=6');
			}
			else{
				header('Location: /' . $return . '.php?code=8');
			}
		}
		else{
			if( disable($user->userid) ){
				header('Location: /' . $return . '.php?code=5');
			}
			else{
				header('Location: /' . $return . '.php?code=7');
			}
		}
	}
Пример #7
0
function doenable()
{
    $y = 2;
    enable();
    $y += 43;
}
Пример #8
0
        list_plugins();
        break;
    case 'clean':
        clean();
        break;
    case 'reload':
        reload();
        break;
    case 'install':
        install($argv[2]);
        break;
    case 'uninstall':
        uninstall($argv[2]);
        break;
    case 'enable':
        enable($argv[2]);
        break;
    case 'disable':
        disable($argv[2]);
        break;
    case 'update':
        update($argv[2]);
        break;
    case 'check':
        break;
    default:
        print 'Unknown command ' . $cmd . "\n";
}
health_check();
exit;
function _apply($pattern, $func)
Пример #9
0
$profiles = preg_grep('/^([^.])/', scandir($dir));
$profilevaluecount = 0;
foreach ($profiles as $profilevalue) {
    //Removes any files with ~ characters in them
    if (strpos($profilevalue, '~') === false) {
        //Constructs an options list for the profile selection box with the array full of profile names
        $profilevaluecount = $profilevalue;
        $profileOptions = $profileOptions . '<option value="' . $profilevaluecount . '">' . $profilevalue . '</option>';
    }
}
//Activates after the enable button has been clicked on the webinterface
if ($_GET) {
    if (isset($_GET['enable'])) {
        $profiletext = $_GET['profilebox'];
        //Retrieves the value from the selection box
        enable($profiletext);
    }
}
// Clears the folder
function clear($profiletext)
{
    array_map('unlink', glob("Output/CurrentProfile/*"));
}
// Enables a new profile that is selected
function enable($profiletext)
{
    $fileProfileDir = "Output/Profiles/" . $profiletext . "/profile.txt";
    if (file_exists($fileProfileDir)) {
        clear($profiletext);
        copy($fileProfileDir, 'Output/CurrentProfile/profile.txt');
        $message = shell_exec("Scripts/snortreboot.sh 2>&1");