Motivation

For whatever reason (save bandwidth?) Mathematica download links are encrypted and hidden in user’s portal. Only authorized users are able to download the huge file. The link also expires after a while. Say that you download Mathematica to a laptop and have finished 80% in 3 hours. If you close the lid (Yes, that’s me), you have to restart the download again since the original link is expired. Say you need to download Mathematica to a Linux workstation in your office while you are working at home. Due to typically slow upload speed at home, huge time and bandwidth would be wasted if you download to your home and upload to your office.

Prerequisit

  • curl
  • Firefox

Download using Firefox

  • Open Firefox and login to your user’s portal.
  • Proceed to the download page
  • Click on Menu -> Web Developer -> Network
  • Click on Download and a download dialog pops up
  • Cancel the download
  • Locate the requested url(starts with les.wolframcdn.com), right click -> Copy -> Copy as cURL.
  • Open terminal in remote computer
  • Type
    nohup paste-the-command > filename.SHorDMGorEXE &
    

Why it works

Copy as cURL translates the http request done by Firefox to the format recognizable by curl. It carries all the authorizations needed by Wolfram. In fact, wolfram do not rely on the headers, etc. You could simply copy the regenerated url ony and use

nohup curl https://files.wolframcdn.com/Mathematica/12.2.0.0/Mathematica_12.2.0_LINUX.sh\?short-time-super-long-hash.sh >math.sh &

to download. This hash is only valid for a few minutes.