Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #IB_TELNET
- import telnetlib
- #List ALL Tigbur IP Addresses
- ip_tigbur = open("ip_list.txt",r) #
- for HOST in ip_tigbur:
- #Enter Our Cred
- user = "will be added after"
- password = "will be added after"
- tn = telnetlib.Telnet(HOST)
- tn.read_until("Username: ")
- tn.write(user + "\n")
- if password:
- tn.read_until("Password: ")
- tn.write(password + "\n")
- tn.write("show mac address-table dynamic\n")
- OUTPUT tn.read_all()
- FILE=open(C:\\IB_TIGBUR_MACS.txt", "w")
- FILE.write(OUTPUT)
- FILE.close()
- tn.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement