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.
This still works tho. I have a tp-link wifi extender WA860RE and works great. This script will work with tp link products that used DES ecb encryption. Of course I had to use rvm to install an older version of ruby and also openssl 1.0.0 with rvm too, this because OpenSSL 3.0 will give an error on line 11. The DES algorithm was deprecated in newer openSSL. So we have to use openSSL 1.0 that rvm installs by default. Tested it on Ubuntu 22.04 LTS:
If you are willing to try this script do this and you're ready to go.
Thanks a lot Violet for this code! It works like a charm ;) xx