Hi,
I'm trying to use expect to telnet to web server and send HTTP command like POST, GET, etc.
Here's my code
Code:
#!/usr/bin/expect -f
expect -c "
spawn telnet 192.168.1.1 80
send "POST /cgi-bin/auth HTTP/1.1"
exit 0
"
But this gives an error
couldn't read file "/cgi-bin/authgw-cgi": no such file or directory
I think this is because of /
How to send / in expect?
Thanks