From 40399300745f83cce81d3109abd4e7b15aea5595 Mon Sep 17 00:00:00 2001 From: Michael Save Date: Sat, 31 Mar 2012 11:03:12 +1100 Subject: Merge scripts from Tinyboard-Tools --- tools/inc/cli.php | 104 ------------------------------------------------------ 1 file changed, 104 deletions(-) delete mode 100644 tools/inc/cli.php (limited to 'tools/inc/cli.php') diff --git a/tools/inc/cli.php b/tools/inc/cli.php deleted file mode 100644 index 4dc19412..00000000 --- a/tools/inc/cli.php +++ /dev/null @@ -1,104 +0,0 @@ - -1, - 'type' => ADMIN, - 'username' => '?', - 'boards' => Array('*') -); - -function get_httpd_privileges() { - global $config, $shell_path, $argv; - - if(php_sapi_name() != 'cli') - die("get_httpd_privileges(): invoked from HTTP client.\n"); - - echo "Dropping priviledges...\n"; - - if(!is_writable('.')) - die("get_httpd_privileges(): web directory is not writable\n"); - - $filename = '.' . md5(rand()) . '.php'; - $inc_filename = '.' . md5(rand()) . '.php'; - - echo "Copying rebuilder to web directory...\n"; - - // replace "/inc/cli.php" with its new filename - passthru("cat " . escapeshellarg($shell_path . '/' . $_SERVER['PHP_SELF']) . " | sed \"s/'\/inc\/cli\.php'/'\/{$inc_filename}'/\" > {$filename}"); - - $inc_header = "