!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_tdfonline/php/3ros/simplesamlphp/www/   drwxr-xr-x
Free 14.38 GB of 61.93 GB (23.23%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     authmemcookie.php (3.34 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

/**
 * This file implements an script which can be used to authenticate users with Auth MemCookie.
 * See: http://authmemcookie.sourceforge.net/
 *
 * The configuration for this script is stored in config/authmemcookie.php.
 *
 * The file extra/auth_memcookie.conf contains an example of how Auth Memcookie can be configured
 * to use simpleSAMLphp.
 */

require_once('_include.php');

try {
    
/* Load simpleSAMLphp configuration. */
    
$globalConfig SimpleSAML_Configuration::getInstance();

    
/* Check if this module is enabled. */
    
if(!$globalConfig->getBoolean('enable.authmemcookie'FALSE)) {
        throw new 
SimpleSAML_Error_Error('NOACCESS');
    }

    
/* Load Auth MemCookie configuration. */
    
$amc SimpleSAML_AuthMemCookie::getInstance();

    
/* Determine the method we should use to authenticate the user and retrieve the attributes. */
    
$loginMethod $amc->getLoginMethod();
    switch(
$loginMethod) {
    case 
'authsource':
        
/* The default now. */
        
$sourceId $amc->getAuthSource();
        
$s = new SimpleSAML_Auth_Simple($sourceId);
        break;
    case 
'saml2':
        
$s = new SimpleSAML_Auth_BWC('saml2/sp/initSSO.php''saml2');
        break;
    case 
'shib13':
        
$s = new SimpleSAML_Auth_BWC('shib13/sp/initSSO.php''shib13');
        break;
    default:
        
/* Should never happen, as the login method is checked in the AuthMemCookie class. */
        
throw new Exception('Invalid login method.');
    }

    
/* Check if the user is authorized. We attempt to authenticate the user if not. */
    
$s->requireAuth();

    
/* Generate session id and save it in a cookie. */
    
$sessionID SimpleSAML_Utilities::generateID();

    
$cookieName $amc->getCookieName();

    
$sessionHandler SimpleSAML_SessionHandler::getSessionHandler();
    
$sessionHandler->setCookie($cookieName$sessionID);


    
/* Generate the authentication information. */

    
$attributes $s->getAttributes();

    
$authData = array();

    
/* Username. */
    
$usernameAttr $amc->getUsernameAttr();
    if(!
array_key_exists($usernameAttr$attributes)) {
        throw new 
Exception('The user doesn\'t have an attribute named \'' $usernameAttr .
            
'\'. This attribute is expected to contain the username.');
    }
    
$authData['UserName'] = $attributes[$usernameAttr];

    
/* Groups. */
    
$groupsAttr $amc->getGroupsAttr();
    if(
$groupsAttr !== NULL) {
        if(!
array_key_exists($groupsAttr$attributes)) {
            throw new 
Exception('The user doesn\'t have an attribute named \'' $groupsAttr .
                
'\'. This attribute is expected to contain the groups the user is a member of.');
        }
        
$authData['Groups'] = $attributes[$groupsAttr];
    } else {
        
$authData['Groups'] = array();
    }

    
$authData['RemoteIP'] = $_SERVER['REMOTE_ADDR'];

    foreach(
$attributes as $n => $v) {
        
$authData['ATTR_' $n] = $v;
    }


    
/* Store the authentication data in the memcache server. */

    
$data '';
    foreach(
$authData as $n => $v) {
        if(
is_array($v)) {
            
$v implode(':'$v);
        }

        
$data .= $n '=' $v "\r\n";
    }


    
$memcache $amc->getMemcache();
    
$expirationTime $s->getAuthData('Expire');
    
$memcache->set($sessionID$data0$expirationTime);

    
/* Register logout handler. */
    
$session SimpleSAML_Session::getInstance();
    
$session->registerLogoutHandler('SimpleSAML_AuthMemCookie''logoutHandler');

    
/* Redirect the user back to this page to signal that the login is completed. */
    
SimpleSAML_Utilities::redirect(SimpleSAML_Utilities::selfURL());
} catch(
Exception $e) {
    throw new 
SimpleSAML_Error_Error('CONFIG'$e);
}

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