From 454c6e3c77b3db507ee81875219089047fc2d5a3 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Sun, 13 Jan 2013 15:37:49 -0200 Subject: Initial import --- misc/freeshell | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 misc/freeshell (limited to 'misc/freeshell') diff --git a/misc/freeshell b/misc/freeshell new file mode 100755 index 0000000..a2f6e38 --- /dev/null +++ b/misc/freeshell @@ -0,0 +1,17 @@ +#!/usr/bin/expect +spawn telnet freeshell.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 -- cgit v1.2.3