CasperSecurity

Current Path : /lib/python3/dist-packages/DistUpgrade/__pycache__/
Upload File :
Current File : //lib/python3/dist-packages/DistUpgrade/__pycache__/DistUpgradePatcher.cpython-310.pyc

o

>I�c��@s.ddlZddlZGdd�de�Zddd�ZdS)�Nc@seZdZdZdS)�
PatchErrorz  Error during the patch process N)�__name__�
__module__�__qualname__�__doc__�rr�@/usr/lib/python3/dist-packages/DistUpgrade/DistUpgradePatcher.pyrsrcCs<td�\}}t|dd��}|��}Wd�n1swYd}}|}	t|dd��}|��}
Wd�n1s;wY|
D]�}|	|kr�|��}|�d�r|dd�}|�dd�\}}
|
retd	��|�d�\}}}tj	||||dd
�\}}|||<qB|d}|dd��d�\}}}t
|�}|d8}|d
kr�|d}nt
|�}|dkr�|||�=|}	|d8}qB|dkr�|}	qB|dkr�|||�=qBtd|��|	|kr�|dkr�|}	qB|d7}|�||�qBd
�|�}|r�t
��}|�|�d��|��|kr�td��t|ddd��}|�|�Wd�dS1�swYdS)z� python implementation of enough "ed" to apply ed-style
        patches. Note that this patches in memory so its *not*
        suitable for big files
    �zUTF-8)�encodingNrzs/�/�zflags for s// not supported yet)�count����,��c�a�dzunknown command: '%s'z.
z(the md5sum after patching is not correct�wT)�range�open�	readlines�strip�
startswith�rsplitr�	partition�re�subn�int�insert�join�hashlib�md5�update�encode�	hexdigest�write)�orig�edpatch�
result_md5sum�STATE_EXPECT_COMMAND�STATE_EXPECT_DATA�f�
orig_lines�start�end�state�lines�line�subs�flags�regexp�sep�repl�newr
�command�	start_str�end_str�resultr"rrr�patchsr�
�
�



�

��r=)N)r!r�	Exceptionrr=rrrr�<module>s
Hacker Blog, Shell İndir, Sql İnjection, XSS Attacks, LFI Attacks, Social Hacking, Exploit Bot, Proxy Tools, Web Shell, PHP Shell, Alfa Shell İndir, Hacking Training Set, DDoS Script, Denial Of Service, Botnet, RFI Attacks, Encryption
Telegram @BIBIL_0DAY