Created
April 1, 2012 14:48
-
-
Save sergioccrr/2275794 to your computer and use it in GitHub Desktop.
Google Wave Backup
This file contains hidden or 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 | |
read -p 'Email: ' user | |
read -s -p 'Password: ' pass | |
echo | |
rLogin=$(curl --silent --data "Email=$user&Passwd=$pass&service=wave" --write-out '%{http_code}' https://www.google.com/accounts/ClientLogin) | |
cLogin=$(echo $rLogin | awk '{print $NF}') | |
if [ $cLogin != '200' ]; then | |
echo 'Error en el login :-(' | |
exit 1 | |
fi | |
aLogin=$(echo $rLogin | awk '{print $2}' FS='Auth=' | cut -d ' ' -f1) | |
header="Authorization: GoogleLogin auth=$aLogin" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment