Example telnet script. This one telnets my modem and displays the list of open ports (including dynamic ones)
-
#!/bin/sh
-
host=10.0.0.138
-
port=23
-
cmd="nat list"
-
-
( echo open ${host} ${port}
-
sleep 1
-
echo -e "\r"
-
sleep 1
-
echo ${cmd}
-
sleep 1
-
echo -e "\r"
-
sleep 1
-
echo exit ) | telnet
wrote, on 04/May/04 at 12:15 am # :
FirstPost
(au cas ou)
wrote, on 20/Oct/05 at 11:30 pm # :
VERY VERY VERY VERY VERY VERY VERY THANKS A LOT!!!!
You saved me!!! God bless you 4 ever!!!
said, on 10/Mar/08 at 10:07 pm # :
Thanks a lot for this, really appreciated!
replied, on 22/Mar/08 at 7:27 pm # :
Thx!
Really needed that sort of thing to do a fine little router reconnecter on my ubuntu!
said, on 23/Jun/08 at 3:49 am # :
Thanks a lot for this script, with a few mods it saved my life :D