+
    DfjO                       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#W3# )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}%	..'QK	
..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     IIdoo&LLt~~**,-

 <<#MM$,,'yy  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,    
 GT* *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     99SD)D&#w'KK;;=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    , (6f'=$C		N,-33D9{q . (:h'H)=wW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+     ""$..(3T^^
 	
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     JJiiDNN3Z5OPQRLLt~~**,-	
 <<#MM$,,'yy  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 6t < * 5 5d ;   R  		 $\;? 0)$/E0 RRsu   )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NNG}}-%2C2CH2M2M##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 0T 0d 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"   promptResponseGKnownHostsFile.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   r3//9#((* F,,.IIK= 9$$ 
 GGJ--g67OOB,IIK0 0  #xxzd?%G %X.$R(/A/O/OP	  ))FMM#2H2H2J$KL**>::r$   )r   executer   r   )rB   r   ra   r   r7   hhkr   s   fffff  r"   verifyHostKeyKnownHostsFile.verifyHostKey  s7    , mmDOOXs;)	; )	;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     NN!!#wwyyJJL)-#C^^  &&,{{{""JJdkkJkU 0kJKe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ZZ\//1779F'# ('  </$ ('  >? (''s   AB4BBB*	)r   succeedr   )rB   r  dr  s   ff  r"   r   ConsoleUI.promptA  s*     MM$
	@ }}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 64 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KK45	6s+   !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$   