zsh supported
This commit is contained in:
parent
a58fb33b2a
commit
54092b14e5
1 changed files with 4 additions and 4 deletions
|
@ -10,8 +10,8 @@ urlencode() {
|
||||||
}
|
}
|
||||||
|
|
||||||
get_asp_var() {
|
get_asp_var() {
|
||||||
VARS="$@" ; i=0
|
i=0
|
||||||
for VAR in $VARS ; do
|
for VAR in __VIEWSTATE __VIEWSTATEGENERATOR __EVENTVALIDATION ; do
|
||||||
VAL="$(printf '%s' "$RESPONSE" | grep "id=\"$VAR\"" | cut -d '"' -f 8 | urlencode)"
|
VAL="$(printf '%s' "$RESPONSE" | grep "id=\"$VAR\"" | cut -d '"' -f 8 | urlencode)"
|
||||||
[ "$i" != 0 ] && printf '&'
|
[ "$i" != 0 ] && printf '&'
|
||||||
printf '%s=%s' "$VAR" "$VAL"
|
printf '%s=%s' "$VAR" "$VAL"
|
||||||
|
@ -42,7 +42,7 @@ download_iso() {
|
||||||
|
|
||||||
RESPONSE="$(curl -s --compressed "$URL" -o -)"
|
RESPONSE="$(curl -s --compressed "$URL" -o -)"
|
||||||
|
|
||||||
ASP_VARS="$(get_asp_var __VIEWSTATE __VIEWSTATEGENERATOR __EVENTVALIDATION)"
|
ASP_VARS="$(get_asp_var)"
|
||||||
RESPONSE="$(curl -Ls --compressed "$URL" \
|
RESPONSE="$(curl -Ls --compressed "$URL" \
|
||||||
--data-raw "__EVENTTARGET=ctl00%24certContents%24ddlInstaladores" \
|
--data-raw "__EVENTTARGET=ctl00%24certContents%24ddlInstaladores" \
|
||||||
--data-raw "__EVENTARGUMENT=" \
|
--data-raw "__EVENTARGUMENT=" \
|
||||||
|
@ -57,7 +57,7 @@ download_iso() {
|
||||||
--data-raw "ctl00%24certContents%24hiddenABID=" \
|
--data-raw "ctl00%24certContents%24hiddenABID=" \
|
||||||
-o -)"
|
-o -)"
|
||||||
|
|
||||||
ASP_VARS="$(get_asp_var __VIEWSTATE __VIEWSTATEGENERATOR __EVENTVALIDATION)"
|
ASP_VARS="$(get_asp_var)"
|
||||||
RESPONSE="$(curl -H "Set-Cookie: SN=$SN" -s --compressed "$URL" \
|
RESPONSE="$(curl -H "Set-Cookie: SN=$SN" -s --compressed "$URL" \
|
||||||
--cookie "SN=$SN" \
|
--cookie "SN=$SN" \
|
||||||
--data-raw "__EVENTTARGET=ctl00%24certContents%24LinkButton3" \
|
--data-raw "__EVENTTARGET=ctl00%24certContents%24LinkButton3" \
|
||||||
|
|
Loading…
Reference in a new issue