!C99Shell v. 2.0 [PHP 7 Update] [25.02.2019]!

Software: Apache/2.2.16 (Debian). PHP/5.3.3-7+squeeze19 

uname -a: Linux mail.tri-specialutilitydistrict.com 2.6.32-5-amd64 #1 SMP Tue May 13 16:34:35 UTC
2014 x86_64
 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/usr/share/vexim/config/   drwxr-xr-x
Free 130.06 GB of 142.11 GB (91.52%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     functions.php (4.44 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
    
// Strictly three aren't alone functions, but they are functions of sorts 
    // and we call it every
    // page to prevent tainted data expoits
    
foreach ($_GET as $getkey => $getval
    {
        
$_GET[$getkey] = preg_replace('/[\'";$%]/','',$getval);
    }

    foreach (
$_POST as $postkey => $postval
    {
        
$_POST[$postkey] = preg_replace('/[\'";$%]/','',$postval);
    }

    
$globals = array('_GET''_POST');
    foreach (
$globals as $i => $val
    {
        foreach ($
$val as $j => $var
        {
            if ( isset($
$var) ) 
            { 
                unset($
$var); 
            }
        }
    }


    
/**
     * validate user password
     *
     * validate if password and confirmation password match
     * and contain no invalid characters. They can not be empty.
     *
     * @param   string   $clear   cleartext password
     * @param   string   $vclear  cleartext password (for validation)
     * @return  boolean  true if they match and contain no illegal characters
     */
    
function validate_password($clear,$vclear
    {
        return (
$clear == $vclear) &&
               (
$clear != "") &&
               (
$clear == preg_replace("/[\'\"\`\;]/","",$clear));
    }


    
/**
     * validate alias password
     *
     * like validate_password, but the pasword can be empty
     *
     * @see     validate_password
     * @param   string   $clear   cleartext password
     * @param   string   $vclear  cleartext password (for validation)
     * @return  boolean  true if they match and contain no illegal characters
     */
    
function alias_validate_password($clear,$vclear
    {
        return (
$clear == $vclear) &&
               (
$clear == preg_replace("/[\'\"\`\;]/","",$clear));
    }


    
/**
     * Check if a user already exists.
     *
     * Queries database $db, and redirects to the $page is the user already
     * exists.
     *
     * @param  mixed   $db         database to query
     * @param  string  $localpart  
     * @param  string  $domain_id
     * @param  string  $page       page to return to
     */
    
function check_user_exists($db,$localpart,$domain_id,$page
    {
        
$query "SELECT COUNT(*) AS c 
                  FROM   users 
                  WHERE  localpart='
$localpart
                  AND    domain_id='
$domain_id'";
        
$result $db->query($query);
        
$row $result->fetchRow();
        if (
$row['c'] != 0
        {
            
header ("Location: $page?userexists=$localpart");
            die;
        }
    }


    
/**
     * Render the alphabet. Directly onto the page.
     *
     * @param  unknown  $flag  unknown
     */
    
function alpha_menu($flag
    {
        global 
$letter;    // needs to be available to the parent
        
if ($letter == 'all'
        {
            
$letter '';
        }
        if (
$flag
        {
            print 
"\n<p class='alpha'><a href='" $_SERVER['PHP_SELF'] . 
                  
"?LETTER=ALL' class='alpha'>ALL</a>&nbsp;&nbsp; ";
            
// loops through the alphabet. 
            // For international alphabets, replace the string in the proper order
            
foreach (preg_split('//'_("ABCDEFGHIJKLMNOPQRSTUVWXYZ"), -1
                                
PREG_SPLIT_NO_EMPTY) as $i
            {
                  print 
"<a href='" $_SERVER['PHP_SELF'] . 
                      
"?LETTER=$i' class='alpha'>$i</a>&nbsp; ";
            }
            print 
"</p>\n";
        }
    }

    
/**
     * crypt the plaintext password.
     *
     * @golbal  string  $cryptscheme
     * @param   string  $clear  the cleartext password
     * @param   string  $salt   optional salt
     * @return  string          the properly crypted password
     */
    
function crypt_password($clear$salt '')
    {
        global 
$cryptscheme;
        
        if (
$cryptscheme == 'sha')
        {
            
$hash sha1($clear);
            
$cryptedpass '{SHA}' base64_encode(pack('H*'$hash));
        }
        else
        {
            if (
$salt != '')
            {
                if (
$cryptscheme == 'des'
                {
                    
$salt substr($salt02);
                }
                else
                if (
$cryptscheme == 'md5'
                {
                    
$salt substr($salt012);
                }
                else
                {
                    
$salt '';
                }
            }
            
$cryptedpass crypt($clear$salt);
        }   
        
        return 
$cryptedpass;
    }
?>

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.0 [PHP 7 Update] [25.02.2019] maintained by KaizenLouie | C99Shell Github | Generation time: 0.0086 ]--