mirror of
https://github.com/radareorg/radare2.git
synced 2024-12-11 15:04:23 +00:00
7f98bcb15f
* Note that r2 is not thread safety and this can result on segfaults * Works like `r2 -t`, it's a good playgrounds to fix race condition bugs
97 lines
2.9 KiB
Groff
97 lines
2.9 KiB
Groff
.Dd Nov 14, 2023
|
|
.Dt RADIFF2 1
|
|
.Sh NAME
|
|
.Nm radiff2
|
|
.Nd unified binary diffing utility
|
|
.Sh SYNOPSIS
|
|
.Nm radiff2
|
|
.Op Fl 1AabcCdDhOrspxXvzZ
|
|
.Op Fl B Ar baddr
|
|
.Op Fl G Ar cmd
|
|
.Op Fl S Ar algo
|
|
.Op Fl g Ar sym
|
|
.Op Fl i Ar i,s
|
|
.Op Fl m Ar graphmode
|
|
.Op Fl t Ar 0-100
|
|
.Ar file1
|
|
.Ar file2
|
|
.Sh DESCRIPTION
|
|
radiff2 implements many binary diffing algorithms for data and code.
|
|
.Pp
|
|
.Bl -tag -width Fl
|
|
.It Fl 1
|
|
Binary output (GDIFF format)
|
|
.It Fl A
|
|
Analyze binary after loading it with RCore (see -C) and use -AA to run aaaa instead of aaa.
|
|
.It Fl a
|
|
Specify architecture (x86, arm, ..)
|
|
.It Fl b
|
|
Select register size bits for given arch
|
|
.It Fl B Ar baddr
|
|
Specify the base address to add to the offsets in the diff listings
|
|
.It Fl c
|
|
Count number of differences.
|
|
.It Fl e [k=v]
|
|
Specify eval config vars for all RCore instances created.
|
|
.It Fl C
|
|
Code diffing using graphdiff algorithm. Output columns are: file-a-address, percentage of most similar function in B file | file-b-address. (Use with -A to analyze the binaries to find more functions)
|
|
.It Fl d
|
|
Use delta diffing (slower).
|
|
.It Fl D
|
|
Show disasm instead of hexpairs (honors -a arch and -b bits)
|
|
.It Fl g Ar sym | off1,off2
|
|
Graph diff output of given symbol, or between two functions, at given offsets: one for each binary.
|
|
.It Fl G Ar [cmd]
|
|
Run given command after creating each core instance
|
|
.It Fl h
|
|
Show usage help message.
|
|
.It Fl i Ar i, s, c, m, f
|
|
Compare (i)mports, (s)ymbols, (c)lassnames, (m)ethods, (f)ields from given files (radiff2 -ii /bin/ls /bin/cat)
|
|
.It Fl j
|
|
Use JSON for output
|
|
.It Fl n
|
|
Suppress address names (show only addresses) when code diffing.
|
|
.It Fl O
|
|
Do code diffing with opcode bytes only.
|
|
.It Fl m Ar [graphmode]
|
|
Specify the graph mode (i)nteractive, (k)ey-value, (j)son, (J)son2, (t)iny, (d)ot, (s)tar, (g)ml, (m)ermaid
|
|
.It Fl p
|
|
Use physical addressing (io.va=0)
|
|
.It Fl q
|
|
Quiet mode: disable colors and reduce output
|
|
.It Fl r
|
|
Output in radare commands as a binary patch.
|
|
.It Fl x
|
|
Show two column hexdump diffing.
|
|
.It Fl X
|
|
Show two column hexII diffing.
|
|
.It Fl s
|
|
Compute edit distance (no substitution, Eugene W. Myers' O(ND) diff algorithm) between two files.
|
|
.It Fl ss
|
|
Compute Levenshtein edit distance (substitution is allowed, O(N^2)) between two files.
|
|
.It Fl S Ar [name, namelen, dist, size, ...]
|
|
Specify which column of the code diffing algo use for diffing
|
|
.It Fl t Ar 0\-100
|
|
Choose matching threshold for binary code diffing
|
|
.It Fl T
|
|
Load and analyze files in separate threads, this is an experimental feature which can result on segfaults, use it with care or use it to fix thread-safety bugs.
|
|
.It Fl u
|
|
Unified diff output
|
|
.It Fl U
|
|
Unified diff output using system\'s diff program
|
|
.It Fl v
|
|
Show version information.
|
|
.It Fl V
|
|
Be verbose sometimes
|
|
.It Fl z
|
|
Perform diff on extracted strings
|
|
.It Fl Z
|
|
Perform diff using zignatures instead of function list (NEW)
|
|
.El
|
|
.Sh SEE ALSO
|
|
.Pp
|
|
.Xr radare2(1)
|
|
.Sh AUTHORS
|
|
.Pp
|
|
pancake <pancake@nopcode.org>
|