Page 2 of 2

Re: could anybody help with dos commands for this task

Posted: 07 Feb 2019 18:10
by Ed Dyreen
Squashman wrote:
02 Feb 2019 11:41
If you are trying to automate a telnet connection I would advise you to use Albert Yale's Telnet scripting tool.

http://support.moonpoint.com/downloads/ ... /tst10.php
With it, you can do something like this

Code: Select all

@echo off &start /LOW "Telnet Scripting Tool v1.0" "tst10.exe" /r:manuScript.txt &exit 0
manuscript

Code: Select all

[targetDomainName] [portNumber]
WAIT "server ready."
SEND "helo\m"
WAIT "Hello, ."
SEND "auth login\m"
WAIT "334 VXNlcm5hbWU6"
SEND "YmFzZTY0ZW5jPT0=\m"
WAIT "334 UGFzc3dvcmQ6"
SEND "PASSWORD_BASE64==\m"
WAIT "235 Authentication successful."

Re: could anybody help with dos commands for this task

Posted: 10 Feb 2019 13:20
by penpen
jraju wrote:
01 Feb 2019 20:27
the resutl was empty. Am i missing something there.Please kindly modify the script and i will try.
Sorry, i had few time last week so i couldn't post earlier.

I tried the windows built in telnet.exe-command, but it seems it can't heandle redirected input-/output-streams and exits immediately, so the solution (attempt) i gave doesn't work:
That's a little bit odd, because that should be a default way of interprocess communication of console programs and therefore should work with most console tools (and that's the reason i said, i would try that first).

The ommand line option '-f "filename"' should work.

So you have to stick with the solutions of Squashman and Ed Dyreen to control the input and use the log-file option to save the output to file (if needed).

penpen