binary file diff tool
-
- Beiträge: 287
- Registriert: 05.02.2013 19:47:41
binary file diff tool
Kennt ihr ein cmdline tool für ein binary diff nach _stdout_ im HEX format wie dos _fc_?
-der_linux_cowboy --- Besser werden! ... f*** w$$
Re: binary file diff tool
Code: Alles auswählen
$ apt-cache search diff | grep -i binar | sort
binclock - binary clock for console with color support
bindechexascii - simple ASCII,binary,decimal and hex converter
brag - Downloads and assembles multipart Usenet binaries
bsdiff - generate/apply a patch between two binary files
code-aster-mpi-engine - Code_Aster finite element program - parallel binary
elmer - finite element multiphysics suite - binaries
etsf-io - Binary tools to check, merge and read ETSF files
fcitx-bin - Flexible Input Method Framework - essential binaries
freefem++ - Provides the binaries of the FreeFem++ FE suite
jhc - Haskell compiler that produce binary through C language
...
mediawiki-math-texvc - math rendering plugin for MediaWiki (texvc binary files)
nettle-bin - low level cryptographic library (binary tools)
rdiff - Binary diff tool for signature-based differences
snp-sites - Binary code for the package snp-sites
vbindiff - visual binary diff, visually compare binary files
xdelta - A diff utility which works with binary files
xdelta3 - Diff utility which works with binary files
mfg rendegast
-----------------------
Viel Eifer, viel Irrtum; weniger Eifer, weniger Irrtum; kein Eifer, kein Irrtum.
(Lin Yutang "Moment in Peking")
-----------------------
Viel Eifer, viel Irrtum; weniger Eifer, weniger Irrtum; kein Eifer, kein Irrtum.
(Lin Yutang "Moment in Peking")
- habakug
- Moderator
- Beiträge: 4314
- Registriert: 23.10.2004 13:08:41
- Lizenz eigener Beiträge: MIT Lizenz
Re: binary file diff tool
Hallo!
...oder vbindiff aus der Liste von @rendegast.
Gruss, habakug
Code: Alles auswählen
$ cp /bin/ping .
$ diff <(xxd /bin/ping) <(xxd ping)
Gruss, habakug
-
- Beiträge: 287
- Registriert: 05.02.2013 19:47:41
Re: binary file diff tool
Am nächsten dran ist cmp, aber das hat addr in decimal und data in octal!
dem läßt sich abhelfen:
dem läßt sich abhelfen:
Code: Alles auswählen
Fbindiff ()
{
[[ ! $2 || ! -f $1 || ! -f $2 ]] &&
echo "\n\t $FUNCNAME file1 file2 # dos fc-like binary diff!\n" && return
cmp -l "$1" "$2" | perl -ne'
if (/\s*(\d+)\s+(\d+)\s+(?:\S+\s+)?(\d+).*/) {
$adr = $1-1; $old = oct($2); $new = oct($3);
printf "%08X: %02X %02X\n", $adr, $old, $new;
}'
}
Code: Alles auswählen
$ Fbindiff ucx-2.2.1.4.org ucx-2.2.1.4
000EF4E9: 75 B0
000EF4EA: 09 04
-der_linux_cowboy --- Besser werden! ... f*** w$$
-
- Beiträge: 287
- Registriert: 05.02.2013 19:47:41
Re: binary file diff tool
update:
Code: Alles auswählen
Fbindiff ()
{
[[ ! $2 || ! -f $1 || ! -f $2 ]] &&
echo "\n\t $FUNCNAME file1 file2 # dos fc-like binary diff!\n" && return
\cmp -l "$1" "$2" | perl -ne'
printf "%08X: %02X %02X\n", $1-1, oct($2), oct($3)
if (/^\s*(\d+)\s+(\d+)\s+(\d+)/)'
}
-der_linux_cowboy --- Besser werden! ... f*** w$$