Created
July 7, 2023 10:21
-
-
Save vimagick/55abf4b9984d087fd8736a2f8dce1ebb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/bin/bash | |
# | |
# Device Listing in Linksys Smart Wi-Fi | |
# | |
IPADDR=x.x.x.x | |
PASSWD=******** | |
ACTION=devicelist/GetDevices | |
curl -s -H 'Content-Type: application/json' -H "X-JNAP-Authorization: Basic $(echo -n "admin:$PASSWD" | base64)" -H "X-JNAP-Action: http://linksys.com/jnap/$ACTION" http://$IPADDR/JNAP/ -d '{}' | | |
jq -r '.output.devices[]|select(.connections[0].ipAddress)|"\(.connections[0].ipAddress)\t\(.friendlyName)"' | | |
nl -w3 -s $'.\t' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment