!C99Shell v. 2.1 [PHP 8 Update] [02.02.2022]!

Software: Apache/2.4.53 (Unix) OpenSSL/1.1.1o PHP/7.4.29 mod_perl/2.0.12 Perl/v5.34.1. PHP/7.4.29 

uname -a: Linux vps-2738122-x 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64 

uid=1(daemon) gid=1(daemon) grupos=1(daemon) 

Safe-mode: OFF (not secure)

/opt/apex_led/php/3ros/simplesamlphp/modules/InfoCard/lib/   drwxrwxr-x
Free 13.77 GB of 61.93 GB (22.24%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     UserFunctions.php (3.09 KB)      -rwxrwxr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
/*
* AUTHOR: Samuel Muñoz Hidalgo
* EMAIL: samuel.mh@gmail.com
* LAST REVISION: 13-FEB-09
* DESCRIPTION: Functions for interconecting the system with your data model.
*  Edit this functions to fit your needs
*/ 

class sspmod_InfoCard_UserFunctions {


    
/* Called by www/getinfocard.php and tokenservice.php
    * INPUT: credencial data (array), and type of credential
    * OUTPUT: true if the data is correct or false in other case
    */
    
static public function validateUser($credential,$type){
        
$status=false;
        switch(
$type){
            case 
'UsernamePasswordCredential':
                if( (
strcmp($credential['username'],'usuario')==0) && (strcmp($credential['password'],'clave')==0) )
                    
$status=true;
                break;
            case 
'KerberosV5Credential':
                break;
            case 
'X509V3Credential':
                break;
            case 
'SelfIssuedCredential':
                
//$credential['PPID']
                
$status true;
                break;
            default:
                break;
        }
        if (!
$pass==NULL){ //Username/Password credentials
            
        
}else { //PPID credential
        
}
        return 
$status;
    }
    
    
    
    
/* Called by www/tokenservice.php
    * INPUT: username, configured required claims, configured optional claims and requested claims
    * OUTPUT: array of claims wiht value and display tag.
    */
    
static public function fillClaims($user$configuredRequiredClaims$configuredOptionalClaims$requiredClaims){
        
$claimValues = array();
        foreach (
$requiredClaims as $claim){
            if (
array_key_exists($claim,$configuredRequiredClaims) ){
                
//The claim exists
                
$claimValues[$claim]['value']="value-".$claim;
                
$claimValues[$claim]['displayTag']=$configuredRequiredClaims[$claim]['displayTag'];
            }else if (
array_key_exists($claim,$configuredOptionalClaims) ){
                
//The claim exists
                
$claimValues[$claim]['value']="value-".$claim;
                
$claimValues[$claim]['displayTag']=$configuredOptionalClaims[$claim]['displayTag'];
            }else{
                
//The claim DOES NOT exist
                
$claimValues[$claim]['value']="unknown-value";
                
$claimValues[$claim]['displayTag']=$claim;
            }
        }
        return 
$claimValues;
    }

    
    
    
/*
    * INPUT: Unified way to create a single card identificator for a user
    * OUTPUT: User's card Identificator
    */
    
static public function generate_card_ID($user) {
        return 
'urn:self-sts.uah.es:'.$user;
    }
    


    
/* Called by www/getinfocard.php
    * INPUT: valid username
    * OUTPUT: array containing user data to create its InfoCard
    */
    
static public function fillICdata($user,$UserCredential,$ppid=NULL) {
        
$ICdata = array();
        
$ICdata['CardId'] = sspmod_InfoCard_UserFunctions::generate_card_ID($user);
        
$ICdata['CardName'] = $user."-SELFCREDENTIAL-IC";
        
$ICdata['CardImage'] = '/var/simplesaml/modules/InfoCard/www/resources/demoimage.png';
        
$ICdata['TimeExpires'] = "9999-12-31T23:59:59Z";
        
        
//Credentials
        
$ICdata['DisplayCredentialHint'] = 'Enter your password';
        switch(
$UserCredential){
            case 
'UsernamePasswordCredential':
                
$ICdata['UserName'] = $user;
                break;
            case 
'KerberosV5Credential':
                break;
            case 
'X509V3Credential':
                
$ICdata['KeyIdentifier'] = NULL//X509V3Credential
                
break;
            case 
'SelfIssuedCredential':
                
$ICdata['PPID'] = $ppid;
                break;
            default:
                break;
        }
        
        return 
$ICdata;
    }

}
?>

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

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

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

--[ c99shell v. 2.1 [PHP 8 Update] [02.02.2022] maintained byC99Shell Github | Generation time: 0.4858 ]--