Created
April 9, 2015 18:21
-
-
Save dsieborger/79a07aea42fa832cc092 to your computer and use it in GitHub Desktop.
Download binary config file from Ruckus ZoneDirector
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/sh | |
# Download the binary config file from a Ruckus ZoneDirector. | |
# | |
# Tested with 9.8.2 on a ZD5000. May well need to be adjusted for other | |
# versions. | |
USERNAME=xxx | |
PASSWORD=xxx | |
ZDURL=https://zonedirector.example | |
COOKIES=cookies.txt # will be overwritten if it exists | |
CURL="curl -sS -c $COOKIES --cacert /path/to/cacert.pem" | |
# add -v for debugging | |
TIME=`date +%m%d%y_%H_%M` | |
$CURL -o /dev/null -d username=$USERNAME -d password=$PASSWORD -d ok=Log\ In \ | |
$ZDURL/admin/login.jsp && \ | |
sleep 3 && \ | |
$CURL -o /dev/null -b $COOKIES $ZDURL/admin/login.jsp && \ | |
$CURL -OJ -b $COOKIES $ZDURL/admin/_savebackup.jsp\?time=$TIME |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment