X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=examples%2Fstats%2Ftelpp;fp=examples%2Fstats%2Ftelpp;h=5ae98dba4f35d4bc5f9c6876d4e1f0e3f12efe50;hb=a209ebc3f922264908ff644f371f8211638d44ef;hp=0000000000000000000000000000000000000000;hpb=c1397621dd9c67ea3e3b8db3d5acc7ad687ce055;p=debian%2Fp10cfgd diff --git a/examples/stats/telpp b/examples/stats/telpp new file mode 100644 index 0000000..5ae98db --- /dev/null +++ b/examples/stats/telpp @@ -0,0 +1,31 @@ +#!/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 +