{"id":153,"date":"2010-01-31T15:49:01","date_gmt":"2010-01-31T20:49:01","guid":{"rendered":"http:\/\/zitstif.no-ip.org\/?p=153"},"modified":"2010-01-31T16:01:54","modified_gmt":"2010-01-31T21:01:54","slug":"head-requests-on-multiple-web-servers-all-with-a-one-liner","status":"publish","type":"post","link":"http:\/\/zitstif.no-ip.org\/?p=153","title":{"rendered":"HEAD requests on multiple web servers, all with a one liner"},"content":{"rendered":"<p>If you need a quick way of getting server versions and you want to do this with a one liner here&#8217;s your solution:<\/p>\n<pre lang=\"bash\">for i in $(cat websites); do printf \"HEAD \/ HTTP1\/.0\\n\\r\\n\" | nc -vv ${i} 80; done<\/pre>\n<p>&#8216;websites&#8217;, would be a file that contains a list of websites either by domain names or IP addresses. You could also enumerate an array of websites for cases where you have stored output into an array. i.e.<\/p>\n<pre lang=\"bash\">array=($(cat \/var\/log\/apache2\/access.log | awk '{print $1}' | sort | uniq));\r\nfor i in ${array[@]}; do printf \"HEAD \/ HTTP\/1.0\\n\\r\\n\" | nc -vv ${i} 80; done<\/pre>\n<p>Lastly, a while back, I wrote a python script that does pretty much the same thing:<br \/>\nPlain text:<br \/>\n<a title=\"http:\/\/zitstif.no-ip.org\/webEnum.txt\" href=\"http:\/\/zitstif.no-ip.org\/webEnum.txt\" target=\"_blank\">http:\/\/zitstif.no-ip.org\/webEnum.txt<\/a><\/p>\n<p>tar archive:<br \/>\n<a title=\"http:\/\/zitstif.no-ip.org\/webEnum.tar\" href=\"http:\/\/zitstif.no-ip.org\/webEnum.tar\" target=\"_blank\">http:\/\/zitstif.no-ip.org\/webEnum.tar<\/a><br \/>\nMD5sum: dcb02fff9e69fb004c8e6456ed82c424<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you need a quick way of getting server versions and you want to do this with a one liner here&#8217;s your solution: for i in $(cat websites); do printf &#8220;HEAD \/ HTTP1\/.0\\n\\r\\n&#8221; | nc -vv ${i} 80; done &#8216;websites&#8217;, would be a file that contains a list of websites either by domain names or &hellip; <a href=\"http:\/\/zitstif.no-ip.org\/?p=153\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">HEAD requests on multiple web servers, all with a one liner<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11,3],"tags":[27,26,25,24],"class_list":["post-153","post","type-post","status-publish","format-standard","hentry","category-code","category-posts","tag-nc","tag-netcat","tag-py","tag-webenum"],"_links":{"self":[{"href":"http:\/\/zitstif.no-ip.org\/index.php?rest_route=\/wp\/v2\/posts\/153","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/zitstif.no-ip.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/zitstif.no-ip.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/zitstif.no-ip.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/zitstif.no-ip.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=153"}],"version-history":[{"count":5,"href":"http:\/\/zitstif.no-ip.org\/index.php?rest_route=\/wp\/v2\/posts\/153\/revisions"}],"predecessor-version":[{"id":160,"href":"http:\/\/zitstif.no-ip.org\/index.php?rest_route=\/wp\/v2\/posts\/153\/revisions\/160"}],"wp:attachment":[{"href":"http:\/\/zitstif.no-ip.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=153"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/zitstif.no-ip.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=153"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/zitstif.no-ip.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=153"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}