[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:
parent
877cd974b8
commit
eb4c279ec4
|
@ -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' ]
|
|
@ -4,7 +4,7 @@ from transport import BaseTransport
|
||||||
from transport import MSG_SERVICE_REQUEST, MSG_SERVICE_ACCEPT, MSG_USERAUTH_REQUEST, MSG_USERAUTH_FAILURE, \
|
from transport import MSG_SERVICE_REQUEST, MSG_SERVICE_ACCEPT, MSG_USERAUTH_REQUEST, MSG_USERAUTH_FAILURE, \
|
||||||
MSG_USERAUTH_SUCCESS, MSG_USERAUTH_BANNER
|
MSG_USERAUTH_SUCCESS, MSG_USERAUTH_BANNER
|
||||||
from message import Message
|
from message import Message
|
||||||
from paramiko import SSHException
|
from ssh_exception import SSHException
|
||||||
from logging import DEBUG, INFO, WARNING, ERROR, CRITICAL
|
from logging import DEBUG, INFO, WARNING, ERROR, CRITICAL
|
||||||
|
|
||||||
DISCONNECT_SERVICE_NOT_AVAILABLE, DISCONNECT_AUTH_CANCELLED_BY_USER, \
|
DISCONNECT_SERVICE_NOT_AVAILABLE, DISCONNECT_AUTH_CANCELLED_BY_USER, \
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
from message import Message
|
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, \
|
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
|
MSG_CHANNEL_EOF, MSG_CHANNEL_SUCCESS, MSG_CHANNEL_FAILURE
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/usr/bin/python
|
#!/usr/bin/python
|
||||||
|
|
||||||
import base64
|
import base64
|
||||||
from paramiko import SSHException
|
from ssh_exception import SSHException
|
||||||
from message import Message
|
from message import Message
|
||||||
from transport import MSG_USERAUTH_REQUEST
|
from transport import MSG_USERAUTH_REQUEST
|
||||||
from util import inflate_long, deflate_long
|
from util import inflate_long, deflate_long
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
from message import Message
|
from message import Message
|
||||||
from util import inflate_long, deflate_long, generate_prime, bit_length
|
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 transport import MSG_NEWKEYS
|
||||||
from Crypto.Hash import SHA
|
from Crypto.Hash import SHA
|
||||||
from Crypto.Util import number
|
from Crypto.Util import number
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
# "g" generator.
|
# "g" generator.
|
||||||
|
|
||||||
from message import Message, inflate_long
|
from message import Message, inflate_long
|
||||||
from paramiko import SSHException
|
from ssh_exception import SSHException
|
||||||
from transport import MSG_NEWKEYS
|
from transport import MSG_NEWKEYS
|
||||||
from Crypto.Hash import SHA
|
from Crypto.Hash import SHA
|
||||||
from logging import DEBUG, INFO, WARNING, ERROR, CRITICAL
|
from logging import DEBUG, INFO, WARNING, ERROR, CRITICAL
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
|
||||||
|
class SSHException(Exception):
|
||||||
|
pass
|
||||||
|
|
|
@ -14,7 +14,6 @@ MSG_CHANNEL_OPEN, MSG_CHANNEL_OPEN_SUCCESS, MSG_CHANNEL_OPEN_FAILURE, \
|
||||||
import sys, os, string, threading, socket, logging, struct
|
import sys, os, string, threading, socket, logging, struct
|
||||||
from message import Message
|
from message import Message
|
||||||
from channel import Channel
|
from channel import Channel
|
||||||
from paramiko import SSHException
|
|
||||||
from util import format_binary, safe_string, inflate_long, deflate_long, tb_strings
|
from util import format_binary, safe_string, inflate_long, deflate_long, tb_strings
|
||||||
from rsakey import RSAKey
|
from rsakey import RSAKey
|
||||||
from dsskey import DSSKey
|
from dsskey import DSSKey
|
||||||
|
@ -53,6 +52,7 @@ except:
|
||||||
randpool.randomize()
|
randpool.randomize()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class BaseTransport(threading.Thread):
|
class BaseTransport(threading.Thread):
|
||||||
'''
|
'''
|
||||||
An SSH Transport attaches to a stream (usually a socket), negotiates an
|
An SSH Transport attaches to a stream (usually a socket), negotiates an
|
||||||
|
|
Loading…
Reference in New Issue