telnet常见的错误

时间:2020-09-08
本文章向大家介绍telnet常见的错误,主要包括telnet常见的错误使用实例、应用技巧、基本知识点总结和需要注意事项,具有一定的参考价值,需要的朋友可以参考一下。

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的错误,可能是因为超时,因为执行需要很久,可能有点问题

原文地址:https://www.cnblogs.com/qjx-2016/p/8036393.html