标签:style blog http color os for
作者:gnuhpc
出处:http://www.cnblogs.com/gnuhpc/
__author__ = ‘gnuhpc‘ import telnetlib,socket IP={} def parseTel(line): parseArray = line.split() IP[parseArray[0]]=parseArray[1] with open("tel.lst") as f: for line in f: parseTel(line) for (ip,port) in IP.items(): try: tn = telnetlib.Telnet(ip,port,1) tn.close() except socket.error, why: print ip,port,why
【工作常用代码集】批量Telnet远端端口,布布扣,bubuko.com
标签:style blog http color os for
原文地址:http://www.cnblogs.com/gnuhpc/p/3825064.html