2018-01-10 09:18:31 +00:00
.Dd Feb 10 , 2018
2014-09-30 09:01:45 +00:00
.Dt RADIFF2 1
2014-09-30 09:37:26 +00:00
.Sh NAME
2022-10-11 21:21:08 +00:00
.Nm radiff2
2014-09-30 09:37:26 +00:00
.Nd unified binary diffing utility
2009-04-15 11:09:36 +00:00
.Sh SYNOPSIS
2011-10-20 13:05:30 +00:00
.Nm radiff2
2022-09-06 19:50:35 +00:00
.Op Fl 1 AabcCdDhOrspxXvzZ
.Op Fl B Ar baddr
2023-02-10 21:06:31 +00:00
.Op Fl G Ar cmd
2016-09-22 18:31:40 +00:00
.Op Fl S Ar algo
2023-02-10 21:06:31 +00:00
.Op Fl g Ar sym
.Op Fl i Ar i,s
.Op Fl m Ar graphmode
.Op Fl t Ar 0 -100
2011-12-02 02:43:08 +00:00
.Ar file1
.Ar file2
2009-04-15 11:09:36 +00:00
.Sh DESCRIPTION
2011-10-20 13:05:30 +00:00
radiff2 implements many binary diffing algorithms for data and code.
2009-04-15 11:09:36 +00:00
.Pp
.Bl -tag -width Fl
2022-09-06 19:50:35 +00:00
.It Fl 1
Binary output (GDIFF format)
2016-03-19 01:57:53 +00:00
.It Fl A
Analyze binary after loading it with RCore (see -C) and use -AA to run aaaa instead of aaa.
2014-03-19 09:33:00 +00:00
.It Fl a
Specify architecture (x86, arm, ..)
.It Fl b
Select register size bits for given arch
2022-09-06 19:50:35 +00:00
.It Fl B Ar baddr
Specify the base address to add to the offsets in the diff listings
2010-03-12 17:46:11 +00:00
.It Fl c
Count number of differences.
2017-04-10 11:01:42 +00:00
.It Fl e [k=v]
Specify eval config vars for all RCore instances created.
2011-10-20 13:05:30 +00:00
.It Fl C
2017-09-30 09:56:38 +00:00
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)
2011-12-02 02:43:08 +00:00
.It Fl d
Use delta diffing (slower).
2016-02-15 22:52:12 +00:00
.It Fl D
Show disasm instead of hexpairs (honors -a arch and -b bits)
2014-08-19 00:47:41 +00:00
.It Fl g Ar sym | off1,off2
Graph diff output of given symbol, or between two functions, at given offsets: one for each binary.
2023-02-10 21:06:31 +00:00
.It Fl G Ar [cmd]
Run given command after creating each core instance
2014-05-11 11:22:36 +00:00
.It Fl h
Show usage help message.
2022-10-09 09:09:20 +00:00
.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)
2023-02-10 21:06:31 +00:00
.It Fl j
Use JSON for output
2014-12-26 18:28:55 +00:00
.It Fl n
Suppress address names (show only addresses) when code diffing.
2014-05-11 11:22:36 +00:00
.It Fl O
2021-01-19 01:53:44 +00:00
Do code diffing with opcode bytes only.
2023-02-10 21:06:31 +00:00
.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
2014-05-11 11:22:36 +00:00
.It Fl p
Use physical addressing (io.va=0)
2017-01-09 02:26:07 +00:00
.It Fl q
Quiet mode: disable colors and reduce output
2009-04-15 11:09:36 +00:00
.It Fl r
2010-03-12 17:46:11 +00:00
Output in radare commands as a binary patch.
2016-04-20 23:29:57 +00:00
.It Fl x
Show two column hexdump diffing.
2019-10-24 16:23:03 +00:00
.It Fl X
Show two column hexII diffing.
2011-12-02 02:43:08 +00:00
.It Fl s
2021-01-24 21:17:25 +00:00
Compute edit distance (no substitution, Eugene W. Myers' O(ND) diff algorithm) between two files.
2016-09-21 10:07:44 +00:00
.It Fl ss
2021-01-24 21:17:25 +00:00
Compute Levenshtein edit distance (substitution is allowed, O(N^2)) between two files.
2016-09-22 18:31:40 +00:00
.It Fl S Ar [name, namelen, dist, size, ...]
Specify which column of the code diffing algo use for diffing
2014-05-11 11:22:36 +00:00
.It Fl t Ar 0 \- 100
Choose matching threshold for binary code diffing
2017-01-09 02:18:14 +00:00
.It Fl u
Unified diff output
.It Fl U
Unified diff output using system\' s diff program
2011-12-02 02:43:08 +00:00
.It Fl v
2010-03-12 17:46:11 +00:00
Show version information.
2016-05-25 07:07:23 +00:00
.It Fl V
Be verbose sometimes
2017-01-08 23:03:42 +00:00
.It Fl z
Perform diff on extracted strings
2019-04-05 13:34:43 +00:00
.It Fl Z
Perform diff using zignatures instead of function list (NEW)
2010-03-15 16:15:48 +00:00
.El
2009-04-15 11:09:36 +00:00
.Sh SEE ALSO
.Pp
2021-05-20 01:34:23 +00:00
.Xr radare2(1)
2009-04-15 11:09:36 +00:00
.Sh AUTHORS
.Pp
2013-11-11 11:00:39 +00:00
pancake <pancake@nopcode.org>