A command-line interface for managing the VM SuperHub 3/ARRIS TG2492S/CE router. Allows listing current/past connected devices, toggle private/guest WLAN, rebooting and viewing router status
Planning to tidy up the codebase and also take the opportunity to implement some new features 😀. The end goal is to enable the script to also function as a library (rather than only a CLI interface), and to improve maintainablility of the overall codebase.
The project will remain a single python file with no dependencies on external packages, and all of the existing functionality will remain.
Any suggestions/changes/feedback would be much appreciated!
Core Changes
[x] Replace the 'web' function with Python's urllib
[x] Create Session class to handle logging in/out & SNMP-over-HTTP requests
[x] Refactor all classes to inherit a new base class ~'APIRequest'~ Edit: 'RouterSessionClientBase'
[x] Create Output class to handle formatting the output in the command line
[x] Custom session exceptions - e.g. login failed
[ ] User input exception - allow an user to input text if running as CLI
[ ] All global variables removed (except version)
Documentation
[ ] Custom session exceptions
[ ] User input exception
New Features and minor changes
[ ] Check if a user is already logged in
[ ] Add 'is ethernet/wlan' column to clients list
[x] Include data from the base64-encoded login cookie to the diagnostic output
[ ] Login action now returns HTTP status code 500 if the password is incorrect. Previously this used to be an empty response, could use this to provide a more user-friendly exception.
Overview
Planning to tidy up the codebase and also take the opportunity to implement some new features 😀. The end goal is to enable the script to also function as a library (rather than only a CLI interface), and to improve maintainablility of the overall codebase.
The project will remain a single python file with no dependencies on external packages, and all of the existing functionality will remain.
Any suggestions/changes/feedback would be much appreciated!
Core Changes
Documentation
New Features and minor changes