debian/0000775000000000000000000000000012260307266007174 5ustar debian/copyright0000664000000000000000000000236712114401210011115 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0 Upstream-Name: bbe Upstream-Contact: Timo Savinen Source: http://freecode.com/projects/bbe X-Source: http://sourceforge.net/projects/bbe-/ Comment: Files: * Copyright: 2010 Timo Savinen , License: GPL-2+ Files: debian/* Copyright: 2013 Jari Aalto 2006,2008 Aurélien GÉRÔME 2005 David Moreno Garza License: GPL-2+ License: GPL-2+ This package is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. . This package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. . You should have received a copy of the GNU General Public License along with this program. If not, see . . On Debian systems, the complete text of the GNU General Public License can be found in "/usr/share/common-licenses/GPL-2". debian/info0000664000000000000000000000001512114401210010024 0ustar doc/bbe.info debian/changelog0000664000000000000000000000501012260307225011035 0ustar bbe (0.2.2-2ubuntu1) trusty; urgency=low * Use dh_autotools-dev for newer ports, resolving FTBFS. -- Daniel T Chen Mon, 30 Dec 2013 10:04:01 -0500 bbe (0.2.2-2) unstable; urgency=low * New maintainer (Closes: #677763). - Move to packaging format "3.0 (quilt)". - Use hardened build flags http://wiki.debian.org/ReleaseGoals/SecurityHardeningBuildFlags * debian/compat - Update to 9. * debian/control - (Build-Depends): update to debhelper 9. - (Depends): Add ${misc:Depends}. - (DM-Upload-Allowed): Delete. - (Homepage): Update to Freshmeat. - (Maintainer): Set to QA group. - (Standards-Version): Update to . - (Vcs-*): Move URLs to point to Debian Alioth. * debian/copyright - Update to format 1.0. * debian/doc-base - New file. * debian/patches - (10): New. Correct typos in manual page (Closes: #637106). Patch thanks to A. Costa" . - (20): New. Changes generated by Makefile from doc/*.{info,texi}. * debian/rules - Update to dh(1). - Delete dir.gz from info directory (Closes: #597451). * debian/source/format - New file. -- Jari Aalto Sat, 02 Mar 2013 15:45:31 +0200 bbe (0.2.2-1) unstable; urgency=low * New upstream release. (Closes: #399577) * Update debian/watch file. (Closes: #450295) * Update upstream URL in debian/copyright. * Fix FTBFS when built twice in a row. (Closes: #424141, #442505) + Add Build-Depends on texinfo. + Move upstream doc/bbe.html out of the way during the build process. * Remove unneeded Build-Depends on autotools-dev. * Bump Standards-Version to 3.7.3. * Add the Homepage field and remove it from the long description. * Add the Vcs-Git/Vcs-Browser fields. * Add the DM-Upload-Allowed field. * Fix lintian warning "debian-rules-ignores-make-clean-error line 43". -- Aurélien GÉRÔME Tue, 05 Feb 2008 20:46:17 +0100 bbe (0.1.9-1) unstable; urgency=low * New maintainer. (Closes: #388074) * New upstream release. (Closes: #389989) * Update Standards-Version to 3.7.2. * Update package description with project homepage. * Add debian/watch file. -- Aurélien GÉRÔME Sun, 15 Oct 2006 19:01:38 +0200 bbe (0.1.8-1) unstable; urgency=low * New upstream release -- David Moreno Garza Thu, 22 Dec 2005 19:06:17 -0600 bbe (0.1.4-1) unstable; urgency=low * Initial release. -- David Moreno Garza Sun, 16 Oct 2005 13:26:35 -0500 debian/dirs0000664000000000000000000000001012114401210010025 0ustar usr/bin debian/docs0000664000000000000000000000001412114401210010020 0ustar NEWS README debian/patches/0000775000000000000000000000000012114401210010601 5ustar debian/patches/10-manpage.patch0000664000000000000000000001412212114401210013450 0ustar From: A. Costa Subject: Correct typos --- doc/bbe.1 | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) --- a/doc/bbe.1 +++ b/doc/bbe.1 @@ -44,7 +44,7 @@ Add the COMMAND to the commands to be executed. .TP .BR \-f ", " \-\-file=\fIscript\-file\fP -Add the contest of script\-file to commands. +Add the contents of script\-file to commands. .TP .BR \-o ", " \-\-output=\fIname\fP Write output to \fIname\fP instead of standard output. @@ -71,10 +71,10 @@ String \fIstart\fP starts \fIM\fR bytes long block. .TP /start/:/stop/ -String \fIstart\fP starts the block and block ends to string \fIstop\fR. +String \fIstart\fP starts the block and block ends at string \fIstop\fR. .TP /start/: -String \fIstart\fR starts the block and block will end at next occurence of \fIstart\fR. Only the first \fIstart\fR is included to the block. +String \fIstart\fR starts the block and block will end at next occurrence of \fIstart\fR. Only the first \fIstart\fR is included to the block. .TP :/stop/ Block starts at the beginning of input stream (or at the end of previous block) and ends at the next occurrence of \fIstop\fR. String \fIstop\fR will be included to the block. @@ -83,7 +83,7 @@ .PP Default value for block is 0:$, meaning the whole input stream. .PP -Both \fIstart\fR and \fIstop\fR strings are included to block. Nonprintable characters can be escaped as +Both \fIstart\fR and \fIstop\fR strings are included in block. Nonprintable characters can be escaped as .TP \ennn decimal @@ -96,9 +96,9 @@ .PP Character '\e' can be escaped as '\e\e'. Escape codes '\ea','\eb','\et','\en','\ev','\ef','\er' and '\e;' can also be used. .PP -Length (\fIN\fR and \fIM\fR) can be defined as decimal (n), hexadecimal (xn) or octal (0n) value. +Length (\fIN\fR and \fIM\fR) can be defined as a decimal (n), a hexadecimal (xn) or an octal (0n) value. .SH "COMMAND SYNOPSIS" -\fBbbe\fR has two type of commands: block and byte commands, both are allways related to current block. That means that the input stream outside of block remains untouched. +\fBbbe\fR has two type of commands: block and byte commands, both are always related to current block. That means that the input stream outside of the blocks remains untouched. .SS Block commands .TP D [\fIn\fR] @@ -111,7 +111,7 @@ Append the string \fIstring\fR at the end of block. .TP J \fIn\fR -Skip \fIn\fR blocks before executing commands after this command. +Skip \fIn\fR blocks, before executing commands after this command. .TP L \fIn\fR Leave all blocks unmodified starting from block number \fIn\fR. Affects only commands after this command. @@ -120,7 +120,7 @@ Before printing a block, the file name in which the block starts is printed. .TP F \fIf\fR -Before printing a block, the input stream offset at the begining of the block is printed. +Before printing a block, the input stream offset at the beginning of the block is printed. \fIf\fR can be H, D or O for Hexadecimal, Decimal or Octal format of offset. .TP B \fIf\fR @@ -128,12 +128,12 @@ \fIf\fR can be H, D or O for Hexadecimal, Decimal or Octal format of block number. .TP > \fIfile\fR -Before printing a block, the contents of file \fIfile\fR is printed. +Before printing a block, the contents of file \fIfile\fR are printed. .TP < \fIfile\fR -After printing a block, the contents of file \fIfile\fR is printed. +After printing a block, the contents of file \fIfile\fR are printed. .SS Byte commands -\fIn\fR in byte commands is offset from the beginning of current block (starts from zero). +\fIn\fR in byte commands is the offset from the beginning of current block (starts from zero). .TP r \fIn\fR \fIstring\fR Replace bytes starting at position \fIn\fR with string \fIstring\fR. @@ -143,13 +143,13 @@ .TP p \fIformat\fR The contents of block is printed in format defined by \fIformat\fR. \fIformat\fR -can have any of the formats H, D, O, A and B for Hexadecimal, Decimal, Octal, Asciii and Binary. +can have any of the formats H, D, O, A and B for Hexadecimal, Decimal, Octal, Ascii and Binary. .TP s/\fIsearch\fR/\fIreplace\fR/ Replace all occurrences of \fIsearch\fR with \fIreplace\fR. .TP y/\fIsource\fR/\fIdest\fR/ -Translate bytes in \fIsource\fR to the corresponding bytes in \fIdest\fR. \fISource\fR and \fIdest\fR must have equal length. +Translate bytes in \fIsource\fR to the corresponding bytes in \fIdest\fR. \fISource\fR and \fIdest\fR must be the same length. .TP d \fIn\fR \fIm\fR|* Delete \fIm\fR bytes starting from the offset \fIn\fR. If * is defined instead of \fIm\fR, then all bytes starting from \fIn\fR are deleted. @@ -170,17 +170,17 @@ Commands after the l\-command are ignored from \fIn\fR'th byte of the block. .TP w \fIfile\fR -Write bytes from the current block to file \fIfile\fR. Commands before w\-command have effect to what will be written. %B or %nB in \fIfile\fR will be replaced by current block number. n in %nB is field length, +Write bytes from the current block to file \fIfile\fR. Commands before w\-command have what will be written. %B or %nB in \fIfile\fR will be replaced by current block number. n in %nB is field length, leading zero in n causes the block number to be left padded with zeroes. .TP & \fIc\fR -Performs binary and with \fIc\fR. +Performs binary \fBand\fR with \fIc\fR. .TP | \fIc\fR -Performs binary or with \fIc\fR. +Performs binary \fBor\fR with \fIc\fR. .TP ^ \fIc\fR -Performs binary xor with \fIc\fR. +Performs binary \fBxor\fR with \fIc\fR. .TP ~ Performs binary negation. @@ -201,7 +201,7 @@ .SH "EXAMPLES" .TP bbe \-e "s/c:\e\etemp\e\edata1.txt/c:\e\etemp\e\edata2.txt/" file1 -all occurences of "c:\etemp\edata1.txt" in file file1 are changed to "c:\etemp\edata2.txt" +all occurrences of "c:\etemp\edata1.txt" in file file1 are changed to "c:\etemp\edata2.txt" .TP bbe \-b 0420:16 \-e "r 4 \ex12\ex4a" file1 Two bytes starting at fifth byte of a 16 byte long block starting at offset 0420 (octal) in file1 are changed to hexadecimal values 12 and 4a. @@ -213,4 +213,4 @@ .BR sed (1). .SH "AUTHOR" -Timo Savinen +Timo Savinen debian/patches/20-html.patch0000664000000000000000000005015312114401210013011 0ustar From: Generated from INFO Subject: The Makefile generates an updated bbe.html. These are the mods. --- doc/bbe.html | 94 +++++++++++++++++++++++++++++------------------------------ 1 file changed, 47 insertions(+), 47 deletions(-) --- a/doc/bbe.html +++ b/doc/bbe.html @@ -3,7 +3,7 @@ bbe - binary block editor - + -
+
-b BLOCK
--block=BLOCK
Block definition.
-e COMMAND
--expression=COMMAND
Add command(s) to the commands to be executed. Commands must be separated by semicolon. @@ -192,8 +192,8 @@

All remaining options are names of input files, if no input files are specified or - is given, then the standard input is read.

-


+


Next: , Previous: Invocation, Up: Invoking bbe @@ -268,8 +268,8 @@
-


+


Next: , Previous: Block, Up: Invoking bbe @@ -316,9 +316,9 @@
B f
Before block contents the current block number and colon is printed in format specified by f. Block numbering starts at one. f can have one of the sames codes as F-command. -
> file
Before printing a block, the contents of file file is printed. +
> file
Before printing a block, the contents of file file is printed. -
< file
After printing a block, the contents of file file is printed. +
< file
After printing a block, the contents of file file is printed.

Byte commands are:

@@ -368,7 +368,7 @@
s/search/replace/
All occurences of search are replaced by replace. replace can be empty. Separator / can be replaced by any character not present in search or replace. -
w file
Contents of blocks are written to file file. Note: Data inserted by commands A, I, +
w file
Contents of blocks are written to file file. Note: Data inserted by commands A, I, > and < are written to file file and j and l commands have no effect on w-commands. Zero size files are not preserved.
Filename can contain format string %B or %nB, these format strings are replace by current block number (starting from one), causing every block to have it's own file. @@ -389,8 +389,8 @@
-


+


Previous: Commands, Up: Invoking bbe @@ -409,8 +409,8 @@
-


+


Next: , Previous: Invoking bbe, Up: Top @@ -420,7 +420,7 @@

4 How bbe works

bbe scans the input stream just once, so the last block may differ from the block definition, because bbe doesn't -'peek' the end of the input stream. Last block may be shorter than defined, e.g. if block is defined as `/string/:128' +'peek' the end of the input stream. Last block may be shorter than defined, e.g. if block is defined as ‘/string/:128’ and if the end of input stream is found before 128'th byte of the last block is reached, the last block remains shorter.

Basic execution cycle:

@@ -443,15 +443,15 @@

Few examples:

-
`echo "The quick brown fox jumps over a lazy dog" | bbe -b "/The/:21" -e "j 4" -e "s/ /X/"'
Output is +
echo "The quick brown fox jumps over a lazy dog" | bbe -b "/The/:21" -e "j 4" -e "s/ /X/"
Output is
          The quickXbrownXfoxXjumps over a lazy dog
-     
+

The only block in this is

          The quick brown fox j
-     
+

All spaces in the block are converted to X's, before conversion first 4 bytes are skipped.
-

`echo "The quick brown fox jumps over a lazy dog" | bbe -b ":/ /" -e "J 1" -e "A \x0a"'
Output is: +
echo "The quick brown fox jumps over a lazy dog" | bbe -b ":/ /" -e "J 1" -e "A \x0a"
Output is:
          The quick
           brown
           fox
@@ -461,57 +461,57 @@
           lazy
           dog
           
-     
+

All blocks end at space, a newline character is inserted after every block except the first block.
-

`echo "The quick brown fox jumps over a lazy dog" | bbe -e "r 4 fast\x20" -e "s/f/c/"'
Output is: +
echo "The quick brown fox jumps over a lazy dog" | bbe -e "r 4 fast\x20" -e "s/f/c/"
Output is:
          The cast  brown cox jumps over a lazy dog
-     
+

Also the f in fast is converted to c.
-

`echo "1234567890" | bbe -b ":1" -e "L 9" -e "A -"'
Output is +
echo "1234567890" | bbe -b ":1" -e "L 9" -e "A -"
Output is
          1-2-3-4-5-6-7-8-9-0
-     
+

Hyphen is inserted after every 1 byte long block,but not after 9'th block.
-

`bbe -s -b "/First line/:/Last line/" /tmp/text'
Print lines between sentences `First line' and `Last line'.
+
bbe -s -b "/First line/:/Last line/" /tmp/text
Print lines between sentences ‘First line’ and ‘Last line’.
-
`bbe -s -b "%<a %:%</a>%" -e "s/\x0a/ /" -e "A \n" ./index.html'
Extract all links from ./index.html. To get one link per line, +
bbe -s -b "%<a %:%</a>%" -e "s/\x0a/ /" -e "A \n" ./index.html
Extract all links from ./index.html. To get one link per line, all newlines are converted to spaces and newline is added after every link.
-
`bbe -b "/\x5f\x28\x02/:10" -s -e "F d" -e "p h" -e "A \n" ./bindata'
10 bytes long sequences starting with values x5f x28 and x02 are printed as hex values. +
bbe -b "/\x5f\x28\x02/:10" -s -e "F d" -e "p h" -e "A \n" ./bindata
10 bytes long sequences starting with values x5f x28 and x02 are printed as hex values. Also the file offset is printed before each sequence and new line is added after every sequence. Example output:
          52688:x5f x28 x02 x32 x36 x5f x81 x64 x01 x93
           68898:x5f x28 x02 x39 x46 x5f x81 x64 x41 x05
           69194:x5f x28 x02 x42 x36 x5f x81 x64 x41 x05
-     
+


-

`bbe -b "/Linux/:5" -s -e "N;D;A \x0a" /bin/* | uniq'
Print the file names of those programs in /bin directory which contains word `Linux'. +
bbe -b "/Linux/:5" -s -e "N;D;A \x0a" /bin/* | uniq
Print the file names of those programs in /bin directory which contains word ‘Linux’. Example output:
          /bin/loadkeys:
           /bin/mkbimage:
           /bin/ps:
           /bin/uname:
-     
+


-

`bbe -b "/\x5f\x81\x18\x06/:10" -s -e "B d;d 0 4;c BCD ASC;A \n" ./bindata'
Print BCD numbers and their block numbers in ascii format. Numbers start with sequence x5f x81 x18 x06. +
bbe -b "/\x5f\x81\x18\x06/:10" -s -e "B d;d 0 4;c BCD ASC;A \n" ./bindata
Print BCD numbers and their block numbers in ascii format. Numbers start with sequence x5f x81 x18 x06. The start sequence is not printed.
-
`bbe -b "/\x5f/:2" -e "j 1;& \xf0" -o newdata bindata'
The least significant nybble of bytes after x5f is cleared.
+
bbe -b "/\x5f/:2" -e "j 1;& \xf0" -o newdata bindata
The least significant nybble of bytes after x5f is cleared.
-
`bbe -b "/\xff\xd8\xff/:/\xff\xd9/" -s -e "w pic%02B.jpg" -o /dev/null manual.pdf'
Extract jpg-images from pdf-file to separate jpg-files (assuming that the jpg start/stop sequences +
bbe -b "/\xff\xd8\xff/:/\xff\xd9/" -s -e "w pic%02B.jpg" -o /dev/null manual.pdf
Extract jpg-images from pdf-file to separate jpg-files (assuming that the jpg start/stop sequences does not appear in other context than jpg-images). Files will be named as pic01.jpg, pic02.jpg, pic03.jpg,...
-
`bbe -b "_<body>_:_</body>_" -s -o temp nicebody.html'
`bbe -b "_<body>_:_</body>_" -e "D;< temp" -o tmpindex.html index.html'
`mv tmpindex.html index.html'
The body part of the html-document index.html is replaced by the body of the document nicebody.html. +
bbe -b "_<body>_:_</body>_" -s -o temp nicebody.html
bbe -b "_<body>_:_</body>_" -e "D;< temp" -o tmpindex.html index.html
mv tmpindex.html index.html
The body part of the html-document index.html is replaced by the body of the document nicebody.html.
-


+


Previous: bbe programs, Up: Top @@ -522,7 +522,7 @@

If you find a bug in bbe, please send electronic mail to tjsa@iki.fi. Include the version number, which you can find by -running `bbe --version'. Also include in your message the +running ‘bbe --version. Also include in your message the output that the program produced and the output you expected.

If you have other questions, comments or suggestions about debian/patches/series0000664000000000000000000000003712114401210012016 0ustar 10-manpage.patch 20-html.patch debian/doc-base0000664000000000000000000000036112114401210010552 0ustar Document: bbe Title: BBE binary editor documentation Author: Timo Savinen Abstract: Documentation for the bbe program Section: File Management Format: HTML Index: /usr/share/doc/bbe/bbe.html Files: /usr/share/doc/bbe/bbe.html debian/watch0000664000000000000000000000005712114401210010205 0ustar version=3 http://sf.net/bbe-/bbe-(.*)\.tar\.gz debian/control0000664000000000000000000000127112260307163010574 0ustar Source: bbe Section: editors Priority: optional Maintainer: Ubuntu Developers XSBC-Original-Maintainer: Jari Aalto Build-Depends: debhelper (>= 9), texinfo, autotools-dev Standards-Version: 3.9.4 Vcs-Browser: http://git.debian.org/?p=collab-maint/bbe.git Vcs-Git: git://git.debian.org/git/collab-maint/bbe.git Homepage: http://freecode.com/projects/bbe Package: bbe Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Description: sed-like editor for binary files Editor like sed, but for binary files. bbe performs basic byte operations on blocks of input stream. bbe is a command line tool developed for Unix systems. debian/source/0000775000000000000000000000000012114401210010452 5ustar debian/source/format0000664000000000000000000000001412114401210011660 0ustar 3.0 (quilt) debian/compat0000664000000000000000000000000212114401210010350 0ustar 9 debian/rules0000775000000000000000000000064412260307253010254 0ustar #!/usr/bin/make -f export DEB_BUILD_MAINT_OPTIONS = hardening=+all export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed override_dh_installinfo: # See file debian/info dh_installinfo # This is due to original Makefile rm -vf debian/bbe/usr/share/info/dir override_dh_installchangelogs: dh_installchangelogs ChangeLog %: dh $@ --with autotools-dev # End of file