Created
February 2, 2015 13:57
-
-
Save sobi3ch/60f071c546747bf79b9e to your computer and use it in GitHub Desktop.
Login to Drupal via https
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/bash | |
# Obviously change name and pass values and example.com domain | |
curl --insecure \ | |
--cookie ./cookie.txt \ | |
--cookie-jar ./cookie.txt \ | |
-e example.com \ | |
-d "name=admin" \ | |
-d "pass=admin" \ | |
-d "form_id=user_login" \ | |
https://example.com/user |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Then you can do authenticate requests like for instance download file from private directory:
$ curl --insecure --cookie cookie.txt -O https://example.com/admin/config/system/backup_migrate/settings/destination/downloadfile/manual/Example.com-2025-12-02T06-29-37.mysql.gz