Skip to content

Instantly share code, notes, and snippets.

@sergioccrr
Created April 1, 2012 14:48
Show Gist options
  • Save sergioccrr/2275794 to your computer and use it in GitHub Desktop.
Save sergioccrr/2275794 to your computer and use it in GitHub Desktop.
Google Wave Backup
#!/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