6 ms·
Mitigation: wget.
by javajosh 14y ago
Mitigation: wget.
- jeswin 14y agocurl is still the best tool for file downloads. wget lacks some fairly important features, like limiting the size downloads. To be checked if you are worried about bandwidth or disk quota.
- barrkel 14y agocurl --max-filesize: "NOTE: The file size is not always known prior to download, and for such files this option has no effect even if the file transfer ends up being larger than this given limit. This concerns both FTP and HTTP transfers." wget --quota: "Note that quota will never affect downloading a single file. However, quota is respected when retrieving either recursively, or from an input file." These options are not that much different in practice. If single-file size is uber-important, pipe it through something that will break the pipe after the limit point. For ad-hoc scripting usage, wget is almost always more usable than curl IMO. Of course, wget isn't a library.
- ibrahima 14y agoThis is a flaw in libcURL, and last I checked wget was just a binary, not a cross platform library.
- X-Istence 14y agoNot having wget installed stops about 60% of the PHP shell scripts I've seen dropped on servers.
- dchest 14y agoNot having PHP installed stops 100% of them.
- contingencies 14y agoLess snarky and more portable option: avoid webserver-writeable directories.
- X-Istence 14y agoNot all of us get to be so lucky.