Skip to content

Instantly share code, notes, and snippets.

@alvin2ye
Created October 31, 2009 04:42
Show Gist options
  • Save alvin2ye/222909 to your computer and use it in GitHub Desktop.
Save alvin2ye/222909 to your computer and use it in GitHub Desktop.
#!/bin/sh
cookie='_rghost_session=BAh7CToQX2NzcmZfdG9rZW4iMW41S0ZQYVBOUFpHakY3NjBSQVdVSkRsSlFRNEpIMlRoOGxPaWlOeXFvUE09OglsYW5nIgplbi1VUyIKZmxhc2hJQzonQWN0aW9uQ29udHJvbGxlcjo6Rmxhc2g6OkZsYXNoSGFzaHsABjoKQHVzZWR7ADoRdXBsb2FkZWRfaWRzWwZpA%2BwKAQ%3D%3D--0d0e906fea9cd812bd87461af94c0c464c0b4b66'
authenticity_token='n5KFPaPNPZGjF760RAWUJDlJQQ4JH2Th8lOiiNyqoPM='
url=`curl -b $cookie \
-F authenticity_token="$authenticity_token" \
-F file="@$1" \
http://phonon.rghost.ru/files | grep 'rghost.ru/[0-9]*' -o`
echo "http://$url"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment