예제 #1
0
파일: telnet.py 프로젝트: peterjrogers/Net
    def __init__(self, ip="", hostname="", out_dict="", auth_con=""):
        Tools.__init__(self)
        Vty.__init__(self, hostname, out_dict)
        """
        interface to the the telnet library
        """

        self.ip = ip
        self.hostname = hostname.lower()
        self.port = 23

        self.auth_con = auth_con
        self.user = ""
        self.password = ""

        self.path = os.getcwd() + "\\"

        self.newline = "\r\n"
        self.space = " "

        self.verbose = 1

        self.read_until_timeout = 2
        self.timeout = 5
        self.sleep = 0.1

        # set the values for Cisco as default
        self.login_text = "Username: "******"Password: "******"q"
        self.banner_list = ["\d+>", "--More--", "\d+#"]
        self.more = "--More--"
예제 #2
0
파일: ssh.py 프로젝트: peterjrogers/Net
 def __init__(self, ip, hostname, out_dict='', auth_con=''):
     Tools.__init__(self)
     Vty.__init__(self, hostname, out_dict)
     """
     interface to the paramiko open ssl module
     """
    
     self.ip = ip
     self.hostname = hostname.lower()
     self.port = 22
     self.auth_con = auth_con
     self.user = ''
     self.password = ''
     
     self.path = os.getcwd() + '\\'
     self.debug_file = self.path + self.hostname + '_ssh_debug.log'
     
     self.newline = '\r\n'
     
     self.verbose = 1