Network scripting - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: General Coding Help (https://python-forum.io/forum-8.html) +--- Thread: Network scripting (/thread-8079.html) |
Network scripting - bsoth - Feb-05-2018 Hi- Im trying to find a way to create a script that can go out to all of my Devices, log in and collect some output to a file that I can dump into excel. SSH to the router (I have hundreds of them, so I can provide a list of IPs but have no idea how to tell python to automatically go through the list. Run a command like this: show configuration | match ike Take the output and send to a file on my network Go on to the next one... Thanks in advance! Bryan RE: Network scripting - wavic - Feb-06-2018 It will be slow. Awaiting one response to do another request... You say that you have hundreds of devices? You may want to see aiohttp module. And for example this on SO: https://stackoverflow.com/questions/35926917/asyncio-web-scraping-101-fetching-multiple-urls-with-aiohttp I didn't use aiohttp yet so I can just make suggestions. How familiar are you with Python? |