mirror of
https://github.com/radareorg/radare2.git
synced 2024-12-04 03:11:28 +00:00
Show filename in rahash2 -q
This commit is contained in:
parent
0efdf9cf97
commit
63b4dacf34
@ -85,6 +85,9 @@ static void do_hash_print(RHash *ctx, int hash, int dlen, int rad, int ule) {
|
||||
printf ("e file.%s=", hname);
|
||||
do_hash_hexprint (c, dlen, ule, rad);
|
||||
break;
|
||||
case 'n':
|
||||
do_hash_hexprint (c, dlen, ule, 'j');
|
||||
break;
|
||||
case 'j':
|
||||
printf ("{\"name\":\"%s\",\"hash\":\"", hname);
|
||||
do_hash_hexprint (c, dlen, ule, rad);
|
||||
@ -188,9 +191,13 @@ static int do_hash(const char *file, const char *algo, RIO *io, int bsize, int r
|
||||
r_hash_do_spice (ctx, i, iterations, _s);
|
||||
if (!*r_hash_name (i))
|
||||
continue;
|
||||
if (!quiet && rad != 'j')
|
||||
if (!quiet && rad != 'j') {
|
||||
printf ("%s: ", file);
|
||||
do_hash_print (ctx, i, dlen, rad, ule);
|
||||
}
|
||||
do_hash_print (ctx, i, dlen, quiet?'n':rad, ule);
|
||||
if (quiet) {
|
||||
printf (" %s\n", file);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (_s)
|
||||
|
Loading…
Reference in New Issue
Block a user