!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)

/uploads/script/vendor/phpseclib/phpseclib/phpseclib/Crypt/DSA/Formats/Keys/   drwxr-xr-x
Free 13.12 GB of 57.97 GB (22.63%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


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

/**
 * PKCS#1 Formatted DSA Key Handler
 *
 * PHP version 5
 *
 * Used by File/X509.php
 *
 * Processes keys with the following headers:
 *
 * -----BEGIN DSA PRIVATE KEY-----
 * -----BEGIN DSA PUBLIC KEY-----
 * -----BEGIN DSA PARAMETERS-----
 *
 * Analogous to ssh-keygen's pem format (as specified by -m)
 *
 * Also, technically, PKCS1 decribes RSA but I am not aware of a formal specification for DSA.
 * The DSA private key format seems to have been adapted from the RSA private key format so
 * we're just re-using that as the name.
 *
 * @category  Crypt
 * @package   DSA
 * @author    Jim Wigginton <terrafrost@php.net>
 * @copyright 2015 Jim Wigginton
 * @license   http://www.opensource.org/licenses/mit-license.html  MIT License
 * @link      http://phpseclib.sourceforge.net
 */

namespace phpseclib3\Crypt\DSA\Formats\Keys;

use 
phpseclib3\Math\BigInteger;
use 
phpseclib3\Crypt\Common\Formats\Keys\PKCS1 as Progenitor;
use 
phpseclib3\File\ASN1;
use 
phpseclib3\File\ASN1\Maps;
use 
ParagonIE\ConstantTime\Base64;

/**
 * PKCS#1 Formatted DSA Key Handler
 *
 * @package RSA
 * @author  Jim Wigginton <terrafrost@php.net>
 * @access  public
 */
abstract class PKCS1 extends Progenitor
{
    
/**
     * Break a public or private key down into its constituent components
     *
     * @access public
     * @param string $key
     * @param string $password optional
     * @return array
     */
    
public static function load($key$password '')
    {
        
$key parent::load($key$password);

        
$decoded ASN1::decodeBER($key);
        if (empty(
$decoded)) {
            throw new 
\RuntimeException('Unable to decode BER');
        }

        
$key ASN1::asn1map($decoded[0], Maps\DSAParams::MAP);
        if (
is_array($key)) {
            return 
$key;
        }

        
$key ASN1::asn1map($decoded[0], Maps\DSAPrivateKey::MAP);
        if (
is_array($key)) {
            return 
$key;
        }

        
$key ASN1::asn1map($decoded[0], Maps\DSAPublicKey::MAP);
        if (
is_array($key)) {
            return 
$key;
        }

        throw new 
\RuntimeException('Unable to perform ASN1 mapping');
    }

    
/**
     * Convert DSA parameters to the appropriate format
     *
     * @access public
     * @param \phpseclib3\Math\BigInteger $p
     * @param \phpseclib3\Math\BigInteger $q
     * @param \phpseclib3\Math\BigInteger $g
     * @return string
     */
    
public static function saveParameters(BigInteger $pBigInteger $qBigInteger $g)
    {
        
$key = [
            
'p' => $p,
            
'q' => $q,
            
'g' => $g
        
];

        
$key ASN1::encodeDER($keyMaps\DSAParams::MAP);

        return 
"-----BEGIN DSA PARAMETERS-----\r\n" .
               
chunk_split(Base64::encode($key), 64) .
               
"-----END DSA PARAMETERS-----\r\n";
    }

    
/**
     * Convert a private key to the appropriate format.
     *
     * @access public
     * @param \phpseclib3\Math\BigInteger $p
     * @param \phpseclib3\Math\BigInteger $q
     * @param \phpseclib3\Math\BigInteger $g
     * @param \phpseclib3\Math\BigInteger $y
     * @param \phpseclib3\Math\BigInteger $x
     * @param string $password optional
     * @param array $options optional
     * @return string
     */
    
public static function savePrivateKey(BigInteger $pBigInteger $qBigInteger $gBigInteger $yBigInteger $x$password '', array $options = [])
    {
        
$key = [
            
'version' => 0,
            
'p' => $p,
            
'q' => $q,
            
'g' => $g,
            
'y' => $y,
            
'x' => $x
        
];

        
$key ASN1::encodeDER($keyMaps\DSAPrivateKey::MAP);

        return 
self::wrapPrivateKey($key'DSA'$password$options);
    }

    
/**
     * Convert a public key to the appropriate format
     *
     * @access public
     * @param \phpseclib3\Math\BigInteger $p
     * @param \phpseclib3\Math\BigInteger $q
     * @param \phpseclib3\Math\BigInteger $g
     * @param \phpseclib3\Math\BigInteger $y
     * @return string
     */
    
public static function savePublicKey(BigInteger $pBigInteger $qBigInteger $gBigInteger $y)
    {
        
$key ASN1::encodeDER($yMaps\DSAPublicKey::MAP);

        return 
self::wrapPublicKey($key'DSA');
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

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

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

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