Advertisement
Guest User

Untitled

a guest
Feb 8th, 2017
211
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.20 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. session=$(curl http://127.0.0.1:8080/limesurvey/index.php/admin/authentication/sa/login | egrep -o '[a-f0-9]{40}')
  4.  
  5. curl -c creds.txt 'http://127.0.0.1:8080/limesurvey/index.php/admin/authentication/sa/login' \
  6. -H 'Cookie: YII_CSRF_TOKEN= echo "$session" | head -n1' \
  7. -H 'Origin: http://127.0.0.1:8080' -H 'Accept-Encoding: gzip, deflate, br' \
  8. -H 'Accept-Language: sv-SE,sv;q=0.8,en-US;q=0.6,en;q=0.4' \
  9. -H 'Upgrade-Insecure-Requests: 1' \
  10. -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' \
  11. -H 'Content-Type: application/x-www-form-urlencoded' \
  12. -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8' \
  13. -H 'Cache-Control: max-age=0' \
  14. -H 'Referer: http://127.0.0.1:8080/limesurvey/index.php/admin/authentication/sa/login' \
  15. -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
  16.  
  17.  
  18. 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"
  19.  
  20. rm creds.txt
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement