Connecting to smtp.gmail.com via command line

Using Linux or OSx, do what Sorin recommended but use port 465 instead. 25 is the generic SMTP port, but not what GMail uses. Also, I don’t believe you want to use -starttls smtp openssl s_client -connect smtp.gmail.com:465 You should get lots of information on the SSL session and the response: 220 mx.google.com … Type … Read more

Creating a script for a Telnet session?

I’ve used various methods for scripting telnet sessions under Unix, but the simplest one is probably a sequence of echo and sleep commands, with their output piped into telnet. Piping the output into another command is also a possibility. Silly example (echo password; echo “show ip route”; sleep 1; echo “quit” ) | telnet myrouter … Read more

HTTP keep-alive timeout

The client cannot specify the timeout, it is the server configuration that determines the maximum timeout value. The extra Keep-Alive header can inform the client how long the server is willing to keep the connection open (timeout=N value) and how many requests you can do over the same connection (max=M) before the server will force … Read more

How to send an HTTP request using Telnet [closed]

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 …

Difference between wscript and cscript

In Windows, an executable is either a console application or a Windows application (or a SFU or Native application, but that doesn’t matter here). The kernel checks a flag in the executable to determine which. When starting using CreateProcess WinAPI function, if it is a console application, the kernel will create a console window for … Read more

“-bash: telnet: command not found ” error?

The RHEL/CentOS 5.4 telnet client is installed at /usr/kerberos/bin/telnet. Your $PATH variable thus needs /usr/kerberos/bin listed. (Preferably before /usr/bin) If for some reason you don’t have that file installed, it’s part of the package krb5-workstation. Installing that package manually or via YUM should give you what you need. You can check quick with which telnet … Read more