Commit Graph

121 Commits

Author SHA1 Message Date
pancake
7d00aed358 Fix #4528 - radiff2 -UDD to diff pdc 2017-01-20 16:13:54 +01:00
pancake
014cd45daa Make radiff2 work with fat bins again 2017-01-19 15:58:46 +01:00
nevun
fb31d8e64c Sort and uniq imports and strings before returning them 2017-01-16 10:14:49 +01:00
pancake
b5fa234124 Enhance the printable check used in radiff2 -u/U 2017-01-09 03:37:24 +01:00
pancake
a94551a775 Add radiff2 -q and add colors in -u 2017-01-09 03:26:07 +01:00
pancake
5ca1be956d Implement radiff2 -i, fix -z and add -u/-U
* Unified support using:
  - internal bindiffer
  - using system's diff program
* Compare list of imports or strings of given files
* Add proper apis to handle all this
* Automatic hexdump when comparing binary buffers (-U)
* Update documentation
2017-01-09 03:18:14 +01:00
Eugene
9c1ae16ed5 Fix #6445 - Add -z option for radiff2 to diff strings of binaries 2017-01-09 00:03:42 +01:00
pancake
d41b577106 Fix #5924 - r_flags -> r_flag 2016-10-27 01:07:58 +02:00
pancake
be9df39f6f Fixed 40 null derefs reported by coverity 2016-10-20 15:02:25 +02:00
pancake
d1088fa95d Add radiff2 -S to specify which column to sort for code diffing 2016-09-22 20:33:26 +02:00
Jayakrishna Menon
5c64af6ea7 beautify code 2016-09-22 19:30:15 +02:00
Jayakrishna Menon
6c71de7b11 implementing sorting of code diff 2016-09-22 19:30:15 +02:00
pancake
f5b255603a Bring back the old buffer_distance algorithm, make levenstein optional 2016-09-21 12:07:44 +02:00
Sven Steinbauer
2996538700 Fix #5633 - Change x == NULL to correct syntax 2016-09-19 14:44:47 +02:00
NikolaiHampton
392dd94bf7 Optimisation of Levenshtein calc in radiff2 -s
- Optimised the distance calculation for radiff -s
- Fixed a bug in radiff.c that where verbose was always true.
- Added check that calloc() was successful.
- Shuffled code around to minimise use of free()
- Added some comments.

Speeds up the radiff2 statistical diff. Drastically reduced the ‘edit
distance search space’ by ignoring ranges that can’t affect the edit
distance. Improves search for similar files (common use case?), can
reduce the search space significantly:

One file tested went from two unknown versions of httpd, on MacBook has
a 28 hours processing time, down to ~13 minutes. Results will vary based
on file differences the more similar the files, the faster it'll run.
2016-07-17 12:10:20 +02:00
pancake
a2a032833e Show file size if not matching in radiff2 2016-07-01 14:08:25 +02:00
pancake
8361f2ea83 Honor RIO in radiff's slurp - thanks @brainstorm for the tip 2016-07-01 14:02:46 +02:00
pancake
f96f00d62d Fix #5158 - Merge r_db into r_util 2016-06-17 12:19:16 +02:00
NikolaiHampton
2c50dd0c59 Memory efficient implemenation of Levenshtein Distance for radiff2 (add -V)
Implemented the iterative two matrix row version from here: https://en.wikipedia.org/wiki/Levenshtein_distance
and here: http://www.codeproject.com/Articles/13525/Fast-memory-efficient-Levenshtein-algorithm

Memory usage was originally 200Gig for a couple of 100K files ~(sizeA*sizeB), now about ~(sizeB*2)...
2016-05-26 11:03:01 +02:00
Sven Steinbauer
547f8bbc5c Infer fixes Round 2 (#4993) 2016-05-24 22:22:15 +02:00
Sven Steinbauer
8da8ad740f Cleanup fixes
* For commit comments and compiler errors
* Fixes for PR comments
* fix some "infer fixes" commits

Signed-off-by: Riccardo Schirone <sirmy15@gmail.com>
2016-05-23 11:25:44 +02:00
Sven Steinbauer
eef32d0260 First few fixes for infer scans
Fixes a few memleaks and several NULL dereferences

Signed-off-by: Riccardo Schirone <sirmy15@gmail.com>
2016-05-23 11:25:44 +02:00
pancake
ca73b22c02 Hint -A in -C for radiff2 2016-05-17 21:48:36 +02:00
pancake
3758b3a54a Fix static/android build 2016-04-25 12:40:01 +02:00
pancake
1ac0d47652 Honor aho in pd 2016-04-21 01:38:08 +02:00
pancake
8b08a8cba8 Add radiff2 -x in help 2016-04-21 01:29:57 +02:00
pancake
1f1a963cf2 rabin2 -x is now like r2's cc 2016-04-18 03:21:52 +02:00
NaveenBoggarapu
7d61361361 fix some memory leaks 2016-04-01 19:25:32 +02:00
pancake
f1f83276ea Fix static build with libbochs 2016-03-25 10:13:50 +01:00
pancake
f4618c0bbd Remove radiff2 -CC because we already have -A, -AA, -AAA ... 2016-03-22 13:00:02 +01:00
pancake
1aaa475298 Fix #4335 - radiff2 -A 2016-03-19 02:57:53 +01:00
pancake
f4eb0893a9 Add r_crypto dependency for radiff2 2016-03-16 15:00:17 +01:00
Matthieu Tardy
1a573e1056 Cleanup binr/*/*.c
r2agent:
- Fix the usage to match other r2 binaries.
- Remove trailing whitespace.
- Remove addressed TODO.
- Add a default case to display usage and exit if -p option was used
  without argument.
- Return 1 instead of 0 if too much arguments are provided.
- Small coding style fixes.

radiff2:
- Small coding style fixes.

rafind2:
- Add a default case to display usage and exit if an option have a missing
  argument or getopt does not recognize an option character.
- Small coding style fixes.

ragg2:
- Small coding style fixes.

rahash2:
- Remove useless optarg check.
- Missing arguments and unknown options now display usage and exit.
- Small coding style fixes.

rarun2:
- Small coding style fixes.

rasm2:
- Small coding style fixes.
- Missing arguments and unknown options now display usage and exit.

rax2:
- Small coding style fixes.

radare2:
- Missing arguments and unknown options now display usage and exit.
- Small coding style fixes.
2016-03-05 19:52:42 +01:00
pancake
7dd32315a5 Fix r_strbuf regression 2016-02-16 00:57:17 +01:00
pancake
d29fe6a43d Add documentation for radiff2 -D 2016-02-15 23:52:12 +01:00
pancake
fd359e9121 Implement radiff2 -D and optimize r_strbuf 2016-02-15 23:51:20 +01:00
pancake
ccfee9fcca Fix many important issues reported by clang-analyzer 2015-11-22 11:27:45 +01:00
pancake
49975ccf95 Fix #3286 - Use stdbool.h 2015-09-14 02:08:31 +02:00
pancake
0a7ed3e58b Workaround for radiff2, requires some extra review 2015-08-27 13:32:57 +02:00
dequis
0d91e7b433 radiff2: show filename instead of (null) in "cannot open" error message 2015-08-27 12:01:09 +02:00
Riccardo Schirone
def029d548 tools: always pass baddr to r_core_bin_load
radiff2: adapt to changes in baddr/laddr
bin/bin: no need to reset the baddr
2015-08-26 20:08:13 +02:00
pancake
8efab9329b Fix build 2015-06-02 02:47:14 +02:00
pancake
878f81dca1 Fix radiff2 -g regression and some code cleanup 2015-05-19 17:41:09 +02:00
Kai Renken
56df8c1592 small fix 2015-05-19 14:12:33 +02:00
Kai Renken
720cedd59c some cleanups on radiff2 json output preparation for #1594 2015-05-19 14:12:33 +02:00
dequis
e8a555bf46 radiff2: update help to reflect that -f was renamed -n
It was changed in 4c1253b but that commit missed the help part
2015-05-06 23:02:42 +02:00
pancake
061a2af999 Add radiff2 -CC for deeper bindiffing 2015-04-07 04:12:18 +02:00
pancake
25518385be Fix radiff2 -g: buffer was not flushed 2015-04-07 02:24:24 +02:00
pancake
7292fbab40 Fix PE and Brainfuck crashes related to RBinInfo
- Fix warn in radiff2
2015-03-27 17:18:15 +01:00
Kai Renken
db4abd8f6b Fix #2061 - Add JSON style output to radiff2 2015-03-27 11:44:06 +01:00