in reply to Telnet to multiple IPs and tftp individual config files

Yes, you can. My CRAPPS (https://github.com/vinsworldcom/crapps) script does just that - among many other things - for Cisco routers.

Essentially, you delay the reading of the config file to use until you read the host to connect to. When you get the hostname, you then look in your config directory for a "hostname.confg" file and open it for reading. Then simply issue the commands over the Telnet session.

If you provide some minimal code to show what you've done so far, we could be of more help.

  • Comment on Re: Telnet to multiple IPs and tftp individual config files

Replies are listed 'Best First'.
Re^2: Telnet to multiple IPs and tftp individual config files
by maclaren_role (Initiate) on May 11, 2016 at 14:17 UTC
    Many thanks! your script looks great. On first attempt though to check out the functionality it has objected to line 6 for some reason... Bareword found where operator expected at c:\crapps\crapps.pl line 6, near ""en" class" It also does this for <title> Please advise...
      Don't download the HTML page, download the raw script (click on "Raw" before "Blame" and "History").

      ($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,