tag:support.arachni-scanner.com,2012-07-01:/discussions/questions/39-first-bytes-of-binary-files-on-httpresponse-are-wrongArachni: Discussion 2012-11-07T11:05:14Ztag:support.arachni-scanner.com,2012-07-01:Comment/205013202012-11-06T12:20:42Z2012-11-06T12:20:42ZFirst bytes of Binary files on http.response are wrong<div><p>Actually, I've sort of seen this before when using the Proxy
plugin, for some reason the images get corrupted. I'll look into
it.</p></div>Tasos Laskostag:support.arachni-scanner.com,2012-07-01:Comment/205013202012-11-06T22:50:27Z2012-11-06T22:50:27ZFirst bytes of Binary files on http.response are wrong<div><p>Fixed in the distributed crawler's branch,</p></div>Tasos Laskostag:support.arachni-scanner.com,2012-07-01:Comment/205013202012-11-07T07:16:43Z2012-11-07T07:16:44ZFirst bytes of Binary files on http.response are wrong<div><p>Nice Job !</p>
<p>Could you explain what's wrong ? I've digged up in your code and
cant find the problem.</p></div>beunwatag:support.arachni-scanner.com,2012-07-01:Comment/205013202012-11-07T11:03:18Z2012-11-07T11:05:14ZFirst bytes of Binary files on http.response are wrong<div><p><a href=
"https://github.com/Arachni/arachni/commit/867d2e2ea848f71de3cd042d1e8c8eda62d27cb7">
https://github.com/Arachni/arachni/commit/867d2e2ea848f71de3cd042d1...</a></p>
<p>Some time ago a user was reporting encoding errors so we started
sanitizing everything in an effort to find out how the bad chars
were getting through.<br>
Turns out the problem was environmental because it eventually went
away on its own but the sanitization code remained in the repo and
was corrupting binary files.</p>
<p>Maybe repacking the bytes is too harsh, I may dial it down to
forcing the HTTP responses to UTF8.</p>
<p>PS. See <code>String#repack</code>: <a href=
"https://github.com/Arachni/arachni/blob/feature/distributed-crawling/lib/arachni/ruby/string.rb#L98">
https://github.com/Arachni/arachni/blob/feature/distributed-crawlin...</a></p></div>Tasos Laskos