python实现的telnet客户端程序,pythontelnet,import getpa
python实现的telnet客户端程序,pythontelnet,import getpa
import getpassimport sysimport telnetlibHOST = "hostname"user = raw_input("Enter your remote account: ")password = getpass.getpass()tn = telnetlib.Telnet(HOST)tn.read_until("login: ")tn.write(user + "\n")if password: tn.read_until("Password: ") tn.write(password + "\n")tn.write("ls\n")tn.write("exit\n")print tn.read_all()
相关内容
- Solve simultaneous equations using the Newton-Raphson method in Pytho
- Use python to calculate the N smallest eigenvalues of a tridiagonal m
- python利用wmi模块统计windows下硬盘信息,pythonwmi,# -*- c
- python中if elif条件语句实用范例,pythonelif,marks = 99if
- python中字典dict的常用操作方法,python字典dict,#创建一空
- python通过socket实现网络广播代码,pythonsocket,import sock
- python使用 htmllib 分析网页内容,pythonhtmllib,import htmll
- python中localtime和gtime的区别及时区计算,localtimegtime,l
- python自动修改本机网关的代码,python网关,#!/usr/bin/p
- Python判断给定的数是否是回文数,,def isPalind
评论关闭