telnet常見的錯誤
阿新 • • 發佈:2020-09-08
telnet常見的錯誤
安裝了xinetd
修改了配置檔案
https://www.yuanmas.com/info/qKa13NNOgb.html
1. 23埠沒開放/沒有安裝telnet伺服器
[qjx@bogon ~]$ telnet 45.77.185.17
Trying 45.77.185.17...
telnet: connect to address 45.77.185.17: Connection refused
tes.out:(no 23 prot)
pexpect.exceptions.EOF: End Of File (EOF). Exception style platform. <bjcaclient.bjcatelnet.bjcatelnet object at 0x7fd1625e6210> command: /usr/bin/telnet args: ['/usr/bin/telnet', '45.77.185.17', '23', '-l', 'root'] buffer (last 100 chars): '' before (last 100 chars): 'Trying 45.77.185.17...\r\r\ntelnet: connect to address 45.77.185.17: Connection refused\r\n' after: <class 'pexpect.exceptions.EOF'> match: None match_index: None exitstatus: 1 flag_eof: True pid: 3632 child_fd: 5 closed: False timeout: 30 delimiter: <class 'pexpect.exceptions.EOF'> logfile: None logfile_read: None logfile_send: None maxread: 2000 ignorecase: False searchwindowsize: None delaybeforesend: 0.05 delayafterclose: 0.1 delayafterterminate: 0.1 searcher: searcher_re: 0: re.compile("(?i)password") 1: re.compile("(?i)Connection timed out") 2: TIMEOUT
2. 錯誤的使用者名稱(4097)/以root使用者登陸(4097)/密碼錯誤(4097)???
[qjx@bogon ~]$ telnet 192.168.80.128 23 -l qqq
Trying 192.168.80.128...
Connected to 192.168.80.128.
Escape character is '^]'.
Password:
Login incorrect
login: login: qqq
Password:
Connection closed by foreign host.
3. host不正確
[qjx@bogon ~]$ telnet 192.168.80.111 Trying 192.168.80.111... telnet: connect to address 192.168.80.111: No route to host
test.out:
pexpect.exceptions.EOF: End Of File (EOF). Exception style platform. <bjcaclient.bjcatelnet.bjcatelnet object at 0x7fa0ca58c210> command: /usr/bin/telnet args: ['/usr/bin/telnet', '192.168.80.111', '23', '-l', 'qjx'] buffer (last 100 chars): '' before (last 100 chars): 'Trying 192.168.80.111...\r\r\ntelnet: connect to address 192.168.80.111: No route to host\r\n' after: <class 'pexpect.exceptions.EOF'> match: None match_index: None exitstatus: 1 flag_eof: True pid: 3826 child_fd: 5 closed: False timeout: 30 delimiter: <class 'pexpect.exceptions.EOF'> logfile: None logfile_read: None logfile_send: None maxread: 2000 ignorecase: False searchwindowsize: None delaybeforesend: 0.05 delayafterclose: 0.1 delayafterterminate: 0.1 searcher: searcher_re: 0: re.compile("(?i)password") 1: re.compile("(?i)Connection timed out") 2: TIMEOUT
4. 輸入密碼超時.no test
[qjx@bogon ~]$ telnet 192.168.80.128 -l qjx
Trying 192.168.80.128...
Connected to 192.168.80.128.
Escape character is '^]'.
Password: ogin timed out after 180 seconds
Connection closed by foreign host.
5. 沒網
telnet: Unable to connect to remote host: Network is unreachable
test.out:
pexpect.exceptions.EOF: End Of File (EOF). Exception style platform.
<bjcaclient.bjcatelnet.bjcatelnet object at 0x7f0f3a8c4210>
command: /usr/bin/telnet
args: ['/usr/bin/telnet', '192.168.80.128', '23', '-l', 'qjx']
buffer (last 100 chars): ''
before (last 100 chars): 'Trying 192.168.80.128...\r\r\ntelnet: connect to address 192.168.80.128: Network is unreachable\r\n'
after: <class 'pexpect.exceptions.EOF'>
match: None
match_index: None
exitstatus: 1
flag_eof: True
pid: 3877
child_fd: 5
closed: False
timeout: 30
delimiter: <class 'pexpect.exceptions.EOF'>
logfile: None
logfile_read: None
logfile_send: None
maxread: 2000
ignorecase: False
searchwindowsize: None
delaybeforesend: 0.05
delayafterclose: 0.1
delayafterterminate: 0.1
searcher: searcher_re:
0: re.compile("(?i)password")
1: re.compile("(?i)Connection timed out")
2: TIMEOUT
6.提權錯誤(4100)
7. 被遠端主機過濾掉(4097)
[qjx@bogon Downloads]$ telnet 192.168.151.71 445
Trying 192.168.151.71...
Connected to 192.168.151.71.
Escape character is '^]'.
Connection closed by foreign host.
發生4097的錯誤,可能是因為超時,因為執行需要很久,可能有點問題