News for hackers. Stuff that matters.
Re:You cannot cURL under pressure by tyingq on Saturday October 12, 2019 @09:33AM (#21232976)
I do find myself using wget to download things because I don't have to remember the curl option to follow redirects, and wget saves the file using the same name as the last bit of the uri.
Re:You cannot cURL under pressure by why-oh-why on Saturday October 12, 2019 @09:41AM (#21233031)
Which makes sense. cURL is a relatively “dumb” request tool.

Same goes for youtube-dl versus wget. The latter is a relatively “dumb” download tool.

Re:You cannot cURL under pressure by dijit on Saturday October 12, 2019 @09:39AM (#21233016)
curl follows redirects, `curl -O` is functionally identical to wget.

Unless I'm missing something in your statement.

Re:You cannot cURL under pressure by deepersprout on Saturday October 12, 2019 @09:45AM (#21233055)
> curl follows redirects, `curl -O` is functionally identical to wget.

No it's not :)

You need to `curl -LO`. See for example github releases:

  curl -LO https://github.com/S2-/gitlit/releases/download/v1.4.1/gitlit-1.4.1.tar.gz
downloads the tar.gz, while

  curl -O https://github.com/S2-/gitlit/releases/download/v1.4.1/gitlit-1.4.1.tar.gz
will download an html file.

Even better would be to use `curl -LOJ`, so if the filename is not in the url, but in the `Content-Disposition filename` http response header, curl would get the filename from there.

Re:You cannot cURL under pressure by tyingq on Saturday October 12, 2019 @10:03AM (#21233172)
Pretty good overview of why I just use wget for such things.
Re:You cannot cURL under pressure by tyingq on Saturday October 12, 2019 @10:01AM (#21233162)
"because I don't have to remember the curl option to follow redirects"
Re:You cannot cURL under pressure by swiley on Saturday October 12, 2019 @10:54AM (#21233600)
curl follows standard redirects but there are a couple of fairly common redirects that it doesn't.

--Someone who built a browser on libcurl

Re:You cannot cURL under pressure by Nextgrid on Saturday October 12, 2019 @11:08AM (#21233718)
Just FYI, there's a way to get to the QEMU console with a certain keyboard shortcut. There could be potential for mischief (if you are logging the sessions look at the one that ended just now with "too much data written to the terminal", that was me trying to attach the host's /etc/passwd as a raw disk image to the VM).
Re:You cannot cURL under pressure by Sir_Cmpwn on Saturday October 12, 2019 @11:12AM (#21233746)
Heh, I was just trying to do the same:

https://sr.ht/O2oy.png

Ben: you can fix this by adding -monitor none to your qemu command line.

Re:You cannot cURL under pressure by Nextgrid on Saturday October 12, 2019 @11:19AM (#21233803)
Even with that disabled I still wouldn't trust it (QEMU devs didn't originally plan for its stdin to be attacker-controlled, so there could be subtle bugs even with monitor disabled - remember the GRUB bug where you could bypass the password with specific keystrokes). I would've personally made it to simulate a serial port to the guest and the browser-based console being connected to that.
Re:You cannot cURL under pressure by Sir_Cmpwn on Saturday October 12, 2019 @11:20AM (#21233809)
Yeah, that would be wise.
Re:You cannot cURL under pressure by garaetjjte on Saturday October 12, 2019 @09:38AM (#21233010)
Cool, but I think spawning VMs on server is overkill for that. It should be possible to build cURL with Emscripten with fake socket interface to verify requests.
Re:You cannot cURL under pressure by likeliv on Saturday October 12, 2019 @05:34PM (#21236519)
Why boot many VM instead of saving the state and restoring from there?