!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 

uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 

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

Safe-mode: OFF (not secure)

/var/www/html/laravel-crm/vendor/barryvdh/laravel-debugbar/src/DataCollector/   drwxrwxrwx
Free 12.95 GB of 57.97 GB (22.34%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


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

namespace Barryvdh\Debugbar\DataCollector;

use 
DebugBar\DataCollector\DataCollector;
use 
DebugBar\DataCollector\Renderable;
use 
Illuminate\Auth\Recaller;
use 
Illuminate\Auth\SessionGuard;
use 
Illuminate\Contracts\Auth\Authenticatable;
use 
Illuminate\Contracts\Auth\Guard;
use 
Illuminate\Support\Str;
use 
Illuminate\Contracts\Support\Arrayable;

/**
 * Collector for Laravel's Auth provider
 */
class MultiAuthCollector extends DataCollector implements Renderable
{
    
/** @var array $guards */
    
protected $guards;

    
/** @var \Illuminate\Auth\AuthManager */
    
protected $auth;

    
/** @var bool */
    
protected $showName false;

    
/** @var bool */
    
protected $showGuardsData true;

    
/**
     * @param \Illuminate\Auth\AuthManager $auth
     * @param array $guards
     */
    
public function __construct($auth$guards)
    {
        
$this->auth $auth;
        
$this->guards $guards;
    }

    
/**
     * Set to show the users name/email
     * @param bool $showName
     */
    
public function setShowName($showName)
    {
        
$this->showName = (bool) $showName;
    }

    
/**
     * Set to hide the guards tab, and show only name
     * @param bool $showGuardsData
     */
    
public function setShowGuardsData($showGuardsData)
    {
        
$this->showGuardsData = (bool) $showGuardsData;
    }

    
/**
     * @{inheritDoc}
     */
    
public function collect()
    {
        
$data = [
            
'guards' => [],
        ];
        
$names '';

        foreach (
$this->guards as $guardName => $config) {
            try {
                
$guard $this->auth->guard($guardName);
                if (
$this->hasUser($guard)) {
                    
$user $guard->user();

                    if (!
is_null($user)) {
                        
$data['guards'][$guardName] = $this->getUserInformation($user);
                        
$names .= $guardName ": " $data['guards'][$guardName]['name'] . ', ';
                    }
                } else {
                    
$data['guards'][$guardName] = null;
                }
            } catch (
\Exception $e) {
                continue;
            }
        }

        foreach (
$data['guards'] as $key => $var) {
            if (!
is_string($data['guards'][$key])) {
                
$data['guards'][$key] = $this->formatVar($var);
            }
        }

        
$data['names'] = rtrim($names', ');
        if (!
$this->showGuardsData) {
            unset(
$data['guards']);
        }

        return 
$data;
    }

    private function 
hasUser(Guard $guard)
    {
        if (
method_exists($guard'hasUser')) {
            return 
$guard->hasUser();
        }

        return 
false;
    }

    
/**
     * Get displayed user information
     * @param \Illuminate\Auth\UserInterface $user
     * @return array
     */
    
protected function getUserInformation($user null)
    {
        
// Defaults
        
if (is_null($user)) {
            return [
                
'name' => 'Guest',
                
'user' => ['guest' => true],
            ];
        }

        
// The default auth identifer is the ID number, which isn't all that
        // useful. Try username, email and name.
        
$identifier $user instanceof Authenticatable $user->getAuthIdentifier() : $user->getKey();
        if (
is_numeric($identifier) || Str::isUuid($identifier) || Str::isUlid($identifier)) {
            try {
                if (isset(
$user->username)) {
                    
$identifier $user->username;
                } elseif (isset(
$user->email)) {
                    
$identifier $user->email;
                } elseif (isset(
$user->name)) {
                    
$identifier Str::limit($user->name24);
                }
            } catch (
\Throwable $e) {
            }
        }

        return [
            
'name' => $identifier,
            
'user' => $user instanceof Arrayable $user->toArray() : $user,
        ];
    }

    
/**
     * @{inheritDoc}
     */
    
public function getName()
    {
        return 
'auth';
    }

    
/**
     * @{inheritDoc}
     */
    
public function getWidgets()
    {
        
$widgets = [];

        if (
$this->showGuardsData) {
            
$widgets["auth"] = [
                
"icon" => "lock",
                
"widget" => "PhpDebugBar.Widgets.VariableListWidget",
                
"map" => "auth.guards",
                
"default" => "{}",
            ];
        }

        if (
$this->showName) {
            
$widgets['auth.name'] = [
                
'icon' => 'user',
                
'tooltip' => 'Auth status',
                
'map' => 'auth.names',
                
'default' => '',
            ];
        }

        return 
$widgets;
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

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

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

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0062 ]--