예제 #1
0
<?php

//to download the files
//import general functions
require "functions.php";
if (isEmpty(@$_POST['fileName'])) {
    die("missing data.");
}
if (isEmpty(@$_POST['realName'])) {
    die("missing data.");
}
$title = $_POST['fileName'];
$realName = $_POST['realName'];
session_start();
$userData = $_SESSION;
session_write_close();
returnFile($title, $realName);
예제 #2
0
                    $content = @file_get_contents("https://raw.github.com/GM-Script-Writer-62850/PHP-Scanner-Server/master/config.ini");
                    if ($content) {
                        $fname = '/tmp/' . md5(time() . rand()) . '.ini';
                        $file = @fopen($fname, 'w+');
                        @fwrite($file, $content);
                        @fclose($file);
                        $content = parse_ini_file($fname);
                        $content = (string) $content['VER'];
                        unlink($fname);
                        $vs = version_compare($content, $_GET['update']);
                        // -1 = older, 0 = same, 1 = newer
                        echo "{\"state\":\"{$vs}\",\"version\":\"{$content}\"}";
                        $f = @fopen("config/gitVersion.txt", 'w+');
                        @fwrite($f, $content);
                        @fclose($f);
                    } else {
                        echo '{"state":-2,"vs":null}';
                    }
                } else {
                    ob_start();
                    echo "GET=";
                    var_dump($_GET);
                    echo "POST=";
                    var_dump($_POST);
                    $text = ob_get_clean();
                    returnFile("You: Hey download.php I want a download.\nMe: Ok here you go!\nYou: Ha ha, very funny that is not what I meant\nMe: Well maybe if you told me what you want I could give it to you\n\nDEBUG:\n{$text}", "Reply.txt", 'txt');
                }
            }
        }
    }
}