+
    üÐjÇ  ã                   ó�   € R t ^ RIHt ^ RIHtHt ^ RIHtHt ^ RI	H
t
 ^ RIHt ^ RIHt R tR t ! R	 R
]P"                  4      tR# )z
hosts(5) support.
)Údefer)ÚisIPAddressÚisIPv6Address)ÚcommonÚdns)Úfailure)ÚnativeString)ÚFilePathc                óB  € . p V P                  4       P                  4       pTP                  4       pT F½  pTP	                  R4      pTR8w  d   TRT pT'       g   K*  TP                  4       pTP                  4       TR,           Uu. uF  qwP                  4       NK  	  up9   g   Ku   \        T^ ,          4      p\        T4      '       g   \        T4      '       g   K¬  TP                  T4       K¿  	  T#   \         d    Tu # i ; iu upi   \         d     Ké  i ; i)a�  
Search the given file, which is in hosts(5) standard format, for addresses
associated with a given name.

@param hostsFile: The name of the hosts(5)-format file to search.
@type hostsFile: L{FilePath}

@param name: The name to search for.
@type name: C{bytes}

@return: L{None} if the name is not found in the file, otherwise a
    C{str} giving the address in the file associated with the name.
ó   #N:é   NNéÿÿÿÿ)Ú
getContentÚ
splitlinesÚBaseExceptionÚlowerÚfindÚsplitr   Ú
ValueErrorr   r   Úappend)	Ú	hostsFileÚnameÚresultsÚlinesÚlineÚidxÚpartsÚsÚmaybeIPs	   &&       Ú5/usr/lib/python3/dist-packages/twisted/names/hosts.pyÚsearchFileForAllr       sü   € ð €GðØ×$Ñ$Ó&×1Ñ1Ó3ˆð �:‰:‹<€DÛˆØ�i‰i˜‹oˆØ�"Œ9Ø˜˜�:ˆDßÙØ—
‘
“ˆà�:‰:‹<¨u°R®yÓ9©y¨!ŸG™GžI©yÑ9Ö9ðÜ& u¨Q¥xÓ0�ô ˜7×#Ò#¤}°W×'=Ô'=Ø—‘˜wÖ'ñ ð €Nøô' ô ØŠðüò :øô ô Úðús)   „C7 ÂD
Â*DÃ7DÄDÄDÄDc                óR   € \        \        V 4      V4      pV'       d
   V^ ,          # R# )aŠ  
Grep given file, which is in hosts(5) standard format, for an address
entry with a given name.

@param file: The name of the hosts(5)-format file to search.
@type file: C{str} or C{bytes}

@param name: The name to search for.
@type name: C{bytes}

@return: L{None} if the name is not found in the file, otherwise a
    C{str} giving the first address in the file associated with
    the name.
N)r    r	   )Úfiler   Ú	addressess   && r   ÚsearchFileForr$   9   s$   € ô !¤¨$£°Ó6€IßØ˜�|ÐÙó    c                   óX   a € ] tR t^Nt o RtR
R ltR tR tR tRR lt	RR lt
]	tR	tV tR# )ÚResolverz1
A resolver that services hosts(5) format files.
c                ó\   € \         P                  P                  V 4       Wn        W n        R # ©N)r   ÚResolverBaseÚ__init__r"   Úttl)Úselfr"   r,   s   &&&r   r+   ÚResolver.__init__S   s    € Ü×Ñ×$Ñ$ TÔ*ØŒ	ØŽr%   c                óâ   a a€ \         ;QJ d5    . VV 3R l\        \        S P                  4      S4       4       F  NK  	  5# ! VV 3R l\        \        S P                  4      S4       4       4      # )z^
Return a tuple of L{dns.RRHeader} instances for all of the IPv4
addresses in the hosts file.
c              3   ó  <"  € T Fw  p\        V4      '       g   K  \        P                  ! S\        P                  \        P                  SP
                  \        P                  ! VSP
                  4      4      x € Ky  	  R # 5ir)   )r   r   ÚRRHeaderÚAÚINr,   ÚRecord_A©Ú.0Úaddrr   r-   s   & €€r   Ú	<genexpr>Ú%Resolver._aRecords.<locals>.<genexpr>]   sR   øé € ð 
áC�Ü˜4× ô VŒC�LŠL˜œsŸu™u¤c§f¡f¨d¯h©h¼¿ºÀTÈ4Ï8É8Ó8T×UÐUÛCùó   ƒB›A'B©Útupler    r	   r"   ©r-   r   s   ffr   Ú	_aRecordsÚResolver._aRecordsX   sW   ù€ ÷
 Œuõ 
ä(¬°$·)±)Ó)<¸dÔCó
�uð 	
ˆuõ 
ä(¬°$·)±)Ó)<¸dÔCó
ó 
ð 	
r%   c                óâ   a a€ \         ;QJ d5    . VV 3R l\        \        S P                  4      S4       4       F  NK  	  5# ! VV 3R l\        \        S P                  4      S4       4       4      # )z^
Return a tuple of L{dns.RRHeader} instances for all of the IPv6
addresses in the hosts file.
c              3   ó  <"  € T Fw  p\        V4      '       g   K  \        P                  ! S\        P                  \        P                  SP
                  \        P                  ! VSP
                  4      4      x € Ky  	  R # 5ir)   )r   r   r1   ÚAAAAr3   r,   ÚRecord_AAAAr5   s   & €€r   r8   Ú(Resolver._aaaaRecords.<locals>.<genexpr>h   s\   øé € ð 
ñ D�Ü˜T×"ô	ŒC�LŠLØ”c—h‘h¤§¡¨¯©´#·/²/À$ÈÏÉÓ2Q÷ð ó Dùr:   r;   r=   s   ffr   Ú_aaaaRecordsÚResolver._aaaaRecordsc   s[   ù€ ÷
 Œuõ 
ô )¬°$·)±)Ó)<¸dÔCó	
�uð 	
ˆuõ 
ô )¬°$·)±)Ó)<¸dÔCó	
ó 
ð 	
r%   c                óÀ   € V'       d   \         P                  ! VRR34      # \         P                  ! \        P                  ! \
        P                  ! V4      4      4      # )aö  
Generate a response for the given name containing the given result
records, or a failure if there are no result records.

@param name: The DNS name the response is for.
@type name: C{str}

@param records: A tuple of L{dns.RRHeader} instances giving the results
    that will go into the response.

@return: A L{Deferred} which will fire with a three-tuple of result
    records, authority records, and additional records, or which will
    fail with L{dns.DomainError} if there are no result records.
© )r   ÚsucceedÚfailr   ÚFailurer   ÚDomainError)r-   r   Úrecordss   &&&r   Ú_respondÚResolver._respondp   s>   € ÷ Ü—=’= '¨2¨rÐ!2Ó3Ð3Ü�zŠzœ'Ÿ/š/¬#¯/ª/¸$Ó*?Ó@ÓAÐAr%   Nc                ón   € \         P                  ! V4      pV P                  WP                  V4      4      # )zU
Read any IPv4 addresses from C{self.file} and return them as
L{Record_A} instances.
)r   ÚdomainStringrN   r>   ©r-   r   Útimeouts   &&&r   ÚlookupAddressÚResolver.lookupAddressƒ   s,   € ô
 ×Ò Ó%ˆØ�}‰}˜T§>¡>°$Ó#7Ó8Ð8r%   c                ón   € \         P                  ! V4      pV P                  WP                  V4      4      # )zX
Read any IPv6 addresses from C{self.file} and return them as
L{Record_AAAA} instances.
)r   rQ   rN   rE   rR   s   &&&r   ÚlookupIPV6AddressÚResolver.lookupIPV6Address‹   s.   € ô
 ×Ò Ó%ˆØ�}‰}˜T×#4Ñ#4°TÓ#:Ó;Ð;r%   )r"   r,   )s
   /etc/hostsi  r)   )Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r+   r>   rE   rN   rT   rW   ÚlookupAllRecordsÚ__static_attributes__Ú__classdictcell__)Ú__classdict__s   @r   r'   r'   N   s1   ø‡ € ñôò
	
ò
òBô&9ô<ð %Ör%   r'   N)r]   Útwisted.internetr   Útwisted.internet.abstractr   r   Útwisted.namesr   r   Útwisted.pythonr   Útwisted.python.compatr   Útwisted.python.filepathr	   r    r$   r*   r'   rH   r%   r   Ú<module>rh      s=   ðñ
õ
 #ß @ß %Ý "Ý .Ý ,ò$òNô*I%ˆv×"Ñ"ö I%r%   