BYPASS SHELL BY ./RAZORGANZ
Server: nginx/1.20.1
System: Linux iZdzfnv9mwfppeZ 5.10.134-19.2.al8.x86_64 #1 SMP Wed Oct 29 22:47:09 CST 2025 x86_64
User: apache (48)
PHP: 8.2.30
Disabled: NONE
Upload Files
File: //usr/local/lib/python3.6/site-packages/feedparser/__pycache__/http.cpython-36.pyc
3

_9jt&�@s�ddlZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
mZddlm
Z
dZGdd�dejjejjejj�Zdd	�Zdd
d�ZdS)
�N�)�_parse_date)�convert_to_idnz�application/atom+xml,application/rdf+xml,application/rss+xml,application/x-netcdf,application/xml;q=0.9,text/xml;q=0.2,*/*;q=0.1c@s4eZdZdd�Zdd�ZeZeZeZeZdd�Z	dS)�_FeedURLHandlercCs
||_|S)N)�status)�self�req�fp�code�msg�headers�r
�9/usr/local/lib/python3.6/site-packages/feedparser/http.py�http_error_default0sz"_FeedURLHandler.http_error_defaultcCs4tjjj||||||�}|s |S||_|j�|_|S)N)�urllib�request�HTTPRedirectHandler�http_error_301r�geturl�newurl)rrr	r
r�hdrs�resultr
r
rr6s
z_FeedURLHandler.http_error_301cCs�tjj|j��d}d|jks&d|kr8|j|||||�Stj|jdjd�dj	��j
�}|jd�\}}	tjd|d�d}
|j
|
|||	�|jd|||�}|j�|S)	Nr�
AuthorizationzWWW-Authenticate� �:zrealm="([^"]*)"rzwww-authenticate)r�parse�urlparse�get_full_urlrr�base64�decodebytes�split�encode�decode�re�findall�add_password�http_error_auth_reqed�reset_retry_count)rrr	r
rr�host�auth�userZpassw�realm�retryr
r
r�http_error_401Fs
"z_FeedURLHandler.http_error_401N)
�__name__�
__module__�__qualname__rrZhttp_error_300�http_error_302�http_error_303�http_error_307r-r
r
r
rr/src
Cs>tjj|�}|jd|�|r(|jd|�t|t�r<t|�}nt|tj�rP|j�}|r�ddddddd	g}	d
ddd
ddddddddg}
|jdd|	|d|d|
|dd|d|d|d|df�|r�|jd|�|jd d!�|r�|jd"d#|�|�r
|jd$|�x"|j	�D]\}}|j||��qW|jd%d&�|S)'Nz
User-Agentz
If-None-Match�Mon�Tue�Wed�Thu�Fri�Sat�Sun�Jan�Feb�Mar�Apr�May�Jun�Jul�Aug�Sep�Oct�Nov�DeczIf-Modified-Sincez#%s, %02d %s %04d %02d:%02d:%02d GMT��rr���ZRefererzAccept-encodingz
gzip, deflaterzBasic %s�AcceptzA-IM�feed)
rr�Request�
add_header�
isinstance�strr�datetime�utctimetuple�items)
�url�agentZ
accept_header�etag�modified�referrerr)�request_headersrZshort_weekdays�months�header_name�header_valuer
r
r�_build_urllib2_request\s.

Fr^cCs�|dkrg}nt|t�s|g}|dkr*i}|jd�rB|dd�}n|jd�r\d|dd�}|spddlm}|}d}	|jd�s�tjj|�}
|
jr�t|
�}|
j	|d<|
j
r�|
j	�d|
j
��|d<tjj|�}tj
|
j�d|
j��j��j�}	t|t��s�t|�}g}xP|D]H}
y|
jd	�Wn(tk
�rB|jtjj|
��YnX|j|
��qWd
j|�}t||t||||	|�}tjjt|t�g��}g|_|j|�}|j�}|j �dd�|j!j"�D�|d
<|�rLd|d
j#dd
�k�rLyt$j%t&j'|�d�j�}WnNt(t)t*j+fk
�rH}z(d|d<||d<t|t*j+��r8d}WYdd}~XnXn�|�r�d|d
j#dd
�k�r�yt,j-|�}Wn`t,j+k
�r�yt,j-|d&�}Wn6t,j+k
�r�}zd|d<||d<WYdd}~XnXYnXd|d
k�r|d
j#dd
�}t|t��r|jdd�}|�r||d<d|d
k�rT|d
j#dd
�}|�rT||d<t.|�|d<t|j/t��rv|j/jdd�|d<n
|j/|d<t0|dd��p�d|d<t0|dd �d!k�r�d
|d"<d'|d%<|S)(Nz	feed:httprKzfeed:zhttp:r)�
USER_AGENTzftp:r�ascii�cSsi|]\}}||j��qSr
)�lower)�.0�k�vr
r
r�
<dictcomp>�szget.<locals>.<dictcomp>r�gzipzcontent-encoding)�fileobjTZbozoZbozo_exception�deflate�rWzutf-8�ignorez
last-modifiedrXZmodified_parsed�hrefr��r
ri0�versionz1The feed has not changed since you last checked, z:so the server sent no data.  This is a feature, not a bug!Z
debug_messagei�zkThe feed has not changed since you last checked, so the server sent no data.  This is a feature, not a bug!)1rP�list�
startswithrar_rrr�username�hostname�port�
urlunparser�standard_b64encode�passwordr!r"�bytesr�UnicodeEncodeError�append�quote�joinr^�
ACCEPT_HEADERr�build_opener�tupler�
addheaders�open�read�closerrT�getrg�GzipFile�io�BytesIO�EOFError�IOError�struct�error�zlib�
decompressrrU�getattr)rUrWrXrVrY�handlersrZrr_r)�
url_piecesZ
new_pieces�bits�cr�opener�f�data�er
r
rr�|s�




 


 
r�)NNNNNNN)rrRrgr�r#r��urllib.parser�urllib.requestr�Z	datetimesr�urlsrr|r�HTTPDigestAuthHandlerr�HTTPDefaultErrorHandlerrr^r�r
r
r
r�<module>s -