diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2013-01-14 18:56:39 -0200 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2013-01-14 18:56:39 -0200 |
commit | 9e844111caa8f4f9fbc69981b49caa4d09d09980 (patch) | |
tree | 785e78c599b2fc3f1d657ca8f7f9a7ea258d3026 /misc/telneter | |
parent | 0119808c10bedf5bc2a39206a32dbb8a6767a0fc (diff) | |
download | scripts-9e844111caa8f4f9fbc69981b49caa4d09d09980.tar.gz scripts-9e844111caa8f4f9fbc69981b49caa4d09d09980.tar.bz2 |
Renaming telneter
Diffstat (limited to 'misc/telneter')
-rwxr-xr-x | misc/telneter | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/misc/telneter b/misc/telneter new file mode 100755 index 0000000..acb9404 --- /dev/null +++ b/misc/telneter @@ -0,0 +1,22 @@ +#!/usr/bin/expect +# +# Simple telnet application to log in a server +# WARNING: passphrase is sent in the clear! +# + +spawn telnet example.org +# Not absolutely necessary, but good to keep the spawn_id for later +set telnet $spawn_id +# Case insensitive, just in case.. +expect -nocase "login:" +send "user\r" +# My telnetd insisted on an uppercase P. This works bothways +expect -nocase "password:" +send "SENHA\r" +# Match the prompt (contains a $) +expect -re {\$} +# Get the environment variables +send "env\r" +# Wait for the prompt +expect -re {\$} +exit |