Skip to content

Commit

Permalink
Show number of generated zignatures in za{e,a,m}F
Browse files Browse the repository at this point in the history
  • Loading branch information
jroimartin committed Mar 25, 2017
1 parent 7205fbd commit 6833124
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions libr/core/cmd_zign.c
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ static int cmdAddBytes(void *data, const char *input, int type) {
RListIter *iter = NULL;
int minzlen = r_config_get_i (core->config, "zign.min");
int maxzlen = r_config_get_i (core->config, "zign.max");
int count = 0;

r_cons_break_push (NULL, NULL);
r_list_foreach (core->anal->fcns, iter, fcni) {
Expand All @@ -187,9 +188,12 @@ static int cmdAddBytes(void *data, const char *input, int type) {
}
if (!addFcnBytes (core, fcni, NULL, type, minzlen, maxzlen)) {
eprintf ("error: could not add zignature for fcn %s\n", fcni->name);
continue;
}
count++;
}
r_cons_break_pop ();
eprintf ("generated zignatures: %d\n", count);
}
break;
case '?':
Expand Down Expand Up @@ -366,6 +370,7 @@ static int cmdAddMetric(void *data, const char *input) {
{
RAnalFunction *fcni = NULL;
RListIter *iter = NULL;
int count = 0;

r_cons_break_push (NULL, NULL);
r_list_foreach (core->anal->fcns, iter, fcni) {
Expand All @@ -374,9 +379,12 @@ static int cmdAddMetric(void *data, const char *input) {
}
if (!addFcnMetrics (core, fcni, NULL)) {
eprintf ("error: could not add zignature for fcn %s\n", fcni->name);
continue;
}
count++;
}
r_cons_break_pop ();
eprintf ("generated zignatures: %d\n", count);
}
break;
case '?':
Expand Down

0 comments on commit 6833124

Please sign in to comment.