telnet

How do I create a decent bash script to start an ETRN on a mail-server?

笑着哭i 提交于 2020-06-17 09:18:07
问题 Once in a while, I need to ETRN a couple of backup servers (e.g. after maintenance of my own SMTP server). Normally, I use telnet for that. I go to that server, HELO with my own name and give the ETRN commands. I would like to automate that in a decent way. A simple (but not decent) way would be to start telnet with <<, but the problem is that I do not want to send commands out of order (and the other end may even drop the connection if I do that, haven't tested it yet, but if it works now,

Interesting behaviour of echo -n command when used in the beginning

放肆的年华 提交于 2020-05-31 04:02:31
问题 I'm seeing one interesting behaviour with some commands which need manual interruption when piped with echo -n command. bash-3.2$ openssl OpenSSL> exit bash-3.2$ echo -n | openssl OpenSSL> bash-3.2$ bash-3.2$ telnet 10.207.139.8 22 Trying 10.207.139.8... Connected to 10.207.139.8. Escape character is '^]'. SSH-2.0-OpenSSH_7.4 ^] telnet> Connection closed. bash-3.2$ echo -n | telnet 10.207.139.8 22 Trying 10.207.139.8... Connected to 10.207.139.8. Escape character is '^]'. Connection closed by

how to use threads and tee to log the telnet response from a server?

一个人想着一个人 提交于 2020-05-27 09:28:11
问题 context: there are distinctions between different telnet clients, and certainly a distinction from those clients to, for example, the Apache library. In this case, yes, using an actual telnet client for MUD's, where the servers can be quite finnicky, so that API's or sockets just won't work. How do I go about: Spawn a new Process for every piped command. Create Threads that read the output from one command and write it to the input of the next command. right now there's no output for: package

how to use threads and tee to log the telnet response from a server?

落花浮王杯 提交于 2020-05-27 09:25:31
问题 context: there are distinctions between different telnet clients, and certainly a distinction from those clients to, for example, the Apache library. In this case, yes, using an actual telnet client for MUD's, where the servers can be quite finnicky, so that API's or sockets just won't work. How do I go about: Spawn a new Process for every piped command. Create Threads that read the output from one command and write it to the input of the next command. right now there's no output for: package

Can't find package from application written in Tcl

社会主义新天地 提交于 2020-05-17 06:22:06
问题 Thanks to the comments, better understand the problem a bit. The variables: thufir@dur:~/tcl/packages$ thufir@dur:~/tcl/packages$ echo 'puts $auto_path' | tclsh /usr/share/tcltk/tcl8.6 /usr/share/tcltk /usr/lib /usr/local/lib/tcltk /usr/local/share/tcltk /usr/lib/tcltk/x86_64-linux-gnu /usr/lib/tcltk /usr/lib/tcltk/tcl8.6 thufir@dur:~/tcl/packages$ thufir@dur:~/tcl/packages$ echo 'puts $tcl_pkgPath' | tclsh /usr/local/lib/tcltk /usr/local/share/tcltk /usr/lib/tcltk/x86_64-linux-gnu /usr/lib

Scripting telnet mailing

若如初见. 提交于 2020-05-15 08:54:12
问题 I want to create a script that will be able to send mail easily with the user choices. I did this but it does not work mail_sender () { echo " - FROM : " read from echo " - TO : " read to echo " - Subject : " read subject echo " - Message : " read message telnet localhost 25 ehlo triton.itinet.fr mail from: $from rcpt to: $to data subject: $subject $message . } Do you have an idea ? 回答1: Redirect to telnet a here-document : mail_sender () { echo " - FROM : " read from echo " - TO : " read to

php Socket 入门例子

你离开我真会死。 提交于 2020-04-24 17:13:07
<?php /* 设置不显示任何错误 */ error_reporting(0); /* 脚本超时为无限 */ set_time_limit(0); /* 开始固定清除 */ ob_implicit_flush(); /* 服务器端的IP和需要开放的端口 */ $address = '192.168.1.2'; $port = 10000; /* 产生一个Socket */ if (($sock = socket_create(AF_INET, SOCK_STREAM, SOL_TCP)) < 0) { echo "socket_create() failed: reason: " . socket_strerror($sock) . "\n"; } /* 把IP地址端口进行绑定 */ if (($ret = socket_bind($sock, $address, $port)) < 0) { echo "socket_bind() failed: reason: " . socket_strerror($ret) . "\n"; } /* 监听Socket连接 */ if (($ret = socket_listen($sock, 5)) < 0) { echo "socket_listen() failed: reason: " . socket_strerror($ret)

Is it possible to send LDAP “requests” via telnet?

主宰稳场 提交于 2020-04-10 07:14:39
问题 I am wondering whether is it possible or not to establish a connection to a LDAP server via telnet (or some other program) and start making requests and receiving responses as I would normally do with HTTP. In fact, the question is more generic and is related to my misunderstanding of network connections and communications protocols. Let me tell you the idea I have in my mind about this topic: All application protocols define communication protocols (that is, messages that the server is going

搭建Telnet服务

烈酒焚心 提交于 2020-04-06 01:59:53
可能大家都知道现在已经很少有人用TELNET服务器, 因为它传输数据是以明文的方式,我们很容易通过抓包软件讲数据进行抓包,然后将有用的数据取出来占为己用。但是也不是没有解决方案,你可以用telnet进行数据传输。 一.安装Telnet服务器 说起安装TELNET服务,其实 Linux 自身就已经支持安装SSH服务,如果我们依然想要用TELNET服务进行测试的话也很简单,我们只选用用一行 命令 就搞定了,即给予yum源的方式进行安装。 [root@yinzhengjie ~]# yum -y install telnet* 安装完毕后,我们会在守护进程(xinet)目录下看到相应的服务。如果看到xilent服务,那么恭喜你,你已经安装成功了。 二.启动TELNET服务 我们安装完毕之后,还需要修改配置文件,让服务随着xinetd服务的启动而启动。 接下来我们只需要重启xinetd服务即可: 三.验证服务是否启动成功。 这个步骤很简单,我们需要创建一个登陆用户。 接下来就更简单的,我们只选用用这个用户进行登陆即可。 本文地址: https://www.linuxprobe.com/telnet-fuwu.html 来源: oschina 链接: https://my.oschina.net/u/3585265/blog/3216715