Created
November 7, 2010 19:46
-
-
Save andrerocker/666357 to your computer and use it in GitHub Desktop.
Download of Oracle site Application from the Command Line
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/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