Windows NT KAMIDAKI 10.0 build 19045 (Windows 10) AMD64
Apache/2.4.58 (Win64) OpenSSL/3.1.3 PHP/8.3.9
Server IP : 192.168.3.16 & Your IP : 216.73.216.140
Domains :
Cant Read [ /etc/named.conf ]
User : SISTEMA
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
C: /
Users /
VEGETA /
PycharmProjects /
CÓDIGOSOLT /
Delete
Unzip
Name
Size
Permission
Date
Action
.idea
[ DIR ]
drwxrwxrwx
2023-03-24 03:22
Relogio.py
461
B
-rw-rw-rw-
2023-03-20 01:14
oltTESTE.py
764
B
-rw-rw-rw-
2023-03-18 06:32
Save
Rename
import pexpect import os # Solicita o IP da OLT olt_ip = input("Digite o IP da OLT: ") # Abre uma sessão telnet com o Putty e salva o log na área de trabalho child = pexpect.spawn(f"putty.exe -telnet {olt_ip} 23") child.logfile = open(os.path.expanduser("~/Desktop/olt_log.txt"), "wb") # Envia os comandos de login na OLT child.expect("Username:") child.sendline("GEPON") child.expect("Password:") child.sendline("GEPON") child.expect(">") child.sendline("enable") child.expect("Password:") child.sendline("GEPON") # Coleta as informações de versão da placa child.expect("#") child.sendline("show version") child.expect("#") print(child.before.decode('utf-8')) # Fecha a sessão do Putty child.sendline("exit") child.close()