2

I would like to query a telnet server on port 105. What I have to do currently is start an interactive session and enter the commands later one by one.

Since I already know the commands, I would like to automate this process and fetch the results without any manual intervention.

When I try to use pipe to push commands at the time of logging in, this doesn't work. Any help is highly appreciated.

vrtualrealty
  • 23
  • 1
  • 3

2 Answers2

1

You are probably looking for a tool like expect.

Christopher Creutzig
  • 8,656
  • 35
  • 45
0

Since you do not say what OS you use, and what kind of script language you want to use I will just provide a few suggestions for further reading.

this questions might answer what you are looking for.

Also I found this that could help you out a bit.

Community
  • 1
  • 1
Qben
  • 2,617
  • 2
  • 24
  • 36