Hi,
I wasn't sure what to make the title say...
I've seen a program called 'Expect' that runs on unix.
Putting it simply, you give it a script and it follows your instructions, calling a program and waiting for the response, then acting on the response. I'm unsure of the exact structure of Expect but what I'd like to do in VB is along the lines of...
For example, to telnet to router:
send 'telnet a.b.c.d'; expect 'username'; else fail
send 'dalton'; expect 'password'; else fail
send 'xyz'; expect 'Signon successful.'; else fail
send 'show version'; expect... etc
Does anyone know of a VB code that will do this? There's no point in re-inventing the wheel!
If not, does anyone have any ideas how I could start to write it?
I've used shell commands in the distant past and I guess there's a better way now but my main concern is getting the responses back into my code...
any ideas on this part of it please?
Regards
Peter
I wasn't sure what to make the title say...
I've seen a program called 'Expect' that runs on unix.
Putting it simply, you give it a script and it follows your instructions, calling a program and waiting for the response, then acting on the response. I'm unsure of the exact structure of Expect but what I'd like to do in VB is along the lines of...
For example, to telnet to router:
send 'telnet a.b.c.d'; expect 'username'; else fail
send 'dalton'; expect 'password'; else fail
send 'xyz'; expect 'Signon successful.'; else fail
send 'show version'; expect... etc
Does anyone know of a VB code that will do this? There's no point in re-inventing the wheel!
If not, does anyone have any ideas how I could start to write it?
I've used shell commands in the distant past and I guess there's a better way now but my main concern is getting the responses back into my code...
any ideas on this part of it please?
Regards
Peter