#!/usr/local/bin/expect -- # a dumb little 'expect' program to check the heard list on ppfma.ampr.org set timeout 15 puts [timestamp -format %c] ;# time tag the output spawn telnet 44.32.4.2 expect "login: " { send "wd0fhg\r" } expect "NET/ROM*" { send "j\r" } ;# for now we will just look at all expect { ;# no easy way to tell that the list is ;# complete so we'll just time out "NET/WRONG*" {} ;# looking for we can't find. } expect "*" { send "\r\r" };# flush the expect buffer expect "*" { send "c ax4 w0lkd-1\r" } :# try to connect on .01 expect "Connected" {send "\rb\r" } ;# just try the connection expect "*" { send "\rb\r" };# flush the expect buffer and signoff expect "closed*" ;# wait for the connection to close exec sleep 3 expect eof