✘✘ GRAYBYTE WORDPRESS FILE MANAGER ✘✘

​🇳​​🇦​​🇲​​🇪♯➤ server.blackpussy.asia ​🇻​♯➤ 5.14.0-611.20.1.el9_7.x86_64 #1 SMP 🇾​♯➤ 2026

𝗛𝗢𝗠𝗘 𝗜𝗗 ♯➤ 163.245.207.76 ♯➤ 𝗔𝗗𝗠𝗜𝗡 𝗜𝗗 216.73.216.243
𝗢𝗣𝗧𝗜𝗢𝗡𝗦 ♯ CRL ♯➤ 𝗢𝗞 ┃ WGT ♯➤ 𝗢𝗞 ┃ SDO ♯➤ 𝗢𝗞 ┃ PKEX ♯➤ 𝗢𝗙𝗙
𝗗𝗘𝗔𝗖𝗧𝗜𝗩𝗔𝗧𝗘𝗗 ♯➤ mail,mb_send_mail
𝗖𝗨𝗥𝗥𝗘𝗡𝗧 𝗙𝗜𝗟𝗘 : /usr/src/lsws/lsws-6.3.4/admin/misc//RSAKeyImport.php
<?php

/**
 * RSAKeyImport
 *
 * PHP versions 4 and 5
 *
 * LICENSE: This source file is subject to version 3.0 of the PHP license
 * that is available through the world-wide-web at the following URI:
 * http://www.php.net/license/3_0.txt.  If you did not receive a copy of
 * the PHP License and are unable to obtain it through the web, please
 * send a note to license@php.net so we can mail you a copy immediately.
 *
 * Many of the functions in this class are from the PEAR Crypt_RSA package ...
 * So most of the credits goes to the original creator of this package Alexander Valyalkin
 * you can get the package under http://pear.php.net/package/Crypt_RSA
 *
 * This is just a simplified extraction for the PEM key import functionality and requires bcmath.
 *
 * @author     Lite Speed Technologies <info@litespeedtech.com>
 * @copyright  2009 Lite Speed Technologies
 * @license    http://www.php.net/license/3_0.txt  PHP License 3.0
 * @version    1.0.0
 */

class RSAKeyImport
{
    function bin2int($str)
    {
        $result = '0';
        $n = strlen($str);
        do {
            $result = bcadd(bcmul($result, '256'), ord($str{--$n}));
        } while ($n > 0);
        return $result;
    }

    function fromPEMString($str)
    {
        // search for base64-encoded private key
        if (!preg_match('/-----BEGIN RSA PRIVATE KEY-----([^-]+)-----END RSA PRIVATE KEY-----/', $str, $matches)) {
            echo ("can't find RSA private key in the string [{$str}]");
            return false;
        }

        // parse private key. It is ASN.1-encoded
        $str = base64_decode($matches[1]);
        $pos = 0;
        $tmp = RSAKeyImport::_ASN1Parse($str, $pos);
        if ($tmp == false) 
            return false;
    
        if ($tmp['tag'] != 0x10) {
            echo "Expected 0x10 (SEQUENCE) wrong ASN tag value: " .  $tmp['tag'];
	    return false;
        }

        // parse ASN.1 SEQUENCE for RSA private key
        $attr_names = array('version', 'n', 'e', 'd', 'p', 'q', 'dmp1', 'dmq1', 'iqmp');
        $n = sizeof($attr_names);
        $rsa_attrs = array();
        for ($i = 0; $i < $n; $i++) {
            $tmp = RSAKeyImport::_ASN1ParseInt($str, $pos);
            if ($tmp === false) {
		echo "fail to parse int";
                return false;
            }
            $attr = $attr_names[$i];
            $rsa_attrs[$attr] = $tmp;
        }
	return $rsa_attrs;

        // create Crypt_RSA_KeyPair object.
	$keypair = &new KeyPair($rsa_attrs);
        if ($keypair == false) {
            return false;
        }
        return $keypair; 
    }

    function _ASN1Parse($str, &$pos)
    {
        $max_pos = strlen($str);
        if ($max_pos < 2) {
            echo ("ASN.1 string too short");
            return false;
        }

        // get ASN.1 tag value
        $tag = ord($str[$pos++]) & 0x1f;
        if ($tag == 0x1f) {
            $tag = 0;
            do {
                $n = ord($str[$pos++]);
                $tag <<= 7;
                $tag |= $n & 0x7f;
            } while (($n & 0x80) && $pos < $max_pos);
        }
        if ($pos >= $max_pos) {
            echo("ASN.1 string too short");
            return false;
        }

        // get ASN.1 object length
        $len = ord($str[$pos++]);
        if ($len & 0x80) {
            $n = $len & 0x1f;
            $len = 0;
            while ($n-- && $pos < $max_pos) {
                $len <<= 8;
                $len |= ord($str[$pos++]);
            }
        }
        if ($pos >= $max_pos || $len > $max_pos - $pos) {
            echo ("ASN.1 string too short");
            return false;
        }

        // get string value of ASN.1 object
        $str = substr($str, $pos, $len);

        return array(
            'tag' => $tag,
            'str' => $str,
	    );
    }

    function _ASN1ParseInt($str, &$pos)
    {
        $tmp = RSAKeyImport::_ASN1Parse($str, $pos);
        if ($tmp == false) {
            return false;
        }
        if ($tmp['tag'] != 0x02) {
            echo "Expected 0x02 (INTEGER) wrong ASN tag value: " . $tmp['tag'];
            return false;
        }
        $pos += strlen($tmp['str']);

        return strrev($tmp['str']);
    }

    function dec2string($decimal, $base) {

	$string = null;

	$base = (int) $base;
	if ($base < 2 | $base > 36 | $base == 10) {
	    echo 'BASE must be in the range 2-9 or 11-36';
	    exit;
	}

	$charset = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ';

	$charset = substr($charset, 0, $base);

	do {
	    $remainder = bcmod($decimal, $base);
	    $char = substr($charset, $remainder, 1);
	    $string = "$char$string";
	    $decimal = bcdiv(bcsub($decimal, $remainder), $base);
	} while ($decimal > 0);

	return strtolower($string);
    }

    function import_and_convert($pem_filename)
    {
	$str1 = file_get_contents($pem_filename);
	if ($str1 == false) {
	    echo "failed to open file $pem_filename";
	    return false;
	}

	$attrs = RSAKeyImport::fromPEMString($str1);
	if ($attrs == false) {
	    echo "failed to parse $pem_filename";
	    return false;
	}

	$n_int = RSAKeyImport::bin2int($attrs['n']);
	$d_int = RSAKeyImport::bin2int($attrs['d']);
	$e_int = RSAKeyImport::bin2int($attrs['e']);
	$e_hex = RSAKeyImport::dec2string($e_int,16);
	$n_hex = RSAKeyImport::dec2string($n_int,16);
	$mykeys = array( 'e_hex' => $e_hex, 'n_hex' => $n_hex, 'd_int' => $d_int, 'n_int' => $n_int);

	return $mykeys;
    }

}

## main
# openssl genrsa -out key.pem 512

?>

Current_dir [ 𝗡𝗢𝗧 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ] Document_root [ 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ]

Current_dir [ 𝗡𝗢𝗧 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ] Document_root [ 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ]


[ Back ]
𝗡𝗔𝗠𝗘
𝗦𝗜𝗭𝗘
𝗟𝗔𝗦𝗧 𝗧𝗢𝗨𝗖𝗛
𝗨𝗦𝗘𝗥
𝗦𝗧𝗔𝗧𝗨𝗦
𝗙𝗨𝗡𝗖𝗧𝗜𝗢𝗡𝗦
..
--
7 Jan 2026 7.08 PM
1000 / users
0755
RSAKeyImport.php
5.333 KB
22 Dec 2013 11.42 PM
1000 / users
0644
admpass.sh
1.166 KB
1 Sep 2015 2.03 PM
1000 / users
0755
ap_lsws.sh.in
1.823 KB
2 Oct 2019 3.23 PM
1000 / users
0755
awstats_install.sh
2.056 KB
22 Feb 2024 2.07 PM
1000 / users
0755
build_ap_wrapper.sh
0.609 KB
22 Dec 2013 11.42 PM
1000 / users
0755
chroot.sh
7.307 KB
7 Jan 2026 7.14 PM
1000 / users
0755
cleancache.sh
1.462 KB
13 Jul 2021 10.21 PM
1000 / users
0644
cleanlitemage.sh
2.398 KB
15 Feb 2016 5.49 PM
1000 / users
0644
cp_switch_ws.sh
22.406 KB
9 Nov 2023 4.26 PM
1000 / users
0644
cpanel_restart_httpd.in
0.715 KB
22 Dec 2013 11.42 PM
1000 / users
0755
create_admin_keypair.sh
0.328 KB
1 Sep 2015 2.03 PM
1000 / users
0755
enable_ruby_python_selector.sh
2.681 KB
6 Sep 2023 4.13 PM
1000 / users
0755
fix_cagefs.sh
0.748 KB
14 Jan 2022 9.16 PM
1000 / users
0755
fp_install.sh
1.647 KB
22 Nov 2016 3.20 PM
1000 / users
0755
gdb-bt
0.024 KB
26 Jun 2016 10.16 PM
1000 / users
0644
genjCryptionKeyPair.php
6.429 KB
1 Sep 2015 2.03 PM
1000 / users
0644
gzipStatic.sh
0.266 KB
22 Dec 2013 11.42 PM
1000 / users
0755
htpasswd.php
0.101 KB
17 Feb 2023 5.37 PM
1000 / users
0644
lscmctl
14.577 KB
8 Dec 2021 3.14 PM
1000 / users
0755
lshttpd.service
0.645 KB
17 Jan 2026 3.25 PM
root / root
0644
lshttpd.service.in
0.595 KB
26 Mar 2024 11.44 PM
1000 / users
0644
lsup.sh
2.805 KB
22 Dec 2013 11.42 PM
1000 / users
0755
lsup5.sh
4.175 KB
26 Feb 2019 6.00 PM
1000 / users
0755
lsup5v2.sh
5.63 KB
18 Jun 2020 10.27 PM
1000 / users
0644
lsup6.sh
5.652 KB
30 Dec 2022 5.26 PM
1000 / users
0755
lsws.rc
1.783 KB
17 Jan 2026 3.25 PM
root / root
0644
lsws.rc.gentoo
0.431 KB
17 Jan 2026 3.25 PM
root / root
0644
lsws.rc.gentoo.in
0.381 KB
22 Dec 2013 11.42 PM
1000 / users
0644
lsws.rc.in
1.767 KB
26 Oct 2017 6.15 PM
1000 / users
0644
mgr_ver.sh
1.932 KB
27 Aug 2018 4.46 PM
1000 / users
0755
php.ini
37.108 KB
26 Oct 2017 6.15 PM
1000 / users
0644
purge_cache_by_url
3.228 KB
13 Dec 2018 2.48 AM
1000 / users
0755
rc-inst.sh
6.244 KB
24 Apr 2025 10.01 PM
1000 / users
0755
rc-uninst.sh
4.611 KB
12 Dec 2022 10.18 PM
1000 / users
0755
setup_anubis.sh
0.937 KB
14 Aug 2025 2.49 PM
1000 / users
0755
uninstall.sh
2.899 KB
13 Feb 2020 9.58 PM
1000 / users
0755
update.sh
1.846 KB
30 Sep 2019 10.24 PM
1000 / users
0755

✘✘ GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME ✘✘
Static GIF Static GIF