??????????????
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 173
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 174
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 175
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 176
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 177
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 178
ó
=OXc @ sì d Z d d l Z d d l m Z d d l Z d d l m Z d d l m Z d d l m
Z
d d l m Z m
Z
m Z d d l m Z d d l m Z d d
l m Z m Z m Z m Z d d l m Z m Z d e f d
„ ƒ YZ d S( s!
Common API for all public keys.
iÿÿÿÿN( t unhexlify( t md5( t default_backend( t
serialization( t
algorithmst modest Cipher( t util( t o600( t ut encodebytest decodebytest b( t SSHExceptiont PasswordRequiredExceptiont PKeyc B sD e Z d Z i i e j d 6d d 6d d 6e j d 6d 6i e j d 6d d 6d d 6e j d 6d 6Z d d d
„ Z
d „ Z d „ Z d
„ Z
d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z e d d „ ƒ Z e d d „ ƒ Z d d „ Z d d „ Z d d „ Z d d „ Z d d „ Z d d „ Z RS( s%
Base class for public keys.
t cipheri t keysizet blocksizet modes AES-128-CBCi i s DES-EDE3-CBCc C s d S( sI
Create a new instance of this public key type. If ``msg`` is given,
the key's public part(s) will be filled in from the message. If
``data`` is given, the key's public part(s) will be filled in from
the string.
:param .Message msg:
an optional SSH `.Message` containing a public key of this type.
:param str data: an optional string containing a public key of this type
:raises SSHException:
if a key cannot be created from the ``data`` or ``msg`` given, or
no key was passed in.
N( ( t selft msgt data( ( s1 /usr/lib/python2.7/site-packages/paramiko/pkey.pyt __init__; s c C s t ƒ S( sÇ
Return a string of an SSH `.Message` made up of the public part(s) of
this key. This string is suitable for passing to `__init__` to
re-create the key object later.
( t bytes( R ( ( s1 /usr/lib/python2.7/site-packages/paramiko/pkey.pyt asbytesL s c C s
| j ƒ S( N( R ( R ( ( s1 /usr/lib/python2.7/site-packages/paramiko/pkey.pyt __str__T s c C sJ t | ƒ } t | ƒ } | | k r1 t | | ƒ St | j ƒ | j ƒ ƒ S( sB
Compare this key to another. Returns 0 if this key is equivalent to
the given key, or non-0 if they are different. Only the public parts
of the key are compared, so a public key will compare equal to its
corresponding private key.
:param .Pkey other: key to compare to.
( t hasht cmpR ( R t othert hst ho( ( s1 /usr/lib/python2.7/site-packages/paramiko/pkey.pyt __cmp__X s
c C s t | ƒ t | ƒ k S( N( R ( R R ( ( s1 /usr/lib/python2.7/site-packages/paramiko/pkey.pyt __eq__g s c C s d S( sË
Return the name of this private key implementation.
:return:
name of this private key type, in SSH terminology, as a `str` (for
example, ``"ssh-rsa"``).
t ( ( R ( ( s1 /usr/lib/python2.7/site-packages/paramiko/pkey.pyt get_namej s c C s d S( s¸
Return the number of significant bits in this key. This is useful
for judging the relative security of a key.
:return: bits in the key (as an `int`)
i ( ( R ( ( s1 /usr/lib/python2.7/site-packages/paramiko/pkey.pyt get_bitst s c C s t S( sf
Return ``True`` if this key has the private part necessary for signing
data.
( t False( R ( ( s1 /usr/lib/python2.7/site-packages/paramiko/pkey.pyt can_sign} s c C s t | j ƒ ƒ j ƒ S( sã
Return an MD5 fingerprint of the public part of this key. Nothing
secret is revealed.
:return:
a 16-byte `string ` (binary) of the MD5 fingerprint, in SSH
format.
( R R t digest( R ( ( s1 /usr/lib/python2.7/site-packages/paramiko/pkey.pyt get_fingerprint„ s c C s" t t | j ƒ ƒ ƒ j d d ƒ S( s+
Return a base64 string containing the public part of this key. Nothing
secret is revealed. This format is compatible with that used to store
public key files or recognized host keys.
:return: a base64 `string ` containing the public part of the key.
s
R" ( R R
R t replace( R ( ( s1 /usr/lib/python2.7/site-packages/paramiko/pkey.pyt
get_base64 s c C s t ƒ S( sç
Sign a blob of data with this private key, and return a `.Message`
representing an SSH signature message.
:param str data: the data to sign.
:return: an SSH signature `message <.Message>`.
( R ( R R ( ( s1 /usr/lib/python2.7/site-packages/paramiko/pkey.pyt
sign_ssh_data™ s c C s t S( s\
Given a blob of data, and an SSH message representing a signature of
that data, verify that it was signed with this key.
:param str data: the data that was signed.
:param .Message msg: an SSH signature message
:return:
``True`` if the signature verifies correctly; ``False`` otherwise.
( R% ( R R R ( ( s1 /usr/lib/python2.7/site-packages/paramiko/pkey.pyt verify_ssh_sig£ s
c C s | d | d | ƒ } | S( sŸ
Create a key object by reading a private key file. If the private
key is encrypted and ``password`` is not ``None``, the given password
will be used to decrypt the key (otherwise `.PasswordRequiredException`
is thrown). Through the magic of Python, this factory method will
exist in all subclasses of PKey (such as `.RSAKey` or `.DSSKey`), but
is useless on the abstract PKey class.
:param str filename: name of the file to read
:param str password:
an optional password to use to decrypt the key file, if it's
encrypted
:return: a new `.PKey` based on the given private key
:raises IOError: if there was an error reading the file
:raises PasswordRequiredException: if the private key file is
encrypted, and ``password`` is ``None``
:raises SSHException: if the key file is invalid
t filenamet password( ( t clsR- R. t key( ( s1 /usr/lib/python2.7/site-packages/paramiko/pkey.pyt from_private_key_file¯ s c C s | d | d | ƒ } | S( sû
Create a key object by reading a private key from a file (or file-like)
object. If the private key is encrypted and ``password`` is not
``None``, the given password will be used to decrypt the key (otherwise
`.PasswordRequiredException` is thrown).
:param file_obj: the file-like object to read from
:param str password:
an optional password to use to decrypt the key, if it's encrypted
:return: a new `.PKey` based on the given private key
:raises IOError: if there was an error reading the key
:raises PasswordRequiredException:
if the private key file is encrypted, and ``password`` is ``None``
:raises SSHException: if the key file is invalid
t file_objR. ( ( R/ R2 R. R0 ( ( s1 /usr/lib/python2.7/site-packages/paramiko/pkey.pyt from_private_keyÇ s c C s t d ƒ ‚ d S( s’
Write private key contents into a file. If the password is not
``None``, the key is encrypted before writing.
:param str filename: name of the file to write
:param str password:
an optional password to use to encrypt the key file
:raises IOError: if there was an error writing the file
:raises SSHException: if the key is invalid
s Not implemented in PKeyN( t Exception( R R- R. ( ( s1 /usr/lib/python2.7/site-packages/paramiko/pkey.pyt write_private_key_fileÜ s c C s t d ƒ ‚ d S( sŸ
Write private key contents into a file (or file-like) object. If the
password is not ``None``, the key is encrypted before writing.
:param file_obj: the file-like object to write into
:param str password: an optional password to use to encrypt the key
:raises IOError: if there was an error writing to the file
:raises SSHException: if the key is invalid
s Not implemented in PKeyN( R4 ( R R2 R. ( ( s1 /usr/lib/python2.7/site-packages/paramiko/pkey.pyt write_private_keyê s c C s1 t | d ƒ } | j | | | ƒ } Wd QX| S( sÎ
Read an SSH2-format private key file, looking for a string of the type
``"BEGIN xxx PRIVATE KEY"`` for some ``xxx``, base64-decode the text we
find, and return it as a string. If the private key is encrypted and
``password`` is not ``None``, the given password will be used to decrypt
the key (otherwise `.PasswordRequiredException` is thrown).
:param str tag: ``"RSA"`` or ``"DSA"``, the tag used to mark the data block.
:param str filename: name of the file to read.
:param str password:
an optional password to use to decrypt the key file, if it's
encrypted.
:return: data blob (`str`) that makes up the private key.
:raises IOError: if there was an error reading the file.
:raises PasswordRequiredException: if the private key file is
encrypted, and ``password`` is ``None``.
:raises SSHException: if the key file is invalid.
t rN( t opent _read_private_key( R t tagR- R. t fR ( ( s1 /usr/lib/python2.7/site-packages/paramiko/pkey.pyt _read_private_key_file÷ s c C sÚ | j ƒ } d } x> | t | ƒ k rR | | j ƒ d | d k rR | d 7} q W| t | ƒ k r| t d | d ƒ ‚ n i } | d 7} xg | t | ƒ k rõ | | j d ƒ } t | ƒ d k rÊ Pn | d j ƒ | | d j ƒ <| d 7} q W| } x> | t | ƒ k r<| | j ƒ d | d k r<| d 7} qÿ Wy&