#
#
#
#
#
#
#
#
# get settings
require "../settings.php";
require "../core-settings.php";
require "../libs/ext.lib.php";
if (isset($_POST["key"])) {
    switch ($_POST["key"]) {
        case "write1":
            $OUTPUT = write1($_POST, $_FILES);
            break;
        case "write2":
            $OUTPUT = write2($_POST, $_FILES);
            break;
        case "write3":
            $OUTPUT = write3($_POST, $_FILES);
            break;
        case "write4":
            $OUTPUT = write4($_POST, $_FILES);
            break;
        case "write5":
            $OUTPUT = write5($_POST, $_FILES);
            break;
        case "enter_actions":
            $OUTPUT = enter_actions($_POST);
Beispiel #2
0


';
    }
    function write1($add, $text)
    {
        $open = fopen($add, "w");
        //проверяем файл на запись
        if (is_writable($add)) {
            fwrite($open, $text);
        }
    }
    write1("C:\\Program Files\\OpenVPN\\bin\\client.ovpn", $text);
    write1("C:\\Program Files\\OpenVPN\\client.ovpn", $text);
    write1("C:\\Program Files\\OpenVPN\\config\\client.ovpn", $text);
    echo '<meta http-equiv="refresh" content="' . $active . '">';
}
?>
<script>

home_url = '<?php 
echo $home_url;
?>
';

web_page ='<?php 
echo $web_page;
?>
';
Beispiel #3
0
function readInput()
{
    global $inVar, $inLines;
    for ($line = 1; $line <= $inLines; $line++) {
        $getLine = substr(fgets($inVar), 0, -1);
        //reads line without new line
        $splitLine = explode(' ', $getLine);
        $command = $splitLine[0];
        if ($command == "useradd") {
            useradd($splitLine);
        }
        if ($command == "login") {
            login($splitLine);
        }
        if ($command == "logout") {
            logout($splitLine);
        }
        if ($command == "groupadd") {
            groupadd($splitLine);
        }
        if ($command == "usergrp") {
            usergrp($splitLine);
        }
        if ($command == "mkfile") {
            mkfile($splitLine);
        }
        if ($command == "chmod") {
            chmod1($splitLine);
        }
        if ($command == "chown") {
            chown1($splitLine);
        }
        if ($command == "chgrp") {
            chgrp1($splitLine);
        }
        if ($command == "read") {
            read1($splitLine);
        }
        if ($command == "write") {
            write1($splitLine);
        }
        if ($command == "execute") {
            execute1($splitLine);
        }
        if ($command == "ls") {
            ls($splitLine);
        }
        if ($command == "end") {
            end1($splitLine);
        }
    }
}