!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/lib/SimpleSAML/Auth/   drwxrwxr-x
Free 13.94 GB of 61.93 GB (22.51%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     TimeLimitedToken.php (2.26 KB)      -rwxrwxr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php


class SimpleSAML_Auth_TimeLimitedToken {

    var 
$secretSalt;
    var 
$lifetime;
    var 
$skew;

    
/**
     * @param $secretSalt Must be random and unique per installation
     * @param $lifeTime Token lifetime in seconds
     * @param $skew  Allowed time skew between server that generates and the one that calculates the token
     */
    
public function __construct$lifetime 900$secretSalt NULL$skew 1) {
        if (
$secretSalt === NULL) {
            
$secretSalt SimpleSAML_Utilities::getSecretSalt();
        }
    
        
$this->secretSalt $secretSalt;
        
$this->lifetime $lifetime;
        
$this->skew $skew;
    }
    
    public function 
addVerificationData($data) {
        
$this->secretSalt .= '|' $data;
    }
    
    
    
/**
     * Calculate the current time offset to the current time slot.
     * With some amount of time skew
     */
    
private function get_offset() {
        return ( (
time() - $this->skew) % ($this->lifetime $this->skew) );
    }
    
    
/**
     * Calculate the given time slot for a given offset.
     */
    
private function calculate_time_slot($offset) {
    
        
#echo 'lifetime is: ' . $this->lifetime;
        
        
$timeslot floor( (time() - $offset) / ($this->lifetime $this->skew) );
        return 
$timeslot;
    }
    
    
/**
     * Calculates a token value for a given offset
     */
    
private function calculate_tokenvalue($offset) {
        
// A secret salt that should be randomly generated for each installation.
        #echo 'Secret salt is: ' . $this->secretSalt;
        
        #echo '<p>Calculating sha1( ' . $this->calculate_time_slot($offset) . ':' . $this->secretSalt . '  )<br />';
        
        
return sha1$this->calculate_time_slot($offset) . ':' $this->secretSalt);
    }
    
    
/**
     * Generates a token which contains of a offset and a token value. Using current offset
     */
    
public function generate_token() {
        
$current_offset $this->get_offset();
        return 
dechex($current_offset) . '-' $this->calculate_tokenvalue($current_offset);
    }
    
    
/**
     * Validates a full token, by calculating the token value for the provided 
     * offset and compares.
     */
    
public function validate_token($token) {
        
$splittedtoken explode('-'$token);
        
$offset hexdec($splittedtoken[0]);
        
$value  $splittedtoken[1];
        
        
        
#echo 'compare [' . $this->calculate_tokenvalue($offset). '] with [' . $value . '] offset was [' . $offset. ']';
        
        
return ($this->calculate_tokenvalue($offset) === $value);
    }
    
}



:: 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.5946 ]--