News for hackers. Stuff that matters.
Re:Curl 7.51.0 Released by du_bing on Wednesday November 02, 2016 @06:09AM (#12853359)
What is the biggest usage of Curl? I am new to Linux,sorry.
Re:Curl 7.51.0 Released by hannob on Wednesday November 02, 2016 @06:20AM (#12853404)
The biggest usage is probably not the tool itself, but the library.

It's the de-facto-standard-HTTP-library (although it does more than just HTTP). E.g. if you have a PHP script that downloads some data from another webpage it very often does this with curl.

Re:Curl 7.51.0 Released by thejosh on Wednesday November 02, 2016 @06:20AM (#12853405)
Apart from the oodles of software that depends on curl/libcurl, my favourite thing is to "Copy as cURL" from a Chrome request.
Re:Curl 7.51.0 Released by dorfsmay on Wednesday November 02, 2016 @07:27AM (#12853671)
Or Firefox, but yes, first to debug all web bugs!
Re:Curl 7.51.0 Released by SturgeonsLaw on Wednesday November 02, 2016 @06:18AM (#12853399)
It's handy for giving an API endpoint a slap without needing a scripting language
Re:Curl 7.51.0 Released by 72deluxe on Wednesday November 02, 2016 @06:39AM (#12853470)
The underlying library (libcurl) is extremely useful on all platforms, not just Linux.
Re:Curl 7.51.0 Released by 0xmohit on Wednesday November 02, 2016 @10:42AM (#12855204)
I find it very useful for debugging. For example, when you have a web server that redirects requests saying:

  curl --verbose --location URL
or even

  curl --trace --location URL
provides the desired information.
Re:Curl 7.51.0 Released by AstroJetson on Wednesday November 02, 2016 @06:13AM (#12853376)
Data transfer by many protocols using URLs. See their website https://curl.haxx.se for details.

Super tool, we use it all the time for file transfers

Re:Curl 7.51.0 Released by gnur on Wednesday November 02, 2016 @06:16AM (#12853393)
I use for a few things, almost every day.

Getting my outgoing ip address (to check net connectivity): curl ip.mydomain.net or (to force ipv4) curl -4 ip.mydomain.net

To check how a page redirects: curl -v example.com (shows headers)

Interacting with elasticsearch, mainly showing indexes and their health: curl localhost:9200/_cat/indices

Re:Curl 7.51.0 Released by dorfsmay on Wednesday November 02, 2016 @07:32AM (#12853698)
It's used to send an http/HTTPS reqeuests, controlling every aspect of it, form headers to cookies, to ignoring/not SSL certs, and has advanced debugging option to show you the entire dialog (-sv) and use a different IP address (--resolve to test you firewalls, LBs etc...).
Re:Curl 7.51.0 Released by sglane on Wednesday November 02, 2016 @02:14PM (#12857694)
It sure does quite a lot and I love it, but I wish it could handle SIP and WebSockets without too much trouble.
Re:Curl 7.51.0 Released by erelde on Wednesday November 02, 2016 @06:19AM (#12853401)
File transfers, getting http headers, getting html content of a page piping it to a script to clean it up and read later (long articles).

That's what I use it for, I think, mainly.

Edit: also between php scripts

Re:Curl 7.51.0 Released by SFJulie on Wednesday November 02, 2016 @07:12AM (#12853599)
curl is a trusted way to execute unsafe code on the internet

https://gnu.moe/wallofshame.md

Re:Curl 7.51.0 Released by geofft on Wednesday November 02, 2016 @10:45AM (#12855247)
"curl | sh" is no worse than "wget && tar xf && ./configure". I have yet to see anyone who knows how to audit a configure script generated by GNU autoconf, which is generally a multiple-tens-of-thousands-of-line monstrosity that generates a bunch of C files and compiles and runs them. FUD about "curl | sh" isn't rooted in any sensible security modeling.

As a general rule of thumb, if you think everyone around you is independently doing something stupid, you should first pursue the hypothesis that it is your reasoning that is flawed and not the entire rest of the world's.

Re:Curl 7.51.0 Released by feld on Thursday November 03, 2016 @10:50AM (#12864378)
But you're verifying the signature of the tarball first, right?
Re:Curl 7.51.0 Released by geofft on Thursday November 03, 2016 @11:43AM (#12864914)
Almost all of the examples on that page use curl https:// | sh. Which, again, makes it a superior option to wget && gpg --verify && ./configure; I have yet to see anyone who is better at PGP fingerprint verification than their OS's SSL stack is at TLS certificate verification. (There are a very small number of people who are as good, but not better.)