mirror of https://framagit.org/kyodev/kyopages.git
2.4.1
This commit is contained in:
parent
c13d387e25
commit
24e619e6bb
|
@ -0,0 +1,133 @@
|
|||
#!/bin/bash
|
||||
|
||||
clear
|
||||
|
||||
user_agent="Mozilla/5.0 (X11; Linux $(uname -m); rv:54.0) Gecko/20100101 Firefox/54.0"
|
||||
|
||||
f__testWget(){
|
||||
echo " $1"
|
||||
wget -Sq --tries=1 --timeout=15 --user-agent="$user_agent" -O /dev/null "$1"
|
||||
}
|
||||
|
||||
|
||||
####
|
||||
echo "détection version flash en ligne"
|
||||
echo "================================"
|
||||
|
||||
# <p class="NoBottomMargin" id="AUTO_ID_columnleft_p_version"><strong>Version 26.0.0.137</strong></p>
|
||||
|
||||
urlOnline="https://get.adobe.com/fr/flashplayer/"
|
||||
verFlash="$(wget -q --tries=1 --timeout=15 --user-agent="$user_agent" -O - "$urlOnline" | \
|
||||
sed -nr 's/^.*AUTO_ID.*Version[[:blank:]]+([0-9].*[0-9]).*$/\1/p')" || verFlash="na"
|
||||
|
||||
echo "\$user_agent: $user_agent"
|
||||
echo "\$urlOnline: $urlOnline"
|
||||
echo "\$verFlash: $verFlash"
|
||||
|
||||
#echo ""; f__testWget "$urlOnline"
|
||||
|
||||
|
||||
####
|
||||
detect_1(){
|
||||
echo ""
|
||||
echo "url chargement flashplayer v1"
|
||||
echo "============================="
|
||||
|
||||
# https://fpdownload.adobe.com/get/flashplayer/pdc/26.0.0.137/flash_player_npapi_linux.i386.tar.gz
|
||||
|
||||
recup1="https://fpdownload.adobe.com/get/flashplayer/pdc/"
|
||||
if [ "$(uname -m)" == "i686" ] || [ "$(uname -m)" == "i386" ]; then recup2='i386';
|
||||
elif [ "$(uname -m)" == "x86_64" ] || [ "$(uname -m)" == "amd64" ]; then recup2='x86_64';
|
||||
else echo "architecture non reconnue" ; fi
|
||||
recup_url="$recup1$verFlash/flash_player_npapi_linux.$recup2.tar.gz"
|
||||
|
||||
echo "\$recup1 $recup1"
|
||||
echo "\$recup_url $recup_url"
|
||||
|
||||
echo ""; f__testWget "$recup_url"
|
||||
echo ""
|
||||
}
|
||||
|
||||
|
||||
####
|
||||
detect_2(){
|
||||
echo ""
|
||||
echo "url chargement flashplayer v2"
|
||||
echo "============================="
|
||||
|
||||
#buttonDownload").attr("href","/fr/flashplayer/download/?installer=FP_26.0_for_Linux_32-bit_(.tar.gz)_-_NPAPI&sType=6627&standalone=1");
|
||||
recup="$(wget -q --tries=1 --timeout=15 --user-agent="$user_agent" -O - "$urlOnline" | grep -o '#buttonDownload.*(\.tar\.gz).*$')"
|
||||
recup1="$(echo $recup | sed 's/.*\(download.*Linux_\).*/\1/')"
|
||||
recup2="$(echo $recup | sed 's/.*\(-bit.*standalone=1\).*/\1/')"
|
||||
recup_url="$urlOnline$recup1$(getconf LONG_BIT)$recup2"
|
||||
|
||||
echo "\$recup $recup"
|
||||
echo "\$recup1 $recup1"
|
||||
echo "\$recup2 $recup2"
|
||||
|
||||
echo "\$recup_url $recup_url"
|
||||
|
||||
file="flashplayer_npapi_linux.$(getconf LONG_BIT).tar.gz"
|
||||
|
||||
# echo ""; f__testWget "$recup_url"
|
||||
|
||||
echo ""
|
||||
wget -c --tries=1 --timeout=15 --user-agent="$user_agent" --referer="$urlOnline" \
|
||||
--debug -o log -O "$file" "$recup_url"
|
||||
|
||||
echo ""; ls -l "$file"
|
||||
echo ""; cat -n log
|
||||
|
||||
}
|
||||
|
||||
detect_1
|
||||
|
||||
exit
|
||||
|
||||
## v2
|
||||
#lien site:
|
||||
https://get.adobe.com/fr/flashplayer/download/?installer=FP_26.0_for_Linux_32-bit_(.tar.gz)_-_NPAPI&sType=6630&standalone=1
|
||||
https://get.adobe.com/fr/flashplayer/download/?installer=FP_26.0_for_Linux_32-bit_(.tar.gz)_-_NPAPI&sType=6630&standalone=1
|
||||
#lien calculé
|
||||
|
||||
#base standard: entetes ok, download KO, taille environ 11 Ko
|
||||
wget -c --tries=1 --timeout=15 --user-agent="$user_agent" --referer="$urlOnline" \
|
||||
--debug -o log -O "$file" "$recup_url"
|
||||
|
||||
#essais
|
||||
wget -c --tries=1 --timeout=15 --user-agent="$user_agent" \
|
||||
--debug -o log -O "$file" "$recup_url"
|
||||
wget -c --tries=1 --timeout=15 --user-agent="$user_agent" --keep-session-cookies \
|
||||
--debug -o log -O "$file" "$recup_url"
|
||||
wget -c --tries=1 --timeout=15 --user-agent="$user_agent" --keep-session-cookies \
|
||||
--no-hsts --debug -o log -O "$file" "$recup_url"
|
||||
wget -c --tries=1 --timeout=15 --user-agent="$user_agent" --keep-session-cookies \
|
||||
--no-hsts --ignore-length --debug -o log -O "$file" "$recup_url"
|
||||
|
||||
wget -c --tries=1 --timeout=15 --user-agent="$user_agent" --referer="$urlOnline" \
|
||||
--debug -o log -O "$file" "$recup_url"
|
||||
wget -c --tries=1 --timeout=15 --user-agent="$user_agent" --referer="$urlOnline" --keep-session-cookies \
|
||||
--debug -o log -O "$file" "$recup_url"
|
||||
wget -c --tries=1 --timeout=15 --user-agent="$user_agent" --referer="$urlOnline" --keep-session-cookies \
|
||||
--no-hsts --debug -o log -O "$file" "$recup_url"
|
||||
wget -c --tries=1 --timeout=15 --user-agent="$user_agent" --referer="$urlOnline" --keep-session-cookies \
|
||||
--no-hsts --ignore-length --debug -o log -O "$file" "$recup_url"
|
||||
|
||||
|
||||
curl -L -O -v --header "User-Agent: $user_agent" -o "$file" "$recup_url"
|
||||
|
||||
L suivre les redirections
|
||||
C - reprendre
|
||||
O sauve fichier avec même nom que distant
|
||||
o file sauve fichier sous file
|
||||
v verbose
|
||||
|
||||
curl -I "$recup_url"
|
||||
HTTP/1.1 200 OK
|
||||
Date: Fri, 14 Jul 2017 10:18:32 GMT
|
||||
Server: JRun Web Server
|
||||
Content-Type: text/html; charset=UTF-8
|
||||
Cache-Control: private, no-store, no-cache
|
||||
Content-Language: fr-FR
|
||||
Content-Language: fr-FR
|
||||
Set-Cookie: SETTINGS.LOCALE=fr%5Ffr; HttpOnly;domain=.adobe.com;expires=Sun, 07-Jul-2047 17:18:32 GMT;path=/cfusion/
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
version=2.4.0
|
||||
version=2.4.1
|
||||
date="17/07/2017"
|
||||
projet="Kyodev"
|
||||
contact="https://framagit.org/kyodev/kyopages/issues"
|
||||
|
@ -194,7 +194,7 @@ esac
|
|||
|
||||
# version Flash en ligne & installée, $verFlash=x|na, $verInstall, $uptd_plug=""|ko, $urlOnline,
|
||||
fflash_version(){
|
||||
urlOnline="https://get.adobe.com/flashplayer/"
|
||||
urlOnline="https://get.adobe.com/fr/flashplayer/"
|
||||
if ! f__cnxTest; then f__error "pas de connexion internet"; fi
|
||||
verFlash="$(wget -q --tries=2 --timeout=15 --user-agent="$user_agent" -O - "$urlOnline" | \
|
||||
sed -nr 's/^.*AUTO_ID.*Version[[:blank:]]+([0-9].*[0-9]).*$/\1/p')" || verFlash="na"
|
||||
|
@ -261,13 +261,6 @@ fflash_detect_url_v1(){
|
|||
else f__error "architecture non reconnue" ; fi
|
||||
recup_url="$recup1$verFlash/flash_player_npapi_linux.$recup2.tar.gz"
|
||||
}
|
||||
fflash_detect_url_v2(){
|
||||
#v2 07/2017 nouveau, mais pas exploitable avec wget ou curl, pour l'avenir?
|
||||
recup="$(wget -q --tries=2 --timeout=15 --user-agent="$user_agent" -O - "$urlOnline" | grep -o '#buttonDownload.*(\.tar\.gz).*$')"
|
||||
recup1="$(echo $recup | sed 's/.*\(download.*Linux_\).*/\1/')"
|
||||
recup2="$(echo $test | sed 's/.*\(-bit.*standalone=1\).*/\1/')"
|
||||
recup_url="$urlOnline$recup1$(getconf LONG_BIT)$recup2"
|
||||
}
|
||||
|
||||
# install plugin dans config user mozilla, $1 manuel (install manuelle), # $2 script à installer si install manuelle
|
||||
fflash_install(){
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
# changelog getFlashPlayer
|
||||
|
||||
|
||||
## 2.4.1 17/07/2017
|
||||
|
||||
fix mineur: ménage tentative détection url v2
|
||||
fix mineur: lien fr pour détection version en ligne
|
||||
|
||||
## 2.4.0 17/07/2017
|
||||
|
||||
* mieux, multi linux: test dépendances
|
||||
|
|
Loading…
Reference in New Issue