On 07/04/2015 12:23 AM, ToddAndMargo wrote:
Hi All,
In Firefox, when I click on
http://www.fosshub.com/FreeFileSync.html#clickToStartDownload
Cliget tells me:
curl --header 'Host: files.fosshub.com' --header 'User-Agent:
Mozilla/5.0 (X11; Linux x86_64; rv:39.0) Gecko/20100101 Firefox/39.0'
--header 'Accept:
text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'
--header 'Accept-Language: en-US,en;q=0.5' --header 'Referer:
http://www.fosshub.com/FreeFileSync.html' --header 'Cookie:
__cfduid=d6f1281949af85b5b300ff7184c0d87881435987093' --header
'Connection: keep-alive'
'http://files.fosshub.com/Protected/expiretime=1435994622;badurl=aHR0cDovL3d3dy5mb3NzaHViLmNvbS9GcmVlRmlsZVN5bmMuaHRtbA==/6bf907c940a74164cc927ddf3fd0719bee03c53d5c0916955c287ba0d40d1676/FreeFileSync/FreeFileSync_7.2_Win_Setup.exe'
-o 'FreeFileSync_7.2_Win_Setup.exe' -L
How do I figure out the above from the command line?
Many thanks,
-T
The closest I have come is:
curl --header 'Host: files.fosshub.com' --header 'User-Agent:
Mozilla/5.0 (X11; Linux x86_64; rv:39.0) Gecko/20100101 Firefox/39.0'
--header 'Accept:
text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'
--header 'Accept-Language: en-US,en;q=0.5' --header 'Referer:
http://www.fosshub.com/FreeFileSync.html' --header 'Connection:
keep-alive' --header 'Host: files.fosshub.com' --header 'Accept:
text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'
--header 'Accept-Language: en-US,en;q=0.5' --header 'Referer:
http://www.fosshub.com/FreeFileSync.html' --header 'Connection:
keep-alive' --header 'Cookie: $(curl --silent -I
http://www.fosshub.com/FreeFileSync.html#clickToStartDownload | grep
Set-Cookie | awk -F ": " '{print $2}' | awk -F ";" '{print $1}')' $(wget
${ConnectTimeout} --quiet --header="Referer:
http://www.fosshub.com/FreeFileSync.html"
"http://www.fosshub.com/genLink/FreeFileSync/FreeFileSync_${LatestRev}_Windows_Setup.exe"
-O /dev/stdout) --output "${NewFileName}" -L
Which tells me "The page is temporarily unavailable"
Follow up:
Figured it out
Cmd="curl ${MaxTime2} '"$(wget --header="Referer:
http://www.fosshub.com/FreeFileSync.html" "${LatestPath}" -O
/dev/stdout)"' --output "${NewFileName}""
eval "{Cmd}"
Which looks like this when it expands:
curl --max-time 720
'http://files.fosshub.com/Protected/expiretime=1436041727;badurl=aHR0cDovL3d3dy5mb3NzaHViLmNvbS9GcmVlRmlsZVN5bmMuaHRtbA==/3ff68b9534495fe4fc47083c3ee381d6584fb0e095bc5f96bb691c0f1fcf9cb7/FreeFileSync/FreeFileSync_7.2_Win_Setup.exe'
--output
/home/CDs/Windows/FileSystem/FreeFileSync/FreeFileSync_7.2_Win_Setup.exe