<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: bgrep &#8211; A Binary Grep</title>
	<atom:link href="http://debugmo.de/2009/04/bgrep-a-binary-grep/feed/" rel="self" type="application/rss+xml" />
	<link>http://debugmo.de/2009/04/bgrep-a-binary-grep/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=bgrep-a-binary-grep</link>
	<description>Projects, hardware fun and everything between it.</description>
	<lastBuildDate>Mon, 09 Aug 2010 15:08:37 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: jal</title>
		<link>http://debugmo.de/2009/04/bgrep-a-binary-grep/comment-page-1/#comment-8232</link>
		<dc:creator>jal</dc:creator>
		<pubDate>Mon, 12 Jul 2010 10:11:15 +0000</pubDate>
		<guid isPermaLink="false">http://debugmo.de/?p=100#comment-8232</guid>
		<description>patch for large file : 

#define _FILE_OFFSET_BITS 64</description>
		<content:encoded><![CDATA[<p>patch for large file : </p>
<p>#define _FILE_OFFSET_BITS 64</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: lirel</title>
		<link>http://debugmo.de/2009/04/bgrep-a-binary-grep/comment-page-1/#comment-8212</link>
		<dc:creator>lirel</dc:creator>
		<pubDate>Thu, 10 Jun 2010 23:04:03 +0000</pubDate>
		<guid isPermaLink="false">http://debugmo.de/?p=100#comment-8212</guid>
		<description>this is how i search for my cryptsetup &lt;acronym title=&quot;Linux Unified Key Setup&quot;&gt;LUKS&lt;acronym&gt; header after loosing my partition table:
&lt;code&gt;sudo dd if=/dev/sda bs=512&#124; ./bgrep 4c554b53babe000174776f6669736800&lt;/code&gt;
for twofisch
and generic luks magic + version number:
&lt;code&gt;sudo dd if=/dev/sda bs=512&#124; ./bgrep 4c554b53babe0001&lt;/code&gt;

i wonder if it gets faster when the seachstring is longer?</description>
		<content:encoded><![CDATA[<p>this is how i search for my cryptsetup <acronym title="Linux Unified Key Setup">LUKS</acronym><acronym> header after loosing my partition table:<br />
<code>sudo dd if=/dev/sda bs=512| ./bgrep 4c554b53babe000174776f6669736800</code><br />
for twofisch<br />
and generic luks magic + version number:<br />
<code>sudo dd if=/dev/sda bs=512| ./bgrep 4c554b53babe0001</code></p>
<p>i wonder if it gets faster when the seachstring is longer?</acronym></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Міша</title>
		<link>http://debugmo.de/2009/04/bgrep-a-binary-grep/comment-page-1/#comment-8209</link>
		<dc:creator>Міша</dc:creator>
		<pubDate>Mon, 24 May 2010 19:59:00 +0000</pubDate>
		<guid isPermaLink="false">http://debugmo.de/?p=100#comment-8209</guid>
		<description>Great!

Some comments, though:

a) it should, probably, use mmap() by default, instead of reading into buffer;
b) it should be possible to specify the offset at which to begin (and end) searching as options;
c) it should be possible to specify the filename into which the bytes starting from the matched sequence up to the specified size will be written; knowing the offset from bgrep, one can do this with dd, but doing it in one operation would be nicer.</description>
		<content:encoded><![CDATA[<p>Great!</p>
<p>Some comments, though:</p>
<p>a) it should, probably, use mmap() by default, instead of reading into buffer;<br />
b) it should be possible to specify the offset at which to begin (and end) searching as options;<br />
c) it should be possible to specify the filename into which the bytes starting from the matched sequence up to the specified size will be written; knowing the offset from bgrep, one can do this with dd, but doing it in one operation would be nicer.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sancho</title>
		<link>http://debugmo.de/2009/04/bgrep-a-binary-grep/comment-page-1/#comment-6665</link>
		<dc:creator>Sancho</dc:creator>
		<pubDate>Mon, 23 Nov 2009 19:23:47 +0000</pubDate>
		<guid isPermaLink="false">http://debugmo.de/?p=100#comment-6665</guid>
		<description>When working in a 64bit environ, make sure to include:glibc-devel-64bit*.rpm otherwise the buffer wraps for the offset as shown: 
dd if=/dev/sdso bs=262144 &#124;./bgrep 025e001900000078
stdin: 09a50000
21786+0 records in
21785+0 records out
5710807040 bytes (5.7 GB) copied, 411.014 seconds, 13.9 MB/s

The record was at 4.250GB offset 0x109a50000 yet bgrep reported 0x09a50000

After loading the 64bit glibc-devel:
gcc -O3 -m64 bgrep.c -o bgrep
dd if=/dev/sdso bs=1048576 count=4255&#124;./bgrep 025e001900000078
stdin: 109a50000
4255+0 records in
4255+0 records out
4461690880 bytes (4.5 GB) copied, 79.261 seconds, 56.3 MB/s

Thanks for the awesome tool</description>
		<content:encoded><![CDATA[<p>When working in a 64bit environ, make sure to include:glibc-devel-64bit*.rpm otherwise the buffer wraps for the offset as shown:<br />
dd if=/dev/sdso bs=262144 |./bgrep 025e001900000078<br />
stdin: 09a50000<br />
21786+0 records in<br />
21785+0 records out<br />
5710807040 bytes (5.7 GB) copied, 411.014 seconds, 13.9 MB/s</p>
<p>The record was at 4.250GB offset 0&#215;109a50000 yet bgrep reported 0&#215;09a50000</p>
<p>After loading the 64bit glibc-devel:<br />
gcc -O3 -m64 bgrep.c -o bgrep<br />
dd if=/dev/sdso bs=1048576 count=4255|./bgrep 025e001900000078<br />
stdin: 109a50000<br />
4255+0 records in<br />
4255+0 records out<br />
4461690880 bytes (4.5 GB) copied, 79.261 seconds, 56.3 MB/s</p>
<p>Thanks for the awesome tool</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bja888</title>
		<link>http://debugmo.de/2009/04/bgrep-a-binary-grep/comment-page-1/#comment-6663</link>
		<dc:creator>bja888</dc:creator>
		<pubDate>Mon, 16 Nov 2009 14:26:26 +0000</pubDate>
		<guid isPermaLink="false">http://debugmo.de/?p=100#comment-6663</guid>
		<description>Another thank you!</description>
		<content:encoded><![CDATA[<p>Another thank you!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bgrep二进制搜索 &#124; 偶爱背单词</title>
		<link>http://debugmo.de/2009/04/bgrep-a-binary-grep/comment-page-1/#comment-6309</link>
		<dc:creator>bgrep二进制搜索 &#124; 偶爱背单词</dc:creator>
		<pubDate>Fri, 11 Sep 2009 07:44:13 +0000</pubDate>
		<guid isPermaLink="false">http://debugmo.de/?p=100#comment-6309</guid>
		<description>[...] http://debugmo.de/?p=100 ，可以用mingw编译windows版本。 // Written in April 2009 by Felix Domke [...]</description>
		<content:encoded><![CDATA[<p>[...] <a href="http://debugmo.de/?p=100" rel="nofollow">http://debugmo.de/?p=100</a> ，可以用mingw编译windows版本。 // Written in April 2009 by Felix Domke [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sh</title>
		<link>http://debugmo.de/2009/04/bgrep-a-binary-grep/comment-page-1/#comment-6007</link>
		<dc:creator>sh</dc:creator>
		<pubDate>Thu, 20 Aug 2009 07:38:57 +0000</pubDate>
		<guid isPermaLink="false">http://debugmo.de/?p=100#comment-6007</guid>
		<description>GNU grep does support binary string search when using Perl regex. Just use the -P option.

[sh@pc ~]$ grep -slrP &#039;\x05\x00\xc0&#039; /boot
/boot/vmlinuz-2.6.29.5-191.fc11.x86_64
/boot/grub/ffs_stage1_5
/boot/grub/ufs2_stage1_5
/boot/grub/stage2
/boot/vmlinuz-2.6.29.4-167.fc11.x86_64
/boot/efi/EFI/redhat/grub.efi
/boot/vmlinuz-2.6.29.6-213.fc11.x86_64</description>
		<content:encoded><![CDATA[<p>GNU grep does support binary string search when using Perl regex. Just use the -P option.</p>
<p>[sh@pc ~]$ grep -slrP &#8216;\x05\x00\xc0&#8242; /boot<br />
/boot/vmlinuz-2.6.29.5-191.fc11.x86_64<br />
/boot/grub/ffs_stage1_5<br />
/boot/grub/ufs2_stage1_5<br />
/boot/grub/stage2<br />
/boot/vmlinuz-2.6.29.4-167.fc11.x86_64<br />
/boot/efi/EFI/redhat/grub.efi<br />
/boot/vmlinuz-2.6.29.6-213.fc11.x86_64</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: nemo</title>
		<link>http://debugmo.de/2009/04/bgrep-a-binary-grep/comment-page-1/#comment-5204</link>
		<dc:creator>nemo</dc:creator>
		<pubDate>Sun, 05 Jul 2009 23:49:04 +0000</pubDate>
		<guid isPermaLink="false">http://debugmo.de/?p=100#comment-5204</guid>
		<description>tmbinc: oh, somewhere along the line I totally missed the recursiveness of bgrep. lovelier and lovelier =)</description>
		<content:encoded><![CDATA[<p>tmbinc: oh, somewhere along the line I totally missed the recursiveness of bgrep. lovelier and lovelier =)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tmbinc</title>
		<link>http://debugmo.de/2009/04/bgrep-a-binary-grep/comment-page-1/#comment-5085</link>
		<dc:creator>tmbinc</dc:creator>
		<pubDate>Wed, 01 Jul 2009 13:39:37 +0000</pubDate>
		<guid isPermaLink="false">http://debugmo.de/?p=100#comment-5085</guid>
		<description>Nemo: bgrep can also recursively look for files, so a &quot;bgrep 504B0304 .&quot; should do the same as your &quot;find . -type f -print0 &#124; xargs -n1 -0 bgrep 504B0304&quot;.</description>
		<content:encoded><![CDATA[<p>Nemo: bgrep can also recursively look for files, so a &#8220;bgrep 504B0304 .&#8221; should do the same as your &#8220;find . -type f -print0 | xargs -n1 -0 bgrep 504B0304&#8243;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: thorx.net &#187; Blog Archive &#187; binary grep to find mp3s stored in zip</title>
		<link>http://debugmo.de/2009/04/bgrep-a-binary-grep/comment-page-1/#comment-5084</link>
		<dc:creator>thorx.net &#187; Blog Archive &#187; binary grep to find mp3s stored in zip</dc:creator>
		<pubDate>Wed, 01 Jul 2009 13:22:13 +0000</pubDate>
		<guid isPermaLink="false">http://debugmo.de/?p=100#comment-5084</guid>
		<description>[...] like all good problems, someone had scratched this ones itch - and I quickly found bgrep. (Here is the link again and in the clear, because this is the central point of this blog:  [...]</description>
		<content:encoded><![CDATA[<p>[...] like all good problems, someone had scratched this ones itch &#8211; and I quickly found bgrep. (Here is the link again and in the clear, because this is the central point of this blog:  [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
