404

[ Avaa Bypassed ]




Upload:

Command:

elspacio@18.116.81.33: ~ $
3

�k�Z��@slddlmZmZddlZddlZddlZddlZddlmZm	Z	m
Z
mZdd�Zdd�Z
d	d
�Zdd�ZdS)
�)�absolute_import�print_functionN�)�DecodeError�__version__�decode�encodec
Cs�|jdkrtd��i}x�|jD]�}|jdd�\}}|dkrr|ddkrrt|�dkrrtttj�t|dd����}|j�r�t|�}n"yt	|�}Wntk
r�YnXdddd	�}||kr�||}|||<qWt
||j|jd
�}|jd�S)Nz4Key is required when encoding. See --help for usage.�=rZexpr�+TF)�trueZfalseZnull)�key�	algorithmzutf-8)
r�
ValueError�payload�split�len�str�int�time�isdigit�floatrr
r)�argsr�arg�k�vZ	constants�token�r�/usr/lib/python3.6/__main__.py�encode_payload
s,
  

rcCs�yV|jr|j}n"tjj�r*tjj�j�}ntd��|jd�}t||j	|j
d�}tj|�St
k
r�}zt
d|��WYdd}~XnXdS)Nz*Cannot read from stdin: terminal not a TTYzutf-8)r�verifyz)There was an error decoding the token: %s)r�sys�stdin�isatty�readline�strip�IOErrorrrrr�json�dumpsr)rr�data�errr�decode_payload7s


r*cCs�d}tjd|d�}|jddddtd�|jd	d
dddd
�|jdddddd
�|jdddd�}|jddd�}d}|jdd|d�|jtd�|jdd d�}|jd!d"d#d$�|jd%d&d'd(d)d*d+�|jtd�|S),Na
    Encodes or decodes JSON Web Tokens based on input.

    %(prog)s [options] <command> [options] input

    Decoding examples:

    %(prog)s --key=secret decode json.web.token
    %(prog)s decode --no-verify json.web.token

    Encoding requires the key option and takes space separated key/value pairs
    separated by equals (=) as input. Examples:

    %(prog)s --key=secret encode iss=me exp=1302049071
    %(prog)s --key=secret encode foo=bar exp=+10

    The exp key is special and can take an offset to current Unix time.
    Zpyjwt)�prog�usagez-vz	--version�versionz	%(prog)s )�actionr-z--keyrZKEYzset the secret key to sign with)�dest�metavar�default�helpz--algr
ZALGZHS256z0set crypto algorithm to sign with. default=HS256zPyJWT subcommandszvalid subcommandszadditional help)�title�descriptionr2rz use to encode a supplied payload)r2zfPayload to encode. Must be a space separated list of key/value
    pairs separated by equals (=) sign.rr
)�nargsr2)�funcrz'use to decode a supplied JSON web tokenrzJSON web token to decode.�?)r2r5z-nz--no-verifyZstore_falserTz2ignore signature and claims verification on decode)r.r/r1r2)	�argparse�ArgumentParser�add_argumentrZadd_subparsersZ
add_parserZset_defaultsrr*)r,�
arg_parserZ
subparsersZ
encode_parserZpayload_helpZ
decode_parserrrr�build_argparserJsRr<cCsjt�}y*|jtjdd��}|j|�}t|�Wn4tk
rd}ztd|�|j�WYdd}~XnXdS)NrzThere was an unforseen error: )r<�
parse_argsr �argvr6�print�	ExceptionZ
print_help)r;Z	arguments�outputr)rrr�main�s

rB)Z
__future__rrr8r&r r�rrrrrr*r<rBrrrr�<module>s*S

Filemanager

Name Type Size Permission Actions
__init__.cpython-36.opt-1.pyc File 1.02 KB 0644
__init__.cpython-36.pyc File 1.02 KB 0644
__main__.cpython-36.opt-1.pyc File 3.48 KB 0644
__main__.cpython-36.pyc File 3.48 KB 0644
algorithms.cpython-36.opt-1.pyc File 10.84 KB 0644
algorithms.cpython-36.pyc File 10.84 KB 0644
api_jws.cpython-36.opt-1.pyc File 6.24 KB 0644
api_jws.cpython-36.pyc File 6.24 KB 0644
api_jwt.cpython-36.opt-1.pyc File 5.85 KB 0644
api_jwt.cpython-36.pyc File 5.85 KB 0644
compat.cpython-36.opt-1.pyc File 1.39 KB 0644
compat.cpython-36.pyc File 1.39 KB 0644
exceptions.cpython-36.opt-1.pyc File 2.05 KB 0644
exceptions.cpython-36.pyc File 2.05 KB 0644
utils.cpython-36.opt-1.pyc File 3.04 KB 0644
utils.cpython-36.pyc File 3.04 KB 0644