Convert SuperPutty sessions.xml file into hosts file output

The sessions.xml file that my team uses has 1400 entries! Kinda insane. This little script converts SuperPutty sessions.xml file into output that can be copy/pasted into hosts file. I needed a way to quickly copy content from the sessions file into a hosts file so that I can automate some of the configuration using Ansible (DNS is not an option in my environment)

https://github.com/main-salman/SuperPuttySessionsXMLtoHostsConverter

Usage

python SuperPuttySessionsXMLtoHostsConverter.py

The above script assumes that the SuperPutty sessions.xml file is in the same directory as the script. Outputs hosts.txt and also prints output, so you can copy/paste output from either source into your hosts file.

More to come in the next post!

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Blog at WordPress.com.

Up ↑

%d bloggers like this: