Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Locked thread
ate shit on live tv
Feb 15, 2004

by Azathoth
Ok this is a REALLY simple program that would help me out greatly, I just do'nt know how to handle the number of simultaneous connections......

I need a program that will telnet to a list of IP's preferrably simultaneously (no more than 30 or so if that matters). It will then login with the same login/password at every node. It can be something as easy as Login wait 3 seconds, password, wait 3 seconds. Then it will execute 2 commands with about a 3 second delay between them. The commands are "flmDeleteDb" and then "reboot."

So basically the program does this to the list of defined IP's:

Telnet 10.10.10.10
connected....
Login
(1-2 second delay)
Password
(1-2 second delay)
flmDeleteDb
(1 sec delay)
Y
(1-2 second delay)
reboot
(disconnect)

The more customizable the better, but really the only thing necessary would be letting me define a list of IP's and connecting to all of them simultaneously or near simultaneously.

This is some sample output if it would help you all the nodes will be similiar to that.
code:
ATTENTION!!!
This shell is intended for QUALIFIED PERSONNEL ONLY.  Customer Use of
this shell is not recommended OR supported by the Technical Assistance
Center.  Inappropriate use of shell Commands can have a Negative AND
Service Affecting impact on your network.  Please consult the User
Documentation for appropriate troubleshooting procedures.

To exit without logging in, enter Control-D at the login prompt.
To exit after logging in, type "logout" at the prompt.



Login: CISCO15

Password:XXXXXX

To discontinue logging in, type control-d or wait 60 seconds.
After logging in, type 'enablec' to enable abort key (control-c).


->
-> flmDeleteDb
flmDeleteDb


WARNING: The use of flmDeleteDb is traffic affecting and will cause
ALL provisioning data to be lost, INCLUDING any custom defaults.
This command should be used by qualified personnel ONLY under the
direction of Cisco technicians.  Follow the "Restore to Factory
Configuration" procedure to restore this card to the factory delivered
configuration.

Proceed?  (Y/N) (anything but Y aborts)

Y

MAY 03 16:32:09.50 UTC ERROR     databaseMgrIf.c:129   tShell
 ...Deleting /DBD/prov.db

MAY 03 16:32:09.52 UTC ERROR     databaseMgrIf.c:129   tShell
 ...Deleting /DBE/prov.db

MAY 03 16:32:09.53 UTC ERROR     databaseMgrIf.c:129   tShell
 ...Deleting /DBF/prov.db

MAY 03 16:32:09.55 UTC ERROR     databaseMgrIf.c:129   tShell
 ...Deleting /DBG/prov.db

MAY 03 16:32:09.57 UTC ERROR     databaseMgrIf.c:129   tShell
 ...Deleting /DBH/prov.db

MAY 03 16:32:09.60 UTC ERROR     databaseMgrIf.c:129   tShell
 ...Deleting /DBI/prov.db

MAY 03 16:32:09.62 UTC ERROR     databaseMgrIf.c:129   tShell
 ...Deleting /DBJ/prov.db

MAY 03 16:32:09.65 UTC ERROR     databaseMgrIf.c:129   tShell
 ...Deleting /DBA/prov.db

MAY 03 16:32:09.67 UTC ERROR     databaseMgrIf.c:129   tShell
 ...Deleting /DBB/prov.db

MAY 03 16:32:09.70 UTC ERROR     databaseMgrIf.c:129   tShell
 ...Deleting /DBC/prov.db

MAY 03 16:32:10.23 UTC ERROR       flashMgrRed.c:208   tShell
 ...Deleting /DBR
value = 0 = 0x0
-> reboot
http://www.tinyappz.com/wiki/Request:1178209455

ate shit on live tv fucked around with this message at 17:36 on May 3, 2007

Adbot
ADBOT LOVES YOU

ate shit on live tv
Feb 15, 2004

by Azathoth

b0lt posted:

I just coded a quick little program up: http://filesocket.com/download/e94MultiTelnet.zip
Drag a text file with a list of ips/hostnames into the executable, one on each line, and type in username, password, and the command you want to run, and it'll telnet to all of the hosts at the same time and execute the commands. Now that I think of it, that might not be such a good idea. Oh wait, .NET limits the thread pool to 10 at a time, IIRC. Also, blank passwords won't work. I'm running on something like 3 hours of sleep in the past 24 hours :(

Thanks for the effort I'll try this monday at work.

  • Locked thread