Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Automatic telnet script

194 views
Skip to first unread message

mario....@gmail.com

unread,
Sep 6, 2007, 7:42:05 PM9/6/07
to
Hi *,

I would like to create a script that will automatically login to
router via telnet and execute "init - 6" command.

Is it possible to do this via wsh or batch?

Thx in advance.

MaRaC made this...

Dasher

unread,
Sep 7, 2007, 3:28:12 AM9/7/07
to

you can use shell to do this ....

something like (off the top of my head...)

Set WSHShell = WScript.CreateObject("WScript.Shell")
wshshell.run ("telnet (router IP))
wshshell.run ("init -6")

may need to check the syntax

Regards
Darren

Pegasus (MVP)

unread,
Sep 7, 2007, 4:07:39 AM9/7/07
to

"Dasher" <darre...@sericol.com> wrote in message
news:1189150092....@y42g2000hsy.googlegroups.com...

I think each command will launch a shell on its own. What
the OP requires is for the "init" command to be issued within
the first shell.


Pegasus (MVP)

unread,
Sep 7, 2007, 4:10:31 AM9/7/07
to

<mario....@gmail.com> wrote in message
news:1189122125.9...@d55g2000hsg.googlegroups.com...

You could create a shell that executes this batch file:
nc 203.55,1.16 Port# < test.txt

Test.txt contains the single line "init - 6". You can get nc.exe
from http://www.securityfocus.com/data/tools/nc11nt.zip.


md.moniruzzaman

unread,
Apr 27, 2010, 9:44:10 AM4/27/10
to
You tips has given me nice solution for my project.

Pegasus \(MVP\) wrote:

Re: Automatic telnet script
07-Sep-07

<mario....@gmail.com> wrote in message
news:1189122125.9...@d55g2000hsg.googlegroups.com...

You could create a shell that executes this batch file:
nc 203.55,1.16 Port# < test.txt

Test.txt contains the single line "init - 6". You can get nc.exe
from http://www.securityfocus.com/data/tools/nc11nt.zip.

Previous Posts In This Thread:

On Thursday, September 06, 2007 7:42 PM
mario.herco wrote:

Automatic telnet script
Hi *,

I would like to create a script that will automatically login to
router via telnet and execute "init - 6" command.

Is it possible to do this via wsh or batch?

Thx in advance.

MaRaC made this...

On Friday, September 07, 2007 3:28 AM
Dasher wrote:

Re: Automatic telnet script


On Sep 7, 12:42 am, mario.her...@gmail.com wrote:

you can use shell to do this ....

something like (off the top of my head...)

Set WSHShell = WScript.CreateObject("WScript.Shell")
wshshell.run ("telnet (router IP))
wshshell.run ("init -6")

may need to check the syntax

Regards
Darren

On Friday, September 07, 2007 4:07 AM
Pegasus \(MVP\) wrote:

Re: Automatic telnet script


I think each command will launch a shell on its own. What
the OP requires is for the "init" command to be issued within
the first shell.

On Friday, September 07, 2007 4:10 AM
Pegasus \(MVP\) wrote:

Re: Automatic telnet script


<mario....@gmail.com> wrote in message
news:1189122125.9...@d55g2000hsg.googlegroups.com...

You could create a shell that executes this batch file:
nc 203.55,1.16 Port# < test.txt

Test.txt contains the single line "init - 6". You can get nc.exe
from http://www.securityfocus.com/data/tools/nc11nt.zip.


Submitted via EggHeadCafe - Software Developer Portal of Choice
BizTalk: Incorporating conditional If / Else Functoid Logic in a map.
http://www.eggheadcafe.com/tutorials/aspnet/f6fc20ab-5c6a-4f04-8a0b-bba39e4bbcf0/biztalk-incorporating-co.aspx

0 new messages