{"id":16310,"date":"2021-05-20T13:21:21","date_gmt":"2021-05-20T11:21:21","guid":{"rendered":"https:\/\/daniel.haxx.se\/blog\/?p=16310"},"modified":"2024-05-20T08:59:13","modified_gmt":"2024-05-20T06:59:13","slug":"i-could-rewrite-curl","status":"publish","type":"post","link":"https:\/\/daniel.haxx.se\/blog\/2021\/05\/20\/i-could-rewrite-curl\/","title":{"rendered":"&#8220;I could rewrite curl&#8221;"},"content":{"rendered":"\n<p>Collected quotes and snippets from people publicly sneezing off or belittling what curl is, explaining how easy it would be to make a replacement in no time with no effort or generally not being very helpful.<\/p>\n\n\n\n<p>These are statements made seriously. For all I know, they were not ironic. If you find others to add here, please let me know!<\/p>\n\n\n\n<p>Listen. I&#8217;ve been young too once and I&#8217;ve probably <em>thought<\/em> similar things myself in the past. But there&#8217;s a huge difference between thinking and saying.  Quotes included here are mentioned for our collective amusement.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">I can do it in less than a 100 lines<\/h2>\n\n\n<div class=\"wp-block-image\">\n<figure data-wp-context=\"{&quot;imageId&quot;:&quot;69d9255f58042&quot;}\" data-wp-interactive=\"core\/image\" data-wp-key=\"69d9255f58042\" class=\"aligncenter size-large wp-lightbox-container\"><img loading=\"lazy\" decoding=\"async\" width=\"1557\" height=\"193\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/daniel.haxx.se\/blog\/wp-content\/uploads\/2021\/04\/http-client-in-less-than-100-lines.png\" alt=\"\" class=\"wp-image-16344\"\/><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\taria-label=\"Enlarge\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"state.imageButtonRight\"\n\t\t\tdata-wp-style--top=\"state.imageButtonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewBox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure>\n<\/div>\n\n\n<p>[<a href=\"https:\/\/lobste.rs\/s\/3efzcx\/half_curl_s_vulnerabilities_are_c#c_thn8oy\">source<\/a>]<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">I can do it in a three day weekend<\/h2>\n\n\n\n<p>(The yellow marking in the picture was added by me.)<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure data-wp-context=\"{&quot;imageId&quot;:&quot;69d9255f582cf&quot;}\" data-wp-interactive=\"core\/image\" data-wp-key=\"69d9255f582cf\" class=\"aligncenter size-large wp-lightbox-container\"><img loading=\"lazy\" decoding=\"async\" width=\"970\" height=\"138\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/daniel.haxx.se\/blog\/wp-content\/uploads\/2021\/04\/I-could-write-curl-in-a-3-day-weekend.png\" alt=\"\" class=\"wp-image-16345\"\/><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\taria-label=\"Enlarge\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"state.imageButtonRight\"\n\t\t\tdata-wp-style--top=\"state.imageButtonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewBox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure>\n<\/div>\n\n\n<p>[<a href=\"https:\/\/www.reddit.com\/r\/programming\/comments\/lnhcrc\/i_will_slaughter_you_daniel_stenberg_got_a_quite\/go13wmg\/?utm_source=reddit&amp;utm_medium=web2x&amp;context=3\">source<\/a>]<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">No reason to be written in C<\/h2>\n\n\n\n<p>Maybe not exactly in the same category as the two ones above, but still a significant &#8220;I know this&#8221; vibe:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure data-wp-context=\"{&quot;imageId&quot;:&quot;69d9255f585fd&quot;}\" data-wp-interactive=\"core\/image\" data-wp-key=\"69d9255f585fd\" class=\"aligncenter size-large wp-lightbox-container\"><img loading=\"lazy\" decoding=\"async\" width=\"952\" height=\"45\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/daniel.haxx.se\/blog\/wp-content\/uploads\/2021\/04\/Screenshot_2021-04-12-Its-really-easy-to-criticize-Why-dont-you-rewrite-curl-yourself-Instead-of-t-Hacker-News.png\" alt=\"\" class=\"wp-image-16368\"\/><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\taria-label=\"Enlarge\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"state.imageButtonRight\"\n\t\t\tdata-wp-style--top=\"state.imageButtonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewBox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure>\n<\/div>\n\n\n<p>[<a href=\"https:\/\/news.ycombinator.com\/item?id=13994774\">source<\/a>]<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">We sold a curl exploit<\/h2>\n\n\n\n<p>Some people deliberately decides to play for the other team.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure data-wp-context=\"{&quot;imageId&quot;:&quot;69d9255f58a33&quot;}\" data-wp-interactive=\"core\/image\" data-wp-key=\"69d9255f58a33\" class=\"aligncenter size-large is-resized wp-lightbox-container\"><img loading=\"lazy\" decoding=\"async\" width=\"792\" height=\"314\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/daniel.haxx.se\/blog\/wp-content\/uploads\/2021\/04\/Screenshot_2021-04-20-HOWTO-backdoor-curl-daniel-haxx-se.png\" alt=\"\" class=\"wp-image-16463\" style=\"width:690px;height:274px\"\/><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\taria-label=\"Enlarge\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"state.imageButtonRight\"\n\t\t\tdata-wp-style--top=\"state.imageButtonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewBox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure>\n<\/div>\n\n\n<p>[<a href=\"https:\/\/daniel.haxx.se\/blog\/2021\/03\/30\/howto-backdoor-curl\/#comment-24545\">source<\/a>]<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">This isn&#8217;t a big deal<\/h2>\n\n\n\n<p>It&#8217;s easy to say things on Twitter&#8230;<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><a href=\"https:\/\/daniel.haxx.se\/blog\/wp-content\/uploads\/2021\/05\/doesnt-take-a-genius.png\"><img loading=\"lazy\" decoding=\"async\" width=\"317\" height=\"206\" src=\"https:\/\/daniel.haxx.se\/blog\/wp-content\/uploads\/2021\/05\/doesnt-take-a-genius.png\" alt=\"\" class=\"wp-image-16608\"\/><\/a><\/figure>\n<\/div>\n\n\n<p>This tweet was removed by its author after I and others replied to it so I cannot link it. The name has been blurred on purpose because of this.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">100 lines of Python<\/h2>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><a href=\"https:\/\/daniel.haxx.se\/blog\/wp-content\/uploads\/2022\/12\/Screenshot-2022-12-30-at-23-51-36-Apple-has-shipped-and-used-curl-in-their-products-for-twenty-years-but-they-ne...-Hacker-News.png\"><img loading=\"lazy\" decoding=\"async\" width=\"936\" height=\"105\" src=\"https:\/\/daniel.haxx.se\/blog\/wp-content\/uploads\/2022\/12\/Screenshot-2022-12-30-at-23-51-36-Apple-has-shipped-and-used-curl-in-their-products-for-twenty-years-but-they-ne...-Hacker-News.png\" alt=\"\" class=\"wp-image-21272\"\/><\/a><\/figure>\n<\/div>\n\n\n<p>&#8220;I think you could replace 99% of the uses of Curl \u2026 with like 100 lines of Python or Rust or Go&#8221;<\/p>\n\n\n\n<p>[<a href=\"https:\/\/news.ycombinator.com\/item?id=34184966\">source<\/a>]<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">I should just fix curl<\/h2>\n\n\n\n<p>I reported a vulnerable old curl installation being hosted by nuget, only to get this user tell me&#8230; to fix the vulnerabilities we already fixed long ago.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><a href=\"https:\/\/twitter.com\/david43ni\/status\/1630839746934059008\"><img loading=\"lazy\" decoding=\"async\" width=\"816\" height=\"304\" src=\"https:\/\/daniel.haxx.se\/blog\/wp-content\/uploads\/2023\/03\/Screenshot-2023-03-01-at-09-01-41-david-on-Twitter.png\" alt=\"\" class=\"wp-image-21919\"\/><\/a><\/figure>\n<\/div>\n\n\n<h2 class=\"wp-block-heading\">Discussions<\/h2>\n\n\n\n<p><a href=\"https:\/\/news.ycombinator.com\/item?id=27220136\">Hacker news<\/a>, <a href=\"https:\/\/www.reddit.com\/r\/programming\/comments\/ngzdjx\/i_could_rewrite_curl\/\">Reddit<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Collected quotes and snippets from people publicly sneezing off or belittling what curl is, explaining how easy it would be to make a replacement in no time with no effort or generally not being very helpful. These are statements made seriously. For all I know, they were not ironic. If you find others to add &hellip; <a href=\"https:\/\/daniel.haxx.se\/blog\/2021\/05\/20\/i-could-rewrite-curl\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">&#8220;I could rewrite curl&#8221;<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[33,89],"class_list":["post-16310","post","type-post","status-publish","format-standard","hentry","category-curl","tag-curl-and-libcurl","tag-funny"],"_links":{"self":[{"href":"https:\/\/daniel.haxx.se\/blog\/wp-json\/wp\/v2\/posts\/16310","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/daniel.haxx.se\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/daniel.haxx.se\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/daniel.haxx.se\/blog\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/daniel.haxx.se\/blog\/wp-json\/wp\/v2\/comments?post=16310"}],"version-history":[{"count":37,"href":"https:\/\/daniel.haxx.se\/blog\/wp-json\/wp\/v2\/posts\/16310\/revisions"}],"predecessor-version":[{"id":24765,"href":"https:\/\/daniel.haxx.se\/blog\/wp-json\/wp\/v2\/posts\/16310\/revisions\/24765"}],"wp:attachment":[{"href":"https:\/\/daniel.haxx.se\/blog\/wp-json\/wp\/v2\/media?parent=16310"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/daniel.haxx.se\/blog\/wp-json\/wp\/v2\/categories?post=16310"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/daniel.haxx.se\/blog\/wp-json\/wp\/v2\/tags?post=16310"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}