Home » Script to decode Asus router configuration backup file

Script to decode Asus router configuration backup file

by Vlad Drumea
0 comments

I’ve been messing around with routers this weekend, and I’ve decided to write a PowerShell script to decode Asus router configuration backup files.

The script is inspired by this Bash script that I’ve used in my previous blog post.

You can find the PowerShell script in my Asus-Router-Config-Decoder GitHub repository.

Why?

Because I wanted to understand how Asus routers encode and decode their configuration backups.
I already had the previously mentioned Bash script as a starting point.
And I considered that it would be a nice PowerShell exercise, since I haven’t done any work on PSBlitz for a while.
The added bonus to this is that the resulting PowerShell script is faster than the Bash script I used as the inspiration for it.

What it does?

  1. decodes the provided .cfg file
  2. writes the decoded content to a text file
  3. writes DHCP client list to a pipe-delimited text file
  4. outputs the following to the console:
    • Web GUI admin username and password
    • Wi-Fi network names (SSIDs)
    • Wi-Fi passwords (WPA PSKs)
    • PPPOE credentials

At the moment, I’ve successfully tested the script with the following Asus router models:

  • Asus RT-BE88U
  • Asus RT-AX86U Pro
  • Asus RT-AC86U

Feel free to leave a comment with the Asus router models you’ve used this script to decode their configuration files.

How to use it?

Execute it in PowerShell (version 5.1 and up) and pass the name of the .cfg file you want to decode.

Usage examples

If the configuration file you want to decode is in the same directory as the script:

If the script is in a different directory from the one where the Asus router configuration file is:


Conclusion

I just figured I’d share the result of my weekend PowerShell exercise in case anyone might need it to decode their Asus router configuration backup.

If you’re interested in more networking related uses for PowerShell, check out this post about doing a ping sweep using PowerShell.

You may also like

Leave a Comment

* By using this form you agree with the storage and handling of your data by this website.

This site uses Akismet to reduce spam. Learn how your comment data is processed.