MOON
Server: Apache
System: Linux server30c.hostingraja.org 3.10.0-962.3.2.lve1.5.63.el7.x86_64 #1 SMP Fri Oct 8 12:03:35 UTC 2021 x86_64
User: jibhires (1887)
PHP: 8.1.30
Disabled: show_source, system, shell_exec, passthru, exec, popen, proc_open, allow_url_fopen, symlink, escapeshellcmd, pcntl_exec
Upload Files
File: //opt/alt/python35/lib/python3.5/site-packages/jwt/__pycache__/__main__.cpython-35.pyc


b'[��@s�ddlmZmZddlZddlZddlZddlZddlmZm	Z	m
Z
mZdd�Zdd�Z
d	d
�Zdd�ZdS)
�)�absolute_import�print_functionN�)�DecodeError�__version__�decode�encodecCsJ|jdkrtd��i}x�|jD]�}|jdd�\}}|dkr�|ddkr�t|�dkr�tttj�t|dd����}|j�r�t|�}n%yt	|�}Wntk
r�YnXddd	d
ddi}||kr||}|||<q+Wt
|d|jd
|j�}|jd�S)Nz4Key is required when encoding. See --help for usage.�=r�expr�+�trueT�falseFZnull�key�	algorithmzutf-8)
r�
ValueError�payload�split�len�str�int�time�isdigit�floatrrr)�argsr�arg�k�vZ	constants�token�r�/__main__.py�encode_payload
s,.,

	r cCs�y�|jr|j}n3tjj�r?tjj�j�}ntd��|jd�}t|d|j	d|j
�}tj|�SWn5t
k
r�}zt
d|��WYdd}~XnXdS)Nz*Cannot read from stdin: terminal not a TTYzutf-8r�verifyz)There was an error decoding the token: %s)r�sys�stdin�isatty�readline�strip�IOErrorrrrr!�json�dumpsr)rr�data�errr�decode_payload7s	r,cCsTd}tjddd|�}|jdddddd	t�|jd
ddd
ddddd�|jdddd
ddddd�|jdddddd�}|jddd�}d}|jdd d!d|�|jd"t�|jd#dd$�}|jd%dd&d d'�|jd(d)dd*dd+dd,dd-�|jd"t�|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.
    �progZpyjwt�usagez-vz	--version�action�versionz	%(prog)s z--key�destr�metavarZKEY�default�helpzset the secret key to sign withz--algrZALGZHS256z0set crypto algorithm to sign with. default=HS256�titlezPyJWT subcommands�descriptionzvalid subcommandszadditional helprz use to encode a supplied payloadzfPayload to encode. Must be a space separated list of key/value
    pairs separated by equals (=) sign.r�nargsr�funcrz'use to decode a supplied JSON web tokenrzJSON web token to decode.�?z-nz--no-verifyZstore_falser!Tz2ignore signature and claims verification on decode)	�argparse�ArgumentParser�add_argumentrZadd_subparsersZ
add_parserZset_defaultsr r,)r.�
arg_parserZ
subparsersZ
encode_parserZpayload_helpZ
decode_parserrrr�build_argparserJsR						r>cCs�t�}y9|jtjdd��}|j|�}t|�Wn<tk
r�}ztd|�|j�WYdd}~XnXdS)NrzThere was an unforseen error: )r>�
parse_argsr"�argvr8�print�	ExceptionZ
print_help)r=Z	arguments�outputr+rrr�main�s	
rD)Z
__future__rrr:r(r"r�rrrrr r,r>rDrrrr�<module>s"*S