Update 2021-04-29: This may still work for you if you've got an old TP-Link router, but this is not maintained and doesn't work with newer models. If you've got a newer router, other projects like tpconf_bin_xml will likely work better for you.
TP-Link allows you to backup and restore your router's config file. For some reason, they decided to encrypt these backups so you cannot modify them. I think this is dumb. This script lets you decrypt and re-encrypt your config files so you can modify them as you see fit.
I use this to modify my reserved addresses list because editing them through the web interface is terribly slow and cumbersome.
- Go to the router and download the config file from the "Backup & Restore" section of "System Tools".
- Run
ruby tp.rb config.bin
- Edit the created config file
config.cfg
as you please. - Run
ruby tp.rb config.cfg
- Return to the "Backup & Restore" section and upload your modified
config.bin
file.
This work is based on the hack by Matteo Croce here. Thank you for doing the hard part.
Hi. First, thank you. It's really great what you have done. I'm trying to decrypt my WR840N, but when I will edit the config.cfg file I got "incompatible character encodings: ASCII-8BIT and UTF-8".