{"id":52,"date":"2008-10-21T05:05:00","date_gmt":"2008-10-21T10:05:00","guid":{"rendered":"http:\/\/www.rajatswarup.com\/blog\/?p=52"},"modified":"2010-02-10T23:38:16","modified_gmt":"2010-02-11T04:38:16","slug":"gooscan-compilation-errors","status":"publish","type":"post","link":"https:\/\/www.rajatswarup.com\/blog\/2008\/10\/21\/gooscan-compilation-errors\/","title":{"rendered":"GooScan compilation errors"},"content":{"rendered":"<p>I was just browsing away when I stumbled upon <a href=\"http:\/\/johnny.ihackstuff.com\/downloads\/task,doc_download\/gid,28\/\">Johnny Long&#8217;s GooScan<\/a>.  He says that this is a Linux only tool but it seems to compile (not without problems though) on cygwin. <br \/>I kept getting the following errors:<\/p>\n<pre><br \/>L:\\tools\\gooscan-v1.0.9>gcc gooscan.c<br \/>gooscan.c: In function `inet_send':<br \/>gooscan.c:575: error: `MSG_WAITALL' undeclared (first <br \/>                       use in this function)<br \/>gooscan.c:575: error: (Each undeclared identifier is <br \/>                       reported only once<br \/>gooscan.c:575: error: for each function it appears in.)<br \/><\/pre>\n<p>Then I read somewhere that MSG_WAITALL is not defined for Cygwin and that instead of that zero would work.  There are many neater solutions to this&#8230;but I&#8217;m a hacker and I&#8217;ll do the stuff that&#8217;s easiest and hassle-free.  <br \/>Some people say that the following will work:<br \/>#ifdef __CYGWIN__<br \/>#define MSG_WAITALL 0<\/p>\n<p>So in order to compile this bad boy, you need to goto line 574 in your favorite editor.  <br \/>It looks like this:<br \/>recv(sock, recvbuf, sizeof(recvbuf), MSG_WAITALL);<\/p>\n<p>You need to make it look like this:<br \/>recv(sock, recvbuf, sizeof(recvbuf), 0);\/\/MSG_WAITALL);<\/p>\n<p>You are all set:<br \/>gcc gooscan.c -o gooscan.exe <\/p>\n<p>Compilation works!  But then I observed that the results were not coming well.  However, if you run it through a local proxy such as <a href=\"http:\/\/portswigger.net\">burp<\/a> it still works&#8230;I bet it has something to do with socket establishment and receiving and being incompatible with the MSG_WAITALL flag.  <br \/>But as long as you can get the results &#8230; who cares? If someone figures out exactly how to make this work, please post it as a comment.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I was just browsing away when I stumbled upon Johnny Long&#8217;s GooScan. He says that this is a Linux only tool but it seems to compile (not without problems though) on cygwin. I kept getting the following errors: L:\\tools\\gooscan-v1.0.9>gcc gooscan.cgooscan.c: In function `inet_send&#8217;:gooscan.c:575: error: `MSG_WAITALL&#8217; undeclared (first use in this function)gooscan.c:575: error: (Each undeclared identifier [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[197],"tags":[270,465],"class_list":["post-52","post","type-post","status-publish","format-standard","hentry","category-tools","tag-gooscan","tag-tools"],"_links":{"self":[{"href":"https:\/\/www.rajatswarup.com\/blog\/wp-json\/wp\/v2\/posts\/52","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rajatswarup.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rajatswarup.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rajatswarup.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rajatswarup.com\/blog\/wp-json\/wp\/v2\/comments?post=52"}],"version-history":[{"count":2,"href":"https:\/\/www.rajatswarup.com\/blog\/wp-json\/wp\/v2\/posts\/52\/revisions"}],"predecessor-version":[{"id":117,"href":"https:\/\/www.rajatswarup.com\/blog\/wp-json\/wp\/v2\/posts\/52\/revisions\/117"}],"wp:attachment":[{"href":"https:\/\/www.rajatswarup.com\/blog\/wp-json\/wp\/v2\/media?parent=52"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rajatswarup.com\/blog\/wp-json\/wp\/v2\/categories?post=52"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rajatswarup.com\/blog\/wp-json\/wp\/v2\/tags?post=52"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}