knipknap / exscript

A Python module making Telnet and SSH easy
MIT License
365 stars 136 forks source link

Connect to a device via previously connected device #204

Closed thomascrha closed 5 years ago

thomascrha commented 5 years ago

I'm sorry if this is the wrong place to ask - but I've been pouring over the docs and can't really find a solution. I need to basically crawl a network - so I'm obtaining some IP's from a device. I then need to connect to those device via the device I obtained the IP from, and do this recursively down.

Can Exscript do this or have some mechanism allowing for this to happen ? If not I'll need to implement something separately - but I was hoping Exscript may have a solution.

Cheers Tom.

thomascrha commented 5 years ago

I've was able to implement something that allows me todo this using some handy things in Exscript - not in the way I was hoping but it works perfectly. I was hoping there was a way to pass a connection to another connection object and do it that way (utilising the login workflow etc.) - but that's not how the protocols.connect works.