September 23, 2020, 01:48:08 pm
News: GalahTech Community Based Technical Support!
Pages: [1]   Go Down
Author Topic: Script a telnet session  (Read 2203 times)
simmo
Administrator
*

Stars: +3/-0
Offline Offline

Gender: Male
Posts: 8556



« on: June 13, 2007, 06:26:19 pm »

I have been collecting some logs from a cisco router and I want to make the login "error free" by writing a bat file or something that will log in.

has anyone done this? basically i just need it to answer the questions with the bits in bold:

Password: abc123
Type help or '?' for a list of available commands.
myasa> en
Username: msimmons
Password: abc123
myasa# conf t
myasa(config)# logging buffered debug
myasa(config)# logging enable
myasa(config)# debug crypto isakmp
myasa(config)# debug crypto ipsec
myasa(config)# show log


(and no, thats not my real password, hell not even my real username)
Logged

                 ..... .....

amitabh
Old Timer
*

Stars: +0/-0
Offline Offline

Posts: 2764


WWW
« Reply #1 on: June 15, 2007, 03:54:19 pm »

I have seen this happening quite a bit in Perl, but googling found a C# example too:
http://www.c-sharpcorner.com/UploadFile/tylerkline/TelnetScripting11282005001158AM/TelnetScripting.aspx
Logged

simmo
Administrator
*

Stars: +3/-0
Offline Offline

Gender: Male
Posts: 8556



« Reply #2 on: June 15, 2007, 07:28:41 pm »

Yeah, I saw the perl script, I was hoping could do in a bat file, so it could just get it started for me then I could take over smile
Logged

                 ..... .....

Jason Reed
Administrator
*

Stars: +4/-0
Offline Offline

Gender: Male
Posts: 4541


Pure Evil Administrator


WWW
« Reply #3 on: June 18, 2007, 06:12:47 am »

Could these links help you do it?

http://technet2.microsoft.com/WindowsServer/en/library/ddf8b035-9035-475c-ae50-1d97bde83dba1033.mspx

http://www.tek-tips.com/viewthread.cfm?qid=1243718&page=1
Logged

-- signature --

simmo
Administrator
*

Stars: +3/-0
Offline Offline

Gender: Male
Posts: 8556



« Reply #4 on: June 18, 2007, 03:11:32 pm »

I think so hmm
I should wait untill I have a box to test on (this is the firewall that the entire company runs through (even the remote offices)) so if I break it... woo doggie i'd be sooo screwed Another Tounge
Logged

                 ..... .....

Chris
Founders
*

Stars: +0/-0
Offline Offline

Posts: 3312


MIA


« Reply #5 on: June 19, 2007, 09:50:14 pm »

and no, thats not my real password, hell not even my real username
Could it be a double-bluff? hmm
Logged

When the Bogeyman goes to sleep every night, nothing happens.

Pages: [1]   Go Up
Print
 
Jump to: