+
    üÐjôO  ã                  óð  € R t ^ RIHt ^ RIt^ RIt^ RIHtHtH	t	 ^ RI
Ht ^ RIHt ^ RIHtHtHtHt ^ RIHt ^ RIHtHtHt ^ R	IHt ^ R
IHtHtHt ^ RIH t  ^ RI!H"t" ^ RI#H$t$ ^ RI%H&t& ^ RI'H(t( ^ RI)H*t* ^ RI+H,t, ]$! 4       t-R R lt.R R lt/ ! R R4      t0]! ]4       ! R R]04      4       t1]! ]4       ! R R4      4       t2R R lt3]! ]4       ! R R]0],4      4       t4 ! R  R!4      t5 ! R" R#4      t6R# )$zE
An implementation of the OpenSSH known_hosts database.

@since: 8.2
)ÚannotationsN)ÚErrorÚ
a2b_base64Ú
b2a_base64)Úclosing)Úsha1)ÚIOÚCallableÚIterableÚLiteral)Úimplementer)ÚHostKeyChangedÚInvalidEntryÚUserRejectedKey)ÚIKnownHostEntry)ÚBadKeyErrorÚFingerprintFormatsÚKey)Údefer)ÚDeferred)ÚLogger)ÚnativeString)ÚFilePath)ÚsecureRandom)ÚFancyEqMixinc               ó    € V ^8„  d   QhRRRR/# )é   ÚsÚbytesÚreturn© )Úformats   "ÚA/usr/lib/python3/dist-packages/twisted/conch/client/knownhosts.pyÚ__annotate__r#   $   s   € ÷ !ñ !�%ð !˜Eñ !ó    c                ó4   € \        V 4      P                  4       # )z‚
Encode a binary string as base64 with no trailing newline.

@param s: The string to encode.

@return: The base64-encoded string.
)r   Ústrip)r   s   &r"   Ú
_b64encoder'   $   s   € ô �a‹=×ÑÓ Ð r$   c               ó    € V ^8„  d   QhRRRR/# )r   Ústringr   r   z&tuple[bytes, bytes, Key, bytes | None]r    )r!   s   "r"   r#   r#   /   s   € ÷ ,ñ ,˜5ð ,Ð%Kñ ,r$   c                ó0  € V P                  R^4      p\        V4      ^8w  d   \        4       hVw  r#pVP                  R^4      p\        V4      ^8X  d   Vw  rgVP                  R4      pMV^ ,          pRp\        P
                  ! \        V4      4      pW#W‡3# )ai  
Extract common elements of base64 keys from an entry in a hosts file.

@param string: A known hosts file entry (a single line).

@return: a 4-tuple of hostname data (L{bytes}), ssh key type (L{bytes}), key
    (L{Key}), and comment (L{bytes} or L{None}).  The hostname data is
    simply the beginning of the line up to the first occurrence of
    whitespace.
Nó   
)ÚsplitÚlenr   Úrstripr   Ú
fromStringr   )	r)   ÚelementsÚ	hostnamesÚkeyTypeÚkeyAndCommentÚsplitkeyÚ	keyStringÚcommentÚkeys	   &        r"   Ú_extractCommonr8   /   s’   € ð �|‰|˜D !Ó$€HÜ
ˆ8ƒ}˜ÔÜ‹nÐØ(0Ñ%€I˜Ø×"Ñ" 4¨Ó+€HÜ
ˆ8ƒ}˜ÔØ%Ñˆ	Ø—.‘. Ó'‰à˜Q•Kˆ	ØˆÜ
�.Š.œ IÓ.Ó
/€CØ˜sÐ+Ð+r$   c                  ó2   € ] tR t^ItRtR R ltR R ltRtR# )Ú
_BaseEntrya‘  
Abstract base of both hashed and non-hashed entry objects, since they
represent keys and key types the same way.

@ivar keyType: The type of the key; either ssh-dss or ssh-rsa.
@type keyType: L{bytes}

@ivar publicKey: The server public key indicated by this line.
@type publicKey: L{twisted.conch.ssh.keys.Key}

@ivar comment: Trailing garbage after the key line.
@type comment: L{bytes} or C{None}
c               ó(   € V ^8„  d   QhRRRRRRRR/# )	r   r2   r   Ú	publicKeyr   r6   úbytes | Noner   ÚNoner    )r!   s   "r"   r#   Ú_BaseEntry.__annotate__X   s)   € ÷ ñ  ð °#ð Àð ÐQUñ r$   c                	ó*   € Wn         W n        W0n        R # ©N)r2   r<   r6   )Úselfr2   r<   r6   s   &&&&r"   Ú__init__Ú_BaseEntry.__init__X   s   € ØŒØ"ŒØŽr$   c               ó    € V ^8„  d   QhRRRR/# )r   Ú	keyObjectr   r   Úboolr    )r!   s   "r"   r#   r?   ]   s   € ÷ 
ñ 
 Cð 
¨Dñ 
r$   c                ó$   € V P                   V8H  pV# )z½
Check to see if this entry matches a given key object.

@param keyObject: A public key object to check.

@return: C{True} if this entry's key matches C{keyObject}, C{False}
    otherwise.
)r<   )rB   rF   Úresults   && r"   Ú
matchesKeyÚ_BaseEntry.matchesKey]   s   € ð —‘ 9Ñ,ˆØˆr$   )r6   r2   r<   N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__rC   rJ   Ú__static_attributes__r    r$   r"   r:   r:   I   s   † ñõ÷

ñ 
r$   r:   c                  ó`   a € ] tR t^jtRtR V 3R llt]R R l4       tR R ltR R	 lt	R
t
V ;t# )Ú
PlainEntryzœ
A L{PlainEntry} is a representation of a plain-text entry in a known_hosts
file.

@ivar _hostnames: the list of all host-names associated with this entry.
c               ó(   € V ^8„  d   QhRRRRRRRR/# )	r   r1   zlist[bytes]r2   r   r<   r   r6   r=   r    )r!   s   "r"   r#   ÚPlainEntry.__annotate__s   s2   € ÷ 6ñ 6àð6ð ð6ð ð	6ð
 ñ6r$   c                	ó4   <€ Wn         \        SV `	  W#V4       R # rA   )Ú
_hostnamesÚsuperrC   )rB   r1   r2   r<   r6   Ú	__class__s   &&&&&€r"   rC   ÚPlainEntry.__init__s   s   ø€ ð (1ŒÜ‰Ñ˜¨WÖ5r$   c               ó    € V ^8„  d   QhRRRR/# )r   r)   r   r   rS   r    )r!   s   "r"   r#   rU   ~   s   € ÷ ñ  ð ¨*ñ r$   c                óT   € \        V4      w  r#rEV ! VP                  R4      W4V4      pV# )a>  
Parse a plain-text entry in a known_hosts file, and return a
corresponding L{PlainEntry}.

@param string: a space-separated string formatted like "hostname
    key-type base64-key-data comment".

@raise DecodeError: if the key is not valid encoded as valid base64.

@raise InvalidEntry: if the entry does not have the right number of
    elements and is therefore invalid.

@raise BadKeyError: if the key, once decoded from base64, is not
    actually an SSH key.

@return: an IKnownHostEntry representing the hostname and key in the
    input line.

@rtype: L{PlainEntry}
ó   ,)r8   r,   )Úclsr)   r1   r2   r7   r6   rB   s   &&     r"   r/   ÚPlainEntry.fromString}   s/   € ô, ,:¸&Ó+AÑ(ˆ	˜CÙ�9—?‘? 4Ó(¨'¸Ó@ˆØˆr$   c               ó    € V ^8„  d   QhRRRR/# )r   Úhostnameúbytes | strr   rG   r    )r!   s   "r"   r#   rU   —   s   € ÷ +ñ + Kð +°Dñ +r$   c                ól   € \        V\        4      '       d   VP                  R4      pWP                  9   # )zë
Check to see if this entry matches a given hostname.

@param hostname: A hostname or IP address literal to check against this
    entry.

@return: C{True} if this entry is for the given hostname or IP address,
    C{False} otherwise.
úutf-8)Ú
isinstanceÚstrÚencoderW   ©rB   ra   s   &&r"   ÚmatchesHostÚPlainEntry.matchesHost—   s,   € ô �h¤×$Ò$Ø—‘ wÓ/ˆHØŸ?™?Ñ*Ð*r$   c               ó   € V ^8„  d   QhRR/# ©r   r   r   r    )r!   s   "r"   r#   rU   ¥   s   € ÷ !ñ !˜%ñ !r$   c                ó  € RP                  V P                  4      V P                  \        V P                  P                  4       4      .pV P                  e   VP                  V P                  4       RP                  V4      # )zÑ
Implement L{IKnownHostEntry.toString} by recording the comma-separated
hostnames, key type, and base-64 encoded key.

@return: The string representation of this entry, with unhashed hostname
    information.
r]   ó    )ÚjoinrW   r2   r'   r<   Úblobr6   Úappend©rB   Úfieldss   & r"   ÚtoStringÚPlainEntry.toString¥   sb   € ð �I‰I�d—o‘oÓ&Ø�L‰LÜ�t—~‘~×*Ñ*Ó,Ó-ð
ˆð
 �<‰<Ò#Ø�M‰M˜$Ÿ,™,Ô'Ø�y‰y˜Ó Ð r$   )rW   )rL   rM   rN   rO   rP   rC   Úclassmethodr/   ri   rt   rQ   Ú__classcell__©rY   s   @r"   rS   rS   j   s5   ø† ñ÷6ð 6ð ôó ðõ2+÷!ó !r$   rS   c                  óZ   € ] tR t^·t$ RtRtR]R&   R R ltR R ltR	 R
 lt	R R lt
RtR# )ÚUnparsedEntryz€
L{UnparsedEntry} is an entry in a L{KnownHostsFile} which can't actually be
parsed; therefore it matches no keys and no hosts.
Nr>   r2   c               ó    € V ^8„  d   QhRRRR/# )r   r)   r   r   r>   r    )r!   s   "r"   r#   ÚUnparsedEntry.__annotate__À   s   € ÷ ñ ˜uð ¨ñ r$   c                ó   € Wn         R# )z^
Create an unparsed entry from a line in a known_hosts file which cannot
otherwise be parsed.
N©Ú_string)rB   r)   s   &&r"   rC   ÚUnparsedEntry.__init__À   s	   € ð
 Žr$   c               ó    € V ^8„  d   QhRRRR/# ©r   ra   r   r   rG   r    )r!   s   "r"   r#   r|   Ç   s   € ÷ ñ  Eð ¨dñ r$   c                ó   € R# ©z
Always returns False.
Fr    rh   s   &&r"   ri   ÚUnparsedEntry.matchesHostÇ   ó   € ñ r$   c               ó    € V ^8„  d   QhRRRR/# )r   r7   r   r   rG   r    )r!   s   "r"   r#   r|   Í   s   € ÷ ñ ˜cð  dñ r$   c                ó   € R# r„   r    )rB   r7   s   &&r"   rJ   ÚUnparsedEntry.matchesKeyÍ   r†   r$   c               ó   € V ^8„  d   QhRR/# rl   r    )r!   s   "r"   r#   r|   Ó   s   € ÷ *ñ *˜%ñ *r$   c                ó8   € V P                   P                  R4      # )zÛ
Returns the input line, without its newline if one was given.

@return: The string representation of this entry, almost exactly as was
    used to initialize this entry but without a trailing newline.
@rtype: L{bytes}
r+   )r   r.   ©rB   s   &r"   rt   ÚUnparsedEntry.toStringÓ   s   € ð �|‰|×"Ñ" 5Ó)Ð)r$   r~   )rL   rM   rN   rO   rP   r2   Ú__annotations__rC   ri   rJ   rt   rQ   r    r$   r"   rz   rz   ·   s,   ‡ ñð
 €GˆTÓõõõ÷*ñ *r$   rz   c               ó$   € V ^8„  d   QhRRRRRR/# )r   r7   r   r)   rb   r   r    )r!   s   "r"   r#   r#   Þ   s!   € ÷ ñ �uð  kð °eñ r$   c                óÊ   € \         P                  ! V \        R7      p\        V\        4      '       d   VP                  R4      pVP                  V4       VP                  4       # )z�
Return the SHA-1 HMAC hash of the given key and string.

@param key: The HMAC key.

@param string: The string to be hashed.

@return: The keyed hash value.
)Ú	digestmodrd   )ÚhmacÚHMACr   re   rf   rg   ÚupdateÚdigest)r7   r)   Úhashs   && r"   Ú_hmacedStringr—   Þ   sG   € ô �9Š9�S¤DÔ)€DÜ�&œ#×ÒØ—‘˜wÓ'ˆØ‡K�K�ÔØ�;‰;‹=Ðr$   c                  óh   a € ] tR t^ïtRtRtRtR V 3R llt]R R l4       t	R R lt
R	 R
 ltRtV ;t# )ÚHashedEntryaq  
A L{HashedEntry} is a representation of an entry in a known_hosts file
where the hostname has been hashed and salted.

@ivar _hostSalt: the salt to combine with a hostname for hashing.

@ivar _hostHash: the hashed representation of the hostname.

@cvar MAGIC: the 'hash magic' string used to identify a hashed line in a
known_hosts file as opposed to a plaintext one.
s   |1|c               ó0   € V ^8„  d   QhRRRRRRRRRRR	R
/# )r   ÚhostSaltr   ÚhostHashr2   r<   r   r6   r=   r   r>   r    )r!   s   "r"   r#   ÚHashedEntry.__annotate__  sF   € ÷ 
6ñ 
6àð
6ð ð
6ð ð	
6ð
 ð
6ð ð
6ð 
ñ
6r$   c                	ó@   <€ Wn         W n        \        SV `  W4V4       R # rA   )Ú	_hostSaltÚ	_hostHashrX   rC   )rB   r›   rœ   r2   r<   r6   rY   s   &&&&&&€r"   rC   ÚHashedEntry.__init__  s   ø€ ð "ŒØ!ŒÜ‰Ñ˜¨WÖ5r$   c               ó    € V ^8„  d   QhRRRR/# )r   r)   r   r   r™   r    )r!   s   "r"   r#   r�     s   € ÷ ñ  ð ¨+ñ r$   c                óæ   € \        V4      w  r#rEV\        V P                  4      R P                  R4      p\        V4      ^8w  d   \	        4       hVw  rxV ! \        V4      \        V4      W4V4      p	V	# )a”  
Load a hashed entry from a string representing a line in a known_hosts
file.

@param string: A complete single line from a I{known_hosts} file,
    formatted as defined by OpenSSH.

@raise DecodeError: if the key, the hostname, or the is not valid
    encoded as valid base64

@raise InvalidEntry: if the entry does not have the right number of
    elements and is therefore invalid, or the host/hash portion
    contains more items than just the host and hash.

@raise BadKeyError: if the key, once decoded from base64, is not
    actually an SSH key.

@return: The newly created L{HashedEntry} instance, initialized with
    the information from C{string}.
Nó   |)r8   r-   ÚMAGICr,   r   r   )
r^   r)   Ústuffr2   r7   r6   ÚsaltAndHashr›   rœ   rB   s
   &&        r"   r/   ÚHashedEntry.fromString  so   € ô, (6°fÓ'=Ñ$ˆ˜ØœC §	¡	›NÐ,Ð-×3Ñ3°DÓ9ˆÜˆ{Ó˜qÔ Ü“.Ð Ø(ÑˆÙ”:˜hÓ'¬°HÓ)=¸wÈWÓUˆØˆr$   c               ó    € V ^8„  d   QhRRRR/# r‚   r    )r!   s   "r"   r#   r�   +  s   € ÷ 
ñ 
 Eð 
¨dñ 
r$   c                ól   € \         P                  ! \        V P                  V4      V P                  4      # )a=  
Implement L{IKnownHostEntry.matchesHost} to compare the hash of the
input to the stored hash.

@param hostname: A hostname or IP address literal to check against this
    entry.
@type hostname: L{bytes}

@return: C{True} if this entry is for the given hostname or IP address,
    C{False} otherwise.
@rtype: L{bool}
)r’   Úcompare_digestr—   rŸ   r    rh   s   &&r"   ri   ÚHashedEntry.matchesHost+  s+   € ô ×"Ò"Ü˜$Ÿ.™.¨(Ó3°T·^±^ó
ð 	
r$   c               ó   € V ^8„  d   QhRR/# rl   r    )r!   s   "r"   r#   r�   <  s   € ÷ !ñ !˜%ñ !r$   c                óf  € V P                   RP                  \        V P                  4      \        V P                  4      .4      ,           V P
                  \        V P                  P                  4       4      .pV P                  e   VP                  V P                  4       RP                  V4      # )z¿
Implement L{IKnownHostEntry.toString} by base64-encoding the salt, host
hash, and key.

@return: The string representation of this entry, with the hostname part
    hashed.
@rtype: L{bytes}
r¤   rn   )
r¥   ro   r'   rŸ   r    r2   r<   rp   r6   rq   rr   s   & r"   rt   ÚHashedEntry.toString<  s‚   € ð �J‰JØ�i‰iœ D§N¡NÓ3´ZÀÇÁÓ5OÐPÓQõRà�L‰LÜ�t—~‘~×*Ñ*Ó,Ó-ð	
ˆð �<‰<Ò#Ø�M‰M˜$Ÿ,™,Ô'Ø�y‰y˜Ó Ð r$   )r    rŸ   )rŸ   r    r2   r<   r6   )rL   rM   rN   rO   rP   r¥   ÚcompareAttributesrC   rv   r/   ri   rt   rQ   rw   rx   s   @r"   r™   r™   ï   sB   ø† ñ
ð €EàUÐ÷
6ð 
6ð ôó ðõ:
÷"!ó !r$   r™   c                  óŽ   € ] tR tRtRtR R lt]R R l4       tR R ltR	 R
 lt	R R lt
R R ltR R lt]R R l4       tRtR# )ÚKnownHostsFileiP  aN  
A structured representation of an OpenSSH-format ~/.ssh/known_hosts file.

@ivar _added: A list of L{IKnownHostEntry} providers which have been added
    to this instance in memory but not yet saved.

@ivar _clobber: A flag indicating whether the current contents of the save
    path will be disregarded and potentially overwritten or not.  If
    C{True}, this will be done.  If C{False}, entries in the save path will
    be read and new entries will be saved by appending rather than
    overwriting.
@type _clobber: L{bool}

@ivar _savePath: See C{savePath} parameter of L{__init__}.
c               ó    € V ^8„  d   QhRRRR/# )r   ÚsavePathúFilePath[str]r   r>   r    )r!   s   "r"   r#   ÚKnownHostsFile.__annotate__a  s   € ÷ ñ  ð °4ñ r$   c                ó.   € . V n         Wn        RV n        R# )zô
Create a new, empty KnownHostsFile.

Unless you want to erase the current contents of C{savePath}, you want
to use L{KnownHostsFile.fromPath} instead.

@param savePath: The L{FilePath} to which to save new entries.
@type savePath: L{FilePath}
TN)Ú_addedÚ	_savePathÚ_clobber)rB   r´   s   &&r"   rC   ÚKnownHostsFile.__init__a  s   € ð .0ˆŒØ!ŒØˆŽr$   c               ó   € V ^8„  d   QhRR/# )r   r   rµ   r    )r!   s   "r"   r#   r¶   p  s   € ÷ ñ ˜-ñ r$   c                ó   € V P                   # )z,
@see: C{savePath} parameter of L{__init__}
)r¹   rŒ   s   &r"   r´   ÚKnownHostsFile.savePatho  s   € ð
 �~‰~Ðr$   c               ó   € V ^8„  d   QhRR/# )r   r   zIterable[IKnownHostEntry]r    )r!   s   "r"   r#   r¶   v  s   € ÷ ñ Ð6ñ r$   c              #  ó  "  € V P                    F  pVx € K	  	  V P                  '       d   R#  V P                  P                  4       pT;_uu_ 4        T FY  p TP                  \        P                  4      '       d   \        P                  T4      pM\        P                  T4      p Tx € K[  	  RRR4       R#   \         d     R# i ; i  \        \        \        3 d    \        T4      p LGi ; i  + '       g   i     R# ; i5i)a  
Iterate over the host entries in this file.

@return: An iterable the elements of which provide L{IKnownHostEntry}.
    There is an element for each entry in the file as well as an element
    for each added but not yet saved entry.
@rtype: iterable of L{IKnownHostEntry} providers
N)r¸   rº   r¹   ÚopenÚOSErrorÚ
startswithr™   r¥   r/   rS   ÚDecodeErrorr   r   rz   )rB   ÚentryÚfpÚlines   &   r"   ÚiterentriesÚKnownHostsFile.iterentriesv  sÖ   é € ð —[”[ˆEØŒKñ !ð �=�=ˆ=Ùð	Ø—‘×$Ñ$Ó&ˆB÷ ŠRÛ�ð0Ø—‘¤{×'8Ñ'8×9Ò9Ü +× 6Ñ 6°tÓ <™ä *× 5Ñ 5°dÓ ;™ð ”ñ ÷ ‰Røô ô 	Úð	ûô $¤\´;Ð?ô 0Ü)¨$Ó/’Eð0ú÷ �RˆRüsu   ‚)D
¬D
¯B= Á	
D
ÁC6Á:CÂC6ÂCÂ*	C6Â3
D
Â=CÃD
ÃCÃD
Ã!C3	Ã0C6Ã2C3	Ã3C6Ã6D	Ä	D
c               ó$   € V ^8„  d   QhRRRRRR/# )r   ra   r   r7   r   r   rG   r    )r!   s   "r"   r#   r¶   •  s!   € ÷ ñ  5ð ¨sð °tñ r$   c                ór  € \        V P                  4       \        V P                  4      ) 4       F„  w  r4VP                  VP                  4       8X  g   K&  VP                  V4      '       g   K?  VP                  V4      '       d    R# V^ 8  d   RpRpMV^,           pV P                  p\        WFV4      h	  R# )an  
Check for an entry with matching hostname and key.

@param hostname: A hostname or IP address literal to check for.

@param key: The public key to check for.

@return: C{True} if the given hostname and key are present in this
    file, C{False} if they are not.

@raise HostKeyChanged: if the host key found for the given hostname
    does not match the given key.
TNF)
Ú	enumeraterÈ   r-   r¸   r2   ÚsshTyperi   rJ   r¹   r   )rB   ra   r7   ÚlineidxrÅ   rÇ   Úpaths   &&&    r"   Ú
hasHostKeyÚKnownHostsFile.hasHostKey•  sš   € ô (¨×(8Ñ(8Ó(:¼SÀÇÁÓ=MÐ<MÖN‰NˆGØ�}‰} §¡£Ö-°%×2CÑ2CÀH×2MÔ2MØ×#Ñ# C×(Ò(Úð  ”{Ø#˜Ø#™à&¨�{˜Ø#Ÿ~™~˜Ü(¨°dÓ;Ð;ñ Oñ r$   c          
     ó,   € V ^8„  d   QhRRRRRRRRRR	/# )
r   ÚuiÚ	ConsoleUIra   r   Úipr7   r   r   úDeferred[bool]r    )r!   s   "r"   r#   r¶   ³  s;   € ÷ C*ñ C*ØðC*Ø',ðC*Ø27ðC*Ø>AðC*à	ñC*r$   c                óŒ   a aaaa€ \         P                  ! S P                  SS4      pR VVVV V3R llpVP                  V4      # )aQ  
Verify the given host key for the given IP and host, asking for
confirmation from, and notifying, the given UI about changes to this
file.

@param ui: The user interface to request an IP address from.

@param hostname: The hostname that the user requested to connect to.

@param ip: The string representation of the IP address that is actually
being connected to.

@param key: The public key of the server.

@return: a L{Deferred} that fires with True when the key has been
    verified, or fires with an errback when the key either cannot be
    verified or has changed.
@rtype: L{Deferred}
c               ó    € V ^8„  d   QhRRRR/# )r   rI   rG   r   zbool | Deferred[bool]r    )r!   s   "r"   r#   Ú2KnownHostsFile.verifyHostKey.<locals>.__annotate__Ë  s   € ÷ )	;ñ )	;˜dð )	;Ð'<ñ )	;r$   c                ón  <€ V '       d‚   S	P                  SS4      '       gh   R SP                  4        RSP                  4        R2pS
P                  VP	                  R4      4       S	P                  SS4       S	P                  4        V # R VVVV	3R llpSP                  4       pVR8X  d   RpR\        S4      : R	\        S4      : R
V: RSP                  \        P                  R7      : R2	pS
P                  VP	                  \        P                  ! 4       4      4      pVP                  V4      # )zWarning: Permanently added the z host key for IP address 'z' to the list of known hosts.
rd   c               ó    € V ^8„  d   QhRRRR/# )r   ÚresponserG   r   r    )r!   s   "r"   r#   ÚEKnownHostsFile.verifyHostKey.<locals>.gotHasKey.<locals>.__annotate__Ù  s   € ÷ 0ñ 0¨Tð 0°dñ 0r$   c                ó”   <€ V '       d7   SP                  SS4       SP                  SS4       SP                  4        V # \        4       hrA   )Ú
addHostKeyÚsaver   )rÜ   ra   rÕ   r7   rB   s   &€€€€r"   ÚpromptResponseÚGKnownHostsFile.verifyHostKey.<locals>.gotHasKey.<locals>.promptResponseÙ  s9   ø€ ßØŸ™¨°#Ô6ØŸ™¨¨CÔ0ØŸ	™	œØ'˜ä-Ó/Ð/r$   ÚECÚECDSAzThe authenticity of host 'z (z)' can't be established.
z key fingerprint is SHA256:)r!   z9.
Are you sure you want to continue connecting (yes/no)? )rÐ   ÚtypeÚdecodeÚwarnrg   rß   rà   r   Úfingerprintr   ÚSHA256_BASE64ÚpromptÚsysÚgetdefaultencodingÚaddCallback)rI   Ú
addMessagerá   Úkeytyperê   Úproceedra   rÕ   r7   rB   rÓ   s   &     €€€€€r"   Ú	gotHasKeyÚ/KnownHostsFile.verifyHostKey.<locals>.gotHasKeyË  s  ø€ ßØ—‘ r¨3×/Ò/à9¸#¿(¹(»*¸ð F,Ø,.¯I©I«K¨=ð 9$ð$ð ð
 —G‘G˜J×-Ñ-¨gÓ6Ô7Ø—O‘O B¨Ô,Ø—I‘I”KØ�÷0ó 0ð  #Ÿx™x›z�à˜d”?Ø%�Gøô % XÖ.Ü$ RÖ(ÛØŸ™Ô/A×/OÑ/O˜ÖPð	ð ð Ÿ)™) F§M¡M´#×2HÒ2HÓ2JÓ$KÓL�Ø×*Ñ*¨>Ó:Ð:r$   )r   ÚexecuterÐ   rí   )rB   rÓ   ra   rÕ   r7   Úhhkrñ   s   fffff  r"   ÚverifyHostKeyÚKnownHostsFile.verifyHostKey³  s7   ü€ ô, �mŠm˜DŸO™O¨X°sÓ;ˆ÷)	;ô )	;ðV �‰˜yÓ)Ð)r$   c               ó$   € V ^8„  d   QhRRRRRR/# )r   ra   r   r7   r   r   r™   r    )r!   s   "r"   r#   r¶   ø  s!   € ÷ ñ  5ð ¨sð °{ñ r$   c                ó    € \        ^4      pVP                  4       p\        V\        W14      WBR4      pV P                  P                  V4       V# )a—  
Add a new L{HashedEntry} to the key database.

Note that you still need to call L{KnownHostsFile.save} if you wish
these changes to be persisted.

@param hostname: A hostname or IP address literal to associate with the
    new entry.
@type hostname: L{bytes}

@param key: The public key to associate with the new entry.
@type key: L{Key}

@return: The L{HashedEntry} that was added.
@rtype: L{HashedEntry}
N)r   rÍ   r™   r—   r¸   rq   )rB   ra   r7   Úsaltr2   rÅ   s   &&&   r"   rß   ÚKnownHostsFile.addHostKeyø  sE   € ô" ˜BÓˆØ—+‘+“-ˆÜ˜D¤-°Ó"?ÀÈtÓTˆØ�‰×Ñ˜5Ô!Øˆr$   c               ó   € V ^8„  d   QhRR/# )r   r   r>   r    )r!   s   "r"   r#   r¶     s   € ÷ ñ �dñ r$   c                ó  € V P                   P                  4       pVP                  4       '       g   VP                  4        V P                  '       d   RMRpV P                   P                  V4      ;_uu_ 4       pV P                  '       dV   TP                  RP                  V P                   Uu. uF  qDP                  4       NK  	  up4      R,           4       . V n        RRR4       RV n        R# u upi   + '       g   i     L; i)z=
Save this L{KnownHostsFile} to the path it was loaded from.
ÚwÚar+   NF)
r¹   ÚparentÚisdirÚmakedirsrº   rÁ   r¸   Úwritero   rt   )rB   ÚpÚmodeÚhostsFileObjrÅ   s   &    r"   rà   ÚKnownHostsFile.save  s¶   € ð �N‰N×!Ñ!Ó#ˆØ�w‰w�yŠyØ�J‰JŒLà)-¯¯¨¡#¸CˆØ�^‰^× Ñ  ×&Ô&¨,Ø�{�{ˆ{Ø×"Ñ"Ø—J‘J¸d¿kºkÓJ¹k°U§¡Ö 0¹kÑJÓKÈeÕSôð !�”÷ 'ð ˆŽùò  K÷ '×&ús   Á:7C8Â1C3Ã	C8Ã3C8Ã8D	c               ó    € V ^8„  d   QhRRRR/# )r   rÏ   rµ   r   r²   r    )r!   s   "r"   r#   r¶   !  s   € ÷ ñ ˜Mð ¨nñ r$   c                ó$   € V ! V4      pRVn         V# )au  
Create a new L{KnownHostsFile}, potentially reading existing known
hosts information from the given file.

@param path: A path object to use for both reading contents from and
    later saving to.  If no file exists at this path, it is not an
    error; a L{KnownHostsFile} with no entries is returned.

@return: A L{KnownHostsFile} initialized with entries from C{path}.
F)rº   )r^   rÏ   Ú
knownHostss   && r"   ÚfromPathÚKnownHostsFile.fromPath   s   € ñ ˜“Yˆ
Ø#ˆ
ÔØÐr$   )r¸   rº   r¹   N)rL   rM   rN   rO   rP   rC   Úpropertyr´   rÈ   rÐ   rõ   rß   rà   rv   r
  rQ   r    r$   r"   r²   r²   P  sO   † ñõ ð ôó ðõõ>õ<C*õJõ.ð" ôó ôr$   r²   c                  ó>   € ] tR tRtRtR R ltR R ltR R ltR	tR
# )rÔ   i1  zz
A UI object that can ask true/false questions and post notifications on the
console, to be used during key verification.
c               ó    € V ^8„  d   QhRRRR/# )r   ÚopenerzCallable[[], IO[bytes]]r   r>   r    )r!   s   "r"   r#   ÚConsoleUI.__annotate__7  s   € ÷ ñ Ð6ð ¸4ñ r$   c                ó   € Wn         R# )a  
@param opener: A no-argument callable which should open a console
    binary-mode file-like object to be used for reading and writing.
    This initializes the C{opener} attribute.
@type opener: callable taking no arguments and returning a read/write
    file-like object
N©r  )rB   r  s   &&r"   rC   ÚConsoleUI.__init__7  s	   € ð Žr$   c               ó    € V ^8„  d   QhRRRR/# )r   Útextr   r   rÖ   r    )r!   s   "r"   r#   r  A  s   € ÷ #ñ #˜5ð # ^ñ #r$   c                ób   a a€ \         P                  ! R4      pV V3R lpVP                  V4      # )aw  
Write the given text as a prompt to the console output, then read a
result from the console input.

@param text: Something to present to a user to solicit a yes or no
    response.
@type text: L{bytes}

@return: a L{Deferred} which fires with L{True} when the user answers
    'yes' and L{False} when the user answers 'no'.  It may errback if
    there were any I/O errors.
Nc                óZ  <€ \        SP                  4       4      ;_uu_ 4       pVP                  S4        VP                  4       P	                  4       P                  4       pVR8X  d    RRR4       R # VR9   d    RRR4       R# VP                  R4       Kd    + '       g   i     R# ; i)Ts   yesNFs   Please type 'yes' or 'no': >   r$   ó   no)r   r  r  Úreadliner&   Úlower)ÚignoredÚfÚanswerrB   r  s   &  €€r"   ÚbodyÚConsoleUI.prompt.<locals>.bodyP  s„   ø€ Ü˜Ÿ™›×'Ô'¨1Ø—‘˜”ØØŸZ™Z›\×/Ñ/Ó1×7Ñ7Ó9�FØ Ô'Ø#÷ (Ñ'ð   <Ô/Ø$÷ (Ñ'ð Ÿ™Ð >Ö?÷ (×'Ð'ús   £ABÁ4BÂBÂB*	)r   Úsucceedrí   )rB   r  Údr  s   ff  r"   rê   ÚConsoleUI.promptA  s*   ù€ ô �MŠM˜$Óˆö
	@ð �}‰}˜TÓ"Ð"r$   c               ó    € V ^8„  d   QhRRRR/# )r   r  r   r   r>   r    )r!   s   "r"   r#   r  ^  s   € ÷ 6ñ 6˜ð 6 4ñ 6r$   c                óô   €  \        V P                  4       4      ;_uu_ 4       pVP                  V4       RRR4       R#   + '       g   i     R# ; i  \         d    \        P                  R4        R# i ; i)z™
Notify the user (non-interactively) of the provided text, by writing it
to the console.

@param text: Some information the user is to be made aware of.
NzFailed to write to console)r   r  r  Ú	ExceptionÚlogÚfailure)rB   r  r  s   && r"   rç   ÚConsoleUI.warn^  sO   € ð	6Ü˜Ÿ™›×'Ô'¨1Ø—‘˜”÷ (×'×'Ò'ûäô 	6Ü�K‰KÐ4×5ð	6ús+   ‚!A £?µA ¿A	Á
A ÁA Á A7Á6A7r  N)	rL   rM   rN   rO   rP   rC   rê   rç   rQ   r    r$   r"   rÔ   rÔ   1  s   † ñõ
õ#÷:6ñ 6r$   rÔ   )7rP   Ú
__future__r   r’   rë   Úbinasciir   rÄ   r   r   Ú
contextlibr   Úhashlibr   Útypingr   r	   r
   r   Úzope.interfacer   Útwisted.conch.errorr   r   r   Útwisted.conch.interfacesr   Útwisted.conch.ssh.keysr   r   r   Útwisted.internetr   Útwisted.internet.deferr   Útwisted.loggerr   Útwisted.python.compatr   Útwisted.python.filepathr   Útwisted.python.randbytesr   Útwisted.python.utilr   r&  r'   r8   r:   rS   rz   r—   r™   r²   rÔ   r    r$   r"   Ú<module>r9     sï   ðñ
õ #ã Û 
ß AÑ AÝ Ý ß 2Ó 2å &ç MÑ MÝ 4ß GÑ GÝ "Ý +Ý !Ý .Ý ,Ý 1Ý ,áƒh€õ!õ,÷4ñ ñB ˆ_ÓôI!�ó I!ó ðI!ñX ˆ_Ó÷#*ð #*ó ð#*õLñ" ˆ_Óô]!�*˜ló ]!ó ð]!÷@^ñ ^÷B86ó 86r$   