{"id":14064,"date":"2020-05-11T08:46:52","date_gmt":"2020-05-11T06:46:52","guid":{"rendered":"https:\/\/daniel.haxx.se\/blog\/?p=14064"},"modified":"2020-05-11T08:51:01","modified_gmt":"2020-05-11T06:51:01","slug":"manual-curl-curl","status":"publish","type":"post","link":"https:\/\/daniel.haxx.se\/blog\/2020\/05\/11\/manual-curl-curl\/","title":{"rendered":"Manual cURL cURL"},"content":{"rendered":"\n<div class=\"wp-block-image\"><figure class=\"alignright size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/daniel.haxx.se\/blog\/wp-content\/uploads\/2020\/05\/HP-CP3525-printer.jpg\" alt=\"\" class=\"wp-image-14082\" width=\"204\" height=\"198\" srcset=\"https:\/\/daniel.haxx.se\/blog\/wp-content\/uploads\/2020\/05\/HP-CP3525-printer.jpg 456w, https:\/\/daniel.haxx.se\/blog\/wp-content\/uploads\/2020\/05\/HP-CP3525-printer-450x436.jpg 450w, https:\/\/daniel.haxx.se\/blog\/wp-content\/uploads\/2020\/05\/HP-CP3525-printer-200x194.jpg 200w\" sizes=\"auto, (max-width: 204px) 100vw, 204px\" \/><\/figure><\/div>\n\n\n\n<p>The HP Color LaserJet CP3525 Printer looks like any other ordinary printer done by HP. But there&#8217;s a difference!<\/p>\n\n\n\n<p>A friend of mine fell over this gem, and told me. <\/p>\n\n\n\n<h2 class=\"wp-block-heading\">TCP\/IP Settings<\/h2>\n\n\n\n<p>If you go to the machine&#8217;s TCP\/IP settings using the built-in web server, the printer offers the ordinary network configure options but also one that sticks out a little exta. <em>The &#8220;Manual cURL cURL&#8221; option<\/em>! It looks like this:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1143\" height=\"686\" src=\"https:\/\/daniel.haxx.se\/blog\/wp-content\/uploads\/2020\/05\/HP-CP3525-TCP-IP-settings.png\" alt=\"\" class=\"wp-image-14085\" srcset=\"https:\/\/daniel.haxx.se\/blog\/wp-content\/uploads\/2020\/05\/HP-CP3525-TCP-IP-settings.png 1143w, https:\/\/daniel.haxx.se\/blog\/wp-content\/uploads\/2020\/05\/HP-CP3525-TCP-IP-settings-450x270.png 450w, https:\/\/daniel.haxx.se\/blog\/wp-content\/uploads\/2020\/05\/HP-CP3525-TCP-IP-settings-200x120.png 200w, https:\/\/daniel.haxx.se\/blog\/wp-content\/uploads\/2020\/05\/HP-CP3525-TCP-IP-settings-768x461.png 768w\" sizes=\"auto, (max-width: 1143px) 100vw, 1143px\" \/><\/figure>\n\n\n\n<p>I could easily confirm that this is genuine. I did this screenshot above by just googling for the string and printer model, since there appears to exist printers like this exposing their settings web server to the Internet. Hilarious!<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What?<\/h2>\n\n\n\n<p>How on earth did that string end up there? Certainly there&#8217;s no relation to curl at all except for the actual name used there? Is it a sign that there&#8217;s basically no humans left at HP that understand what the individual settings on that screen are actually meant for?<\/p>\n\n\n\n<p>Given the contents in the text field, a URL containing the letters WPAD twice, I can only presume this field is actually meant for <a href=\"https:\/\/en.wikipedia.org\/wiki\/Web_Proxy_Auto-Discovery_Protocol\">Web Proxy Auto-Discovery<\/a>. I spent some time trying to find the user manual for this printer configuration screen but failed. It would&#8217;ve been fun to find &#8220;manual cURL cURL&#8221; described in a manual! They do offer a busload of various <a href=\"https:\/\/support.hp.com\/us-en\/product\/hp-color-laserjet-cp3520-printer-series\/3690646\/model\/3690647\/manuals\">manuals<\/a>, maybe I just missed the right one.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Does it use curl?<\/h2>\n\n\n\n<p>Yes, it seems HP generally use curl at least as I found the &#8220;<a href=\"http:\/\/h10032.www1.hp.com\/ctg\/Manual\/c06087368\">Open-Source Software License Agreements for HP LaserJet and ScanJet Printers<\/a>&#8221; and it contains the curl license:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1013\" height=\"740\" src=\"https:\/\/daniel.haxx.se\/blog\/wp-content\/uploads\/2020\/05\/Screenshot_2020-05-11-Open-Source-Software-License-for-HP-LaserJet-and-HP-ScanJet-printers-c06087368.png\" alt=\"\" class=\"wp-image-14086\" srcset=\"https:\/\/daniel.haxx.se\/blog\/wp-content\/uploads\/2020\/05\/Screenshot_2020-05-11-Open-Source-Software-License-for-HP-LaserJet-and-HP-ScanJet-printers-c06087368.png 1013w, https:\/\/daniel.haxx.se\/blog\/wp-content\/uploads\/2020\/05\/Screenshot_2020-05-11-Open-Source-Software-License-for-HP-LaserJet-and-HP-ScanJet-printers-c06087368-450x329.png 450w, https:\/\/daniel.haxx.se\/blog\/wp-content\/uploads\/2020\/05\/Screenshot_2020-05-11-Open-Source-Software-License-for-HP-LaserJet-and-HP-ScanJet-printers-c06087368-200x146.png 200w, https:\/\/daniel.haxx.se\/blog\/wp-content\/uploads\/2020\/05\/Screenshot_2020-05-11-Open-Source-Software-License-for-HP-LaserJet-and-HP-ScanJet-printers-c06087368-768x561.png 768w\" sizes=\"auto, (max-width: 1013px) 100vw, 1013px\" \/><figcaption>The curl license as found in the HP printer open source report.<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">HP using curl for Print-Uri?<\/h2>\n\n\n\n<p>Independently, someone else recently told me about another possible HP + curl connection. This user said his HP printer makes HTTP requests using the user-agent <code>libcurl-agent\/1.0<\/code>:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"814\" height=\"137\" src=\"https:\/\/daniel.haxx.se\/blog\/wp-content\/uploads\/2020\/05\/HP-print-uri-libcurl-agent.png\" alt=\"\" class=\"wp-image-14087\" srcset=\"https:\/\/daniel.haxx.se\/blog\/wp-content\/uploads\/2020\/05\/HP-print-uri-libcurl-agent.png 814w, https:\/\/daniel.haxx.se\/blog\/wp-content\/uploads\/2020\/05\/HP-print-uri-libcurl-agent-450x76.png 450w, https:\/\/daniel.haxx.se\/blog\/wp-content\/uploads\/2020\/05\/HP-print-uri-libcurl-agent-200x34.png 200w, https:\/\/daniel.haxx.se\/blog\/wp-content\/uploads\/2020\/05\/HP-print-uri-libcurl-agent-768x129.png 768w\" sizes=\"auto, (max-width: 814px) 100vw, 814px\" \/><\/figure>\n\n\n\n<p>I haven&#8217;t managed to get this confirmed by anyone else (although the license snippet above certainly implies they use curl) and that particular user-agent string has been used everywhere for a long time, as I believe it is copied widely from the popular libcurl example <a href=\"https:\/\/curl.haxx.se\/libcurl\/c\/getinmemory.html\">getinmemory.c<\/a> where I made up the user-agent and put it there already in 2004.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Credits<\/h2>\n\n\n\n<p>Frank Gevaerts tricked me into going down this rabbit hole as he told me about this string.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The HP Color LaserJet CP3525 Printer looks like any other ordinary printer done by HP. But there&#8217;s a difference! A friend of mine fell over this gem, and told me. TCP\/IP Settings If you go to the machine&#8217;s TCP\/IP settings using the built-in web server, the printer offers the ordinary network configure options but also &hellip; <a href=\"https:\/\/daniel.haxx.se\/blog\/2020\/05\/11\/manual-curl-curl\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Manual cURL cURL<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":5,"featured_media":11315,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[33,89,299],"class_list":["post-14064","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-curl","tag-curl-and-libcurl","tag-funny","tag-printer"],"_links":{"self":[{"href":"https:\/\/daniel.haxx.se\/blog\/wp-json\/wp\/v2\/posts\/14064","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=14064"}],"version-history":[{"count":8,"href":"https:\/\/daniel.haxx.se\/blog\/wp-json\/wp\/v2\/posts\/14064\/revisions"}],"predecessor-version":[{"id":14092,"href":"https:\/\/daniel.haxx.se\/blog\/wp-json\/wp\/v2\/posts\/14064\/revisions\/14092"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/daniel.haxx.se\/blog\/wp-json\/wp\/v2\/media\/11315"}],"wp:attachment":[{"href":"https:\/\/daniel.haxx.se\/blog\/wp-json\/wp\/v2\/media?parent=14064"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/daniel.haxx.se\/blog\/wp-json\/wp\/v2\/categories?post=14064"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/daniel.haxx.se\/blog\/wp-json\/wp\/v2\/tags?post=14064"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}