telnet

Http Post not posting data

我的未来我决定 提交于 2019-12-06 22:26:47
I'm trying to post some data from a Java client using sockets. It talks to localhost running php code, that simply spits out the post params sent to it. Here is Java Client: public static void main(String[] args) throws Exception { Socket socket = new Socket("localhost", 8888); String reqStr = "testString"; String urlParameters = URLEncoder.encode("myparam="+reqStr, "UTF-8"); System.out.println("Params: " + urlParameters); try { Writer out = new OutputStreamWriter(socket.getOutputStream(), "UTF-8"); out.write("POST /post3.php HTTP/1.1\r\n"); out.write("Host: localhost:8888\r\n"); out.write(

How to write an output of a VB script to a file?

回眸只為那壹抹淺笑 提交于 2019-12-06 16:09:04
问题 I have a script which will output the values of certain commands to the terminal?Can anyone help me to modify the script to write the output to a file? :: Open a Telnet window start telnet.exe 192.168.1.1 :: Run the scrip cscript SendKeys.vbs set OBJECT=WScript.CreateObject("WScript.Shell") WScript.sleep 50 OBJECT.SendKeys "Administrator{ENTER}" WScript.sleep 50 OBJECT.SendKeys "admin{ENTER}" WScript.sleep 50 OBJECT.SendKeys "{ENTER}" For i = 1 to 10 i = i - 1 OBJECT.SendKeys "voice profile

Checking if port is open [closed]

[亡魂溺海] 提交于 2019-12-06 15:40:09
Closed. This question is off-topic . It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 7 years ago . I want to see if port 1878 is open on my Windows Server 2008 R2. I use VPS server, so i talked with the VPS servers company and asked them to open all ports. When i'm running telnet 172.0.0.1 1878 i get that the port is not reachable. Is there another way to see if the port is open or open it? Use may use software such as nMap to test if a port is working, more specifically if it is closed or open. You may have

Execute remote commands from Debian to Windows via Telnet

社会主义新天地 提交于 2019-12-06 15:01:30
问题 I am working on remotely executing a command line in Windows from Debian. For that, I tried to use the bash script below. Using the expect tool, it consists in connecting via telnet to the remote server, entering username and password values and sending the command line desired. #!/usr/bin/expect set timeout 20 set name 192.168.1.46 set user Administrateur set password MSapp/*2013 set cmd "TASKKILL /F /IM Tomcat6.exe" spawn telnet 192.168.1.46 expect "login:" send "$user\r" expect "password:"

Linux script telnet HEAD request [duplicate]

折月煮酒 提交于 2019-12-06 14:57:55
This question already has answers here : Scripting an HTTP header request with netcat (5 answers) Closed 5 years ago . So basically I'm trying to do something fairly easy; I'm trying to make a script to telnet to the microsoft server and requesting the HEAD of the page. But as expected, it doesn't work. If I just enter it manually into the console it works, but when executing the script doesn't work at all. This is the script I made: echo "telnet $1 $2" sleep 10 echo "HEAD $3 HTTP/1.0" echo echo sleep 2 Typing this in the console: ./gethost microsoft.com 80 / Give this as a result: telnet

开启telnet服务

雨燕双飞 提交于 2019-12-06 14:36:21
一、开启telnet服务 通常telnet包是系统默认安装的,做为客户端;telnet-server包需要自行安装,做为服务端。 (2)安装telnet-server yum -y install telnet-server (4)开启telnet服务(有两种方式) a)vi /etc/xinetd.d/telnet,将disable=yes改成disable=no; b)chkconfig telnet on;如果需要设置telnet服务为开机自启动,使用命令chkconfig -add telnet或者chkconfig --add telnet (5)激活telnet服务 使用命令server xinet drestart或者/etc/init.d/xinetd restart使更改生效。 (6)测试telnet服务是否可用 二、关闭telnet服务 (1)关闭telnet服务(有两种方式) a)vi /etc/xinetd.d/telnet,将disable=no改成disable=yes; b)chkconfig telnet off;如果需要设置telnet服务不为开机自启动,使用命令chkconfig -del telnet或者chkconfig --del telnet (2)使用命令server xinetd restart或者/etc/init.d/xinetd

How can I use python's telnetlib to fetch data from a device for a fixed period of time?

杀马特。学长 韩版系。学妹 提交于 2019-12-06 12:27:34
问题 I'm connecting to a hardware device via telnet. That device is pretty simple in terms of I/O. So I submit a command to it, and after that the device pumps out data one line at a time, once per second. Each line just contains a number. So my question is this: if I connect to this device using python's telnetlib, how can I fetch data for a fixed period of time (or a fixed number of lines of data)? I've tried using all the various read_ commands, but they all seem to block indefinitely, apart

路由器的访问控制ACL

你离开我真会死。 提交于 2019-12-06 09:33:23
ACL(Access Control List,访问控制列表) 是路由器接口的指令列表 , 用来控制端口进出的数据包 。 ACL适用于所有的路由协议,如IP、IPX、AppleTalk等 。这张表中包含了匹配关系、条件和查询语句,表只是一个框架结构,其目的是为了对某种访问进行控制。访问控制列表使用包过滤技术,在 路由器上读取第三层及第四层包头中的信息如源地址,目的地址,源端口,目的端口 等,根据预先定义好的规则对包进行过滤,从而达到访问控制的目的,该技术初期仅在路由器上支持,现在已经支持三层交换机和二层交换机。ACL的定义是基于每一种协议的,如果路由器接口配置成为支持三种协议(IP、AppleTalk以及IPX)的情况,那么用户必须定义三种ACL来分别控制这三种协议的数据包。 ACL可以限制网络流量、提高网络性能。例如,ACL可以根据数据包的协议,指定数据包的优先级。 ACL提供对通信流量的控制手段。例如,ACL可以限定或简化路由更新信息的长度,从而限制通过路由器某一网段的通信流量。 ACL是提供网络安全访问的基本手段。ACL允许主机A访问网络,而拒绝主机B访问。 ACL可以在路由器端口处决定哪种类型的通信流量被转发或被阻塞 。例如,用户可以允许E-mail通信流量被路由,拒绝所有的Telnet通信流量。 注意,并不是越多ACL就越好,因为ACL会消耗路由器的资源,影响路由器的性能

Linux Telnet vt100 Return key sends ^M

久未见 提交于 2019-12-06 09:12:23
问题 I'm writing Telnet automation scripts with TCL and Expect in Linux Debian. Pressing Return in a Telnet session or within a *.tcl script ( send "command\r" ) and even send "command\n" causes the line being send with ^M (Ctrl+M) at the end. Off course, the remote host treats those commands as illegal. Tried to telnet set crlf prior to the opening of the connection and mode line while connected, but this has no effect. Using Puttys GUI, I've enabled this option to send a new line by pressing

访问控制列表--标准ACL

被刻印的时光 ゝ 提交于 2019-12-06 09:08:20
访问控制列表 (Access Control List ,简称 ACL) 是根据报文字段对报文进行过滤的一种安全技术。访问控制列表通过过滤报文达到流量控制、攻击防范以及用户接入控制等功能,在现实中应用广泛。 ACL 根据功能的不同分为标准 ACL 和扩展 ACL 。标准 ACL 只能过滤报文的源 IP 地址;扩展 ACL 可以过滤源 IP 、目的 IP 、协议类型、端口号等。 ACL 的配置主要分为两个步骤:( 1 )根据需求编写 ACL ; (2) 将 ACL 应用到路由器接口的某个方向。本章主要介绍各种常用 ACL 的编写与应用。 1.1 实验目的 ( 1 )了解访问控制列表的工作过程 ( 2 )掌握标准访问控制列表的配置和应用 ( 3 )熟悉 标准 ACL的调试 1.2 实验原理 1. 什么是访问控制列表( Access Control List ) ? 访问控制列表( Access Control List)是一种路由器配置脚本,它根据从数据包报头中发现的条件来控制路由器应该允许还是拒绝数据包通过。通过接入控制列表可以在路由器、三层交换机上进行网络安全属性配置,可以实现对进入路由器、三层交换机的输入数据流进行过滤,但ACL 对路由器自身产生的数据包不起作用。 当每个数据包经过关联有 ACL 的接口时,都会与 ACL 中的语句从上到下一行一行进行比对