Advertisement
Guest User

Untitled

a guest
Apr 19th, 2017
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.26 KB | None | 0 0
  1. ion=$(curl http://127.0.0.1:8080/limesurvey/index.php/admin/authentication/sa/login | egrep -o '[a-f0-9]{40}')
  2.  
  3. curl -c /Users/user/Desktop/backup/min_cookie.txt 'http://127.0.0.1:8080/limesurvey/index.php/admin/authentication/sa/login' \
  4. -H 'Cookie: YII_CSRF_TOKEN= echo "$session" | head -n1' \
  5. -H 'Origin: http://127.0.0.1:8080' \
  6. -H 'Accept-Encoding: gzip, deflate' \
  7. -H 'Accept-Language: sv-SE,sv;q=0.8,en-US;q=0.6,en;q=0.4' \
  8. -H 'Upgrade-Insecure-Requests: 1' \
  9. -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36' \
  10. -H 'Content-Type: application/x-www-form-urlencoded' \
  11. -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8' \
  12. -H 'Cache-Control: max-age=0' \
  13. -H 'Referer: http://127.0.0.1:8080/limesurvey/index.php/admin/authentication/sa/login' \
  14. -H 'Connection: keep-alive' --data 'YII_CSRF_TOKEN= echo "$session" | head -n1&authMethod=Authdb&user=USERNAME&password=PASSWORD&loginlang=default&action=login&login_submit=Inloggning' --compressed
  15.  
  16.  
  17. curl -b /Users/user/Desktop/backup/min_cookie.txt http://127.0.0.1:8080/limesurvey/index.php/admin/dumpdb -o "/Users/user/Desktop/backup/survey3-2015_$(date +%Y%m%d_%H%M%S).sql"
  18.  
  19. rm min_cookie.txt
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement