[project @ Arch-1:robey@lag.net--2003-public%secsh--dev--1.0--patch-15]

fix up new paramiko/ folder.
moved SSHException to a new file (ssh_exception.py) and turned paramiko.py
into an __init__.py file.  i'm still not entirely sure how this normally
works, so i may have done something wrong, but it's supposed to work the
same as before.
This commit is contained in:
Robey Pointer 2003-12-27 02:03:44 +00:00
parent 877cd974b8
commit eb4c279ec4
8 changed files with 30 additions and 6 deletions

20
paramiko/__init__.py Normal file
View File

@ -0,0 +1,20 @@
import sys
if (sys.version_info[0] < 2) or ((sys.version_info[0] == 2) and (sys.version_info[1] < 3)):
raise RuntimeError('You need python 2.3 for this module.')
__author__ = "Robey Pointer <robey@lag.net>"
__date__ = "10 Nov 2003"
__version__ = "0.1-charmander"
__credits__ = "Huzzah!"
from auth_transport import Transport
from channel import Channel
from rsakey import RSAKey
from dsskey import DSSKey
from util import hexify
__all__ = [ 'Transport', 'Channel', 'RSAKey', 'DSSKey', 'hexify' ]

View File

@ -4,7 +4,7 @@ from transport import BaseTransport
from transport import MSG_SERVICE_REQUEST, MSG_SERVICE_ACCEPT, MSG_USERAUTH_REQUEST, MSG_USERAUTH_FAILURE, \
MSG_USERAUTH_SUCCESS, MSG_USERAUTH_BANNER
from message import Message
from paramiko import SSHException
from ssh_exception import SSHException
from logging import DEBUG, INFO, WARNING, ERROR, CRITICAL
DISCONNECT_SERVICE_NOT_AVAILABLE, DISCONNECT_AUTH_CANCELLED_BY_USER, \

View File

@ -1,5 +1,5 @@
from message import Message
from paramiko import SSHException
from ssh_exception import SSHException
from transport import MSG_CHANNEL_REQUEST, MSG_CHANNEL_CLOSE, MSG_CHANNEL_WINDOW_ADJUST, MSG_CHANNEL_DATA, \
MSG_CHANNEL_EOF, MSG_CHANNEL_SUCCESS, MSG_CHANNEL_FAILURE

View File

@ -1,7 +1,7 @@
#!/usr/bin/python
import base64
from paramiko import SSHException
from ssh_exception import SSHException
from message import Message
from transport import MSG_USERAUTH_REQUEST
from util import inflate_long, deflate_long

View File

@ -6,7 +6,7 @@
from message import Message
from util import inflate_long, deflate_long, generate_prime, bit_length
from paramiko import SSHException
from ssh_exception import SSHException
from transport import MSG_NEWKEYS
from Crypto.Hash import SHA
from Crypto.Util import number

View File

@ -5,7 +5,7 @@
# "g" generator.
from message import Message, inflate_long
from paramiko import SSHException
from ssh_exception import SSHException
from transport import MSG_NEWKEYS
from Crypto.Hash import SHA
from logging import DEBUG, INFO, WARNING, ERROR, CRITICAL

View File

@ -0,0 +1,4 @@
class SSHException(Exception):
pass

View File

@ -14,7 +14,6 @@ MSG_CHANNEL_OPEN, MSG_CHANNEL_OPEN_SUCCESS, MSG_CHANNEL_OPEN_FAILURE, \
import sys, os, string, threading, socket, logging, struct
from message import Message
from channel import Channel
from paramiko import SSHException
from util import format_binary, safe_string, inflate_long, deflate_long, tb_strings
from rsakey import RSAKey
from dsskey import DSSKey
@ -53,6 +52,7 @@ except:
randpool.randomize()
class BaseTransport(threading.Thread):
'''
An SSH Transport attaches to a stream (usually a socket), negotiates an