CasperSecurity

Current Path : /lib/python3/dist-packages/keyring/testing/__pycache__/
Upload File :
Current File : //lib/python3/dist-packages/keyring/testing/__pycache__/util.cpython-310.pyc

o

���a~�@shddlZddlZddlZddlZddlZGdd�d�Zejdd��Zdd�Zej	ej
Zefdd	�ZdS)
�Nc@s:eZdZdZdd�Zd
dd�Zdd�Zd	d
�Zdd�ZdS)�ImportKillerz@Context manager to make an import of a given name or names fail.cGs
||_dS�N��names)�selfr�r�6/usr/lib/python3/dist-packages/keyring/testing/util.py�__init__s
zImportKiller.__init__NcCs||jvr|SdSrr)r�fullname�pathrrr�find_modules
�zImportKiller.find_modulecCs||jvsJ�t|��r)r�ImportError)rr
rrr�load_moduleszImportKiller.load_modulecCs8i|_|jD]}tj�|d�|j|<qtj�d|�dS)Nr)�originalr�sys�modules�pop�	meta_path�insert)r�namerrr�	__enter__s
zImportKiller.__enter__cGs6tj�|�|j��D]
\}}|dur|tj|<qdSr)rr�remover�itemsr)r�args�key�valuerrr�__exit__s
��zImportKiller.__exit__r)	�__name__�
__module__�__qualname__�__doc__r	rrrrrrrrrs
rcks��i}|��D]\}}|�|�||<|dur||vr||=q|||<qdV|��D]\}}|dur:||vr9||=q*|||<q*dS)z�Helper context manager to make and unmake changes to a dict.

    A None is not a valid value for the destination, and so means that the
    associated name should be removed.N)r�get)�destination�changesrrrrrr�NoNoneDictMutator#s"��
�
�r$cKsttjfi|��S)z6A context manager to temporarily change the os.environ)r$�os�environ)r#rrr�Environ:sr'cCs&d}td|�D]	}|t�|�7}q|S)z-Generate a random string with length <i>k</i>�r)�range�random�choice)�k�source�result�irrr�
random_stringBsr0)
�
contextlibr%rr*�stringr�contextmanagerr$r'�
ascii_letters�digits�ALPHABETr0rrrr�<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