telnet

Open source Telnet Java API

落花浮王杯 提交于 2019-12-04 01:03:37
问题 Is there an open source telnet API/library out there for Java (something like Python telnetlib)? I need to connect to a server using telnet and execute some commands from within a Java program. 回答1: My preference is to use the Apache Commons-Net library. http://commons.apache.org/net/ It supports many client protocols, including Telnet. I've used this in the past and it works quite well. 回答2: Maybe is worth considering using SSH protocol, instead of Telnet. Telnet is much less secure, for

华为路由器修改telnet,ssh密码

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-04 00:20:29
telnet修改密码: sys aaa local-user admin password cipher 密码 qu save ssh修改密码(ssh的密码必须是不可逆的): sys aaa local-user admin password irreversible-cipher 密码 qu save Error: The password has appeared in recent 5 times. 设置密码的历史记录条数具体举例如下: 配置每个本地管理员密码的历史记录的最大条数为0条。 <HUAWEI> system-view [HUAWEI] aaa [HUAWEI-aaa] local-aaa-user password policy administrator [HUAWEI-aaa-lupp-admin] password history record number 0 来源: CSDN 作者: skyxmstar 链接: https://blog.csdn.net/skyxmstar/article/details/87969988

各种型号的路由器初始默认密码

白昼怎懂夜的黑 提交于 2019-12-04 00:20:13
Manufacturer Product Revision Protocol User ID Password Access Level Comment 3COM CellPlex 7000 Telnet tech tech 3COM CoreBuilder 7000/6000/3500/2500 Telnet debug synnet 3COM CoreBuilder 7000/6000/3500/2500 Telnet tech tech 3COM HiPerARC v4.1.x Telnet adm (none) 3COM LANplex 2500 Telnet debug synnet 3COM LANplex 2500 Telnet tech tech 3COM LinkSwitch 2000/2700 Telnet tech tech 3COM NetBuilder SNMP ANYCOM snmp-read 3COM NetBuilder SNMP ILMI snmp-read 3COM Office Connect ISDN Routers 5x0 Telnet n/a PASSWORD Admin 3COM SuperStack II Switch 2200 Telnet debug synnet 3COM SuperStack II Switch 2700

python3实现telnet查看IP地址段端口开放情况

大兔子大兔子 提交于 2019-12-03 23:55:50
1、python3实现IP地址段打印 1 #!/usr/bin/python3 2 #-*- coding:utf-8 -*- 3 4 #编写环境 windows 7 x64 + Python3.7.0 5 #python3实现IP地址段打印 6 7 #ip转换方法 8 def ip2num(ip): 9 ip=[int(x) for x in ip.split('.')] 10 return ip[0] <<24 | ip[1]<<16 | ip[2]<<8 |ip[3] 11 def num2ip(num): 12 return '%s.%s.%s.%s' %( (num & 0xff000000) >>24, 13 (num & 0x00ff0000) >>16, 14 (num & 0x0000ff00) >>8, 15 num & 0x000000ff ) 16 17 #把输入的ip范围组合成一个list形式 18 def get_ip(ip): 19 start,end = [ip2num(x) for x in ip.split('-') ] 20 return [ num2ip(num) for num in range(start,end+1) if num & 0xff ] 21 22 23 if __name__ == '__main__': 24

Linux安装telnet C/S 【白话文】

喜夏-厌秋 提交于 2019-12-03 22:38:43
1.安装telnet 和telnet-server yum -y install telnet yum -y install telnet-server 注意:在此安装过程中,会依赖解决xinetd的超级守护进程的安 装 --仅仅是centos6 centos7 如需要xinetd则手动安装 xinetd yum -y install xinetd service xinetd restart systemctl enable xinetd.service --将xinetd 加入开机启动 systemctl start telnet.socket 再启动telnet 注意:不能登陆到 root 且登陆普通用户 需要有密码 如失败 请先关闭双方防火墙 service firewalld stop chkconfig --list --检查xinetd支持项目 CentOS7 xinetd不再支持 telnet CentOS6 使用xinetd 开放 telnet服务: # chkconfig --list | grep 'telnet' telnet: off       # chkconfig telnet on    # chkconfig --list | grep 'telnet' telnet: on   注意:不能登陆到 root 且登陆普通用户 需要有密码 如失败

Bash script telnet to test multiple addresses and ports

房东的猫 提交于 2019-12-03 20:54:28
I am required to test at least 130 ip addresses and ports. I am hoping to write a bash script such that it reads the ip address and ports from an input file. I have the following while read line do telnet $line >> $2 done < $1 This is a crappy code as it cannot determine whether its connected or failed, and I have to rely on its auto escape character to disconnect from a connection. How can I improvise this such that it updates $2 with the status quickly? I am working on Redhat and do not have netcat or expect installed.. ymonad As other stackoverflower's said, I would recommend using nmap or

zabbix3.4中报错解:telnet service is down on决方法

可紊 提交于 2019-12-03 17:32:47
当新添加的监控主机报telnet service is down on的时候,大家不要惊慌,这个是属于模板中添加了一项监控参数,监控被监控机的telnet服务,有两种解决办法,第一呢就是找到对应的监控项给关闭掉(简单粗暴的方法)按需关闭。如果不用关闭的话就要用第二种方式,那就是解决报错的根本问题。 1、首先查看是那台设备报警,然后去对应的设备上查看是否按照telnet服务和xinetd守护进程服务。 rpm -qa telnet-server rpm -qa xinetd 2、未安装则开始对三个东西进行安装(默认安装rpm镜像中最新版本) yum -y install telnet-server yum -y install telnet yum -y install xinetd 3、安装完成后设置开机自启动 systemctl enable xinetd.service systemctl enable telnet.socket 4、开启telnet服务和xinetd守护进程 systemctl start telnet.socket systemctl start xinetd 5、最后再检查一下zabbix中的报错是否解除恢复了,咱们看到下图已经解除了。 来源: https://www.cnblogs.com/xiangxu-zhao/p/11805019.html

Accept a persistent tcp connection in Golang Server

僤鯓⒐⒋嵵緔 提交于 2019-12-03 15:01:22
问题 I am experimenting with Go - and would like to create a TCP server which I can telnet to, send commands and receive responses. const ( CONN_HOST = "localhost" CONN_PORT = "3333" CONN_TYPE = "tcp" ) func main() { listener, err := net.Listen(CONN_TYPE, fmt.Sprintf("%s:%s", CONN_HOST, CONN_PORT)) if err != nil { log.Panicln(err) } defer listener.Close() for { conn, err := listener.Accept() if err != nil { log.Panicln(err) } go handleRequest(conn) } } func handleRequest(conn net.Conn) { buffer :=

How to telnet google using command prompt?

流过昼夜 提交于 2019-12-03 12:56:51
This is what I tried telnet www.google.com 80 Get HTTP/1.1 Host:www.google.com This I what I receive back HTTP/1.0 400 Bad Request Content-Type: text/html; charset=UTF-8 Content-Length: 925 Date: Sat, 24 Nov 2012 19:37:42 GMT Server: GFE/2.0 How do I make this work? I trying to use telnet to access www.google.com $ telnet www.google.com 80 Trying 173.194.38.82... Connected to www.google.com. Escape character is '^]'. GET / HTTP/1.1 HTTP/1.1 302 Found Location: http://www.google.co.jp/ Cache-Control: private Content-Type: text/html; charset=UTF-8 [.... skipped ....] DiveInto After issuing the

Spawning an interactive telnet session from a shell script

怎甘沉沦 提交于 2019-12-03 11:51:29
I'm trying to write a script to allow me to log in to a console servers 48 ports so that I can quickly determine what devices are connected to each serial line. Essentially I want to be able to have a script that, given a list of hosts/ports, telnets to the first device in the list and leaves me in interactive mode so that I can log in and confirm the device, then when I close the telnet session, connects to the next session in the list. The problem I'm facing is that if I start a telnet session from within an executable bash script, the session terminates immediately, rather than waiting for