CasperSecurity

Current Path : /usr/lib/python3.10/__pycache__/
Upload File :
Current File : //usr/lib/python3.10/__pycache__/netrc.cpython-310.pyc

o

`�wis�@s\dZddlZddlZddlZddgZGdd�de�ZGdd�d�Zedkr,e	e��dSdS)z-An object-oriented interface to .netrc files.�N�netrc�NetrcParseErrorc@s"eZdZdZddd�Zdd�ZdS)rz5Exception raised on syntax errors in the .netrc file.NcCs"||_||_||_t�||�dS�N)�filename�lineno�msg�	Exception�__init__)�selfrrr�r�/usr/lib/python3.10/netrc.pyr	szNetrcParseError.__init__cCsd|j|j|jfS)Nz%s (%s, line %s))rrr)r
rrr�__str__szNetrcParseError.__str__)NN)�__name__�
__module__�__qualname__�__doc__r	r
rrrrr
s
c@s.eZdZd
dd�Zdd�Zdd�Zdd	�ZdS)rNcCs�|du}|durtj�tj�d�d�}i|_i|_z"t|dd��}|�|||�Wd�WdS1s4wYWdStydt|dd��}|�|||�Wd�YdS1s\wYYdSw)N�~z.netrczutf-8)�encoding�locale)	�os�path�join�
expanduser�hosts�macros�open�_parse�UnicodeDecodeError)r
�file�
default_netrc�fprrrr	s&�&��znetrc.__init__cCs�t�|�}|jd7_|j�dd�|_	|j}|��}}|s"dS|ddkr9|j|kr8t|�dkr8|j��q|dkrB|��}n:|dkrId}n3|dkrs|��}g|j	|<d	|_
	|j��}	|	re|	d
krid|_
n	|j	|�|	�qZqtd|||j��d}
d}}i|j
|<	|��}|�d�s�|d
vr�|r�|
||f|j
|<|�|�n�td||t|�f||j��|dks�|dkr�|��}
n�|dkr�|��}n�|dk�rAtjdk�r<|�r<t�|���}
|
jt��k�r+ddl}z
|�|
j�d}Wnt�yd|
j}Ynwz|�t���d}Wnt�ydt��}Ynwtd||f||j��|
jtjtjB@�r<td||j��|��}n	td|||j��q�q)Nz !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~�#��r�machine�default�macdefz 	�
z 	
zbad toplevel token %r>r"r&r%r$z&malformed %s entry %s terminated by %s�login�user�account�password�posixzuid %sz9~/.netrc file owner (%s) does not match current user (%s)zY~/.netrc access too permissive: access permissions must restrict access to only the ownerzbad follower token %r)�shlex�	wordchars�
commenters�replacer�	get_token�len�instream�readliner�
whitespace�appendrr�
startswith�
push_token�reprr�name�fstat�fileno�st_uid�getuid�pwd�getpwuid�KeyError�st_mode�stat�S_IRWXG�S_IRWXO)r
rr r�lexer�saved_lineno�toplevel�tt�	entryname�liner(r*r+�propr?�fownerr)rrrr$s�




��


��


�����
���znetrc._parsecCs,||jvr
|j|Sd|jvr|jdSdS)z8Return a (user, account, password) tuple for given host.r%N)r)r
�hostrrr�authenticatorsus




znetrc.authenticatorscCs�d}|j��D],}|j|}|d|�d|d�d�7}|dr)|d|d�d�7}|d|d	�d�7}q|j��D]}|d
|�d�7}|j|D]}||7}qH|d7}q9|S)z3Dump the class data in the format of a .netrc file.r"zmachine z
	login rr'r#z		account z
	password �zmacdef )r�keysr)r
�reprN�attrs�macrorKrrr�__repr__~s


znetrc.__repr__r)rrrr	rrOrUrrrrrs


Q	�__main__)
rrr-rC�__all__rrrr�printrrrr�<module>sx�
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