Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- session=$(curl http://127.0.0.1:8080/limesurvey/index.php/admin/authentication/sa/login | egrep -o '[a-f0-9]{40}')
- curl -c creds.txt 'http://127.0.0.1:8080/limesurvey/index.php/admin/authentication/sa/login' \
- -H 'Cookie: YII_CSRF_TOKEN= echo "$session" | head -n1' \
- -H 'Origin: http://127.0.0.1:8080' -H 'Accept-Encoding: gzip, deflate, br' \
- -H 'Accept-Language: sv-SE,sv;q=0.8,en-US;q=0.6,en;q=0.4' \
- -H 'Upgrade-Insecure-Requests: 1' \
- -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.95 Safari/537.36' \
- -H 'Content-Type: application/x-www-form-urlencoded' \
- -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8' \
- -H 'Cache-Control: max-age=0' \
- -H 'Referer: http://127.0.0.1:8080/limesurvey/index.php/admin/authentication/sa/login' \
- -H 'Connection: keep-alive' --data 'YII_CSRF_TOKEN= echo "$session" | head -n1&authMethod=Authdb&user=user&password=pass&loginlang=default&action=login&width=865&login_submit=login' --compressed
- curl -b creds.txt http://127.0.0.1:8080/limesurvey/index.php/admin/dumpdb -o "/Users/user/Desktop/survey3-2015_$(date +%Y%m%d_%H%M%S).sql"
- rm creds.txt
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement