Rating: 0

#!/usr/bin/env expect
set stty_init raw
spawn nc mathwhiz_c951d46fed68687ad93a84e702800b7a.quals.shallweplayaga.me 21249

while true {
expect -re "(.*)=" {
set expression "$expect_out(1,string)"
set expression [string map {[ ( ] ) \{ ( \} )} $expression]
set expression [string map {ONE 1 TWO 2 THREE 3} $expression]
set expression [string map {^ **} $expression]
set result [expr "$expression"]
send_user "$result\n"
send "$result"
}
}