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.
$ ruby tp.rb config.bin
'tp.rb:18:in
update': key not set (OpenSSL::Cipher::CipherError) from tp.rb:18:in
I'm getting this error. Any idea?