Update: please see my more recent post
about updates in the interim.
If you use a computer and you use the Internet, chances are you’ll eventually
find some software that, for whatever reason, is still hosted on Sourceforge.
In case you’re not familiar with it, Sourceforge is a publicly-available
malware vector
that also sometimes contains useful open source binary downloads, especially
for Windows.
In addition to injecting malware into their downloads (a practice they claim,
hopefully truthfully, to have stopped), Sourceforge also presents an initial
download page over HTTPS, then redirects the user to HTTP for the download
itself, snatching defeat from the jaws of victory. This is fantastically
irresponsible, especially for a site offering un-sandboxed binaries for
download, especially in the era of Let’s Encrypt
where getting a TLS certificate takes
approximately thirty seconds and exactly zero dollars.
So: if you can possibly find your downloads anywhere else, go there.
But, rarely, you will find yourself at the mercy of whatever responsible
stewards are still operating Sourceforge if you want to get access to some
useful software. As it happens, there is a loophole that will let you
authenticate the binaries that you download from them so you won’t be left
vulnerable to an evil barista: their “file release system”, the thing you use
to upload your projects, will allow you to download other projects as well.
To use it, first,
make yourself a sourceforge account.
You may need to create a dummy project as well. Sourceforge maintains
an HTTPS-accessible list of key fingerprints
for all the SSH servers that they operate, so you can verify the public key
below.
Then you’ll need to connect to their upload server over SFTP, and go to the
path /home/frs/project/<the project’s name>/.../
to get the file.
I have written a little Python script that automates the translation of a
Sourceforge file-browser download URL, one that you can get if you right-click
on a download in the “files” section of a project’s website, and runs the
relevant scp
command to retrieve the file for you. This isn’t on PyPI or
anything, and I’m not putting any effort into polishing it further; the best
possible outcome of this blog post is that it immediately stops being
necessary.