Guest User

Untitled

a guest
Mar 21st, 2018
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.12 KB | None | 0 0
  1. read -p "Username: " USERNAME
  2. read -p "Password: " PASSWORD
  3. ADMIN_URL='https://example.com/phpmyadmin'
  4. COOKIEJAR='/tmp/phpmyadmin_cookie'
  5.  
  6. token=$(
  7. wget -qO-
  8. --http-user="$USERNAME"
  9. --http-password="$PASSWORD"
  10. --save-cookies "$COOKIEJAR"
  11. --keep-session-cookies
  12. "$ADMIN_URL"
  13. | egrep -o 'token=[[:xdigit:]]+' | head -1
  14. )
  15.  
  16. post_data="$token&what=sql&export_type=server"
  17.  
  18. wget -O export.sql
  19. --save-headers
  20. --http-user="$USERNAME"
  21. --http-password="$PASSWORD"
  22. --load-cookies "$COOKIEJAR"
  23. --post-data "$post_data"
  24. "$ADMIN_URL/export.php"
  25.  
  26. rm "$COOKIEJAR"
  27.  
  28. --2018-03-21 15:27:35-- https://woosh5.nl/phpmyadmin/export.php
  29. Resolving woosh5.nl (woosh5.nl)... 37.97.205.130, 2a01:7c8:aac3:7::11
  30. Connecting to woosh5.nl (woosh5.nl)|37.97.205.130|:443... connected.
  31. HTTP request sent, awaiting response... 401 Unauthorized
  32. Authentication selected: Basic realm="phpMyAdmin localhost"
  33. Reusing existing connection to woosh5.nl:443.
  34. HTTP request sent, awaiting response... 500 Internal Server Error
  35. 2018-03-21 15:27:35 ERROR 500: Internal Server Error.
Add Comment
Please, Sign In to add comment