Skip to content

Instantly share code, notes, and snippets.

@andrerocker
Created November 7, 2010 19:46
Show Gist options
  • Save andrerocker/666357 to your computer and use it in GitHub Desktop.
Save andrerocker/666357 to your computer and use it in GitHub Desktop.
Download of Oracle site Application from the Command Line
#!/bin/sh
read -p "usuario: " usuario;
read -p "senha: " senha;
read -p "link: " download;
nomeArquivo=`echo $download | awk 'BEGIN{FS="/"}{print $NF }'`;
authLink="https://profile.oracle.com/jsp/reg/loginHandler.jsp";
if [ -z $usuario ] || [ -z $senha ]
then
echo "Use: $0 <usuario> <senha> <link-download>";
exit 1;
fi
curl -d "username=${usuario}&password=${senha}&redirectUrl=${download}"
$authLink -L -c $$.cookie.txt > $nomeArquivo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment