Rabin2 Xtr: Add error message if none of the plugins can extract bins from the file.

This commit is contained in:
Aneesh Dogra 2016-03-24 12:39:21 +05:30 committed by pancake
parent 27459b7deb
commit 4562283f66

View File

@ -930,13 +930,21 @@ int main(int argc, char **argv) {
if (action & ACTION_EXTRACT) {
RListIter *iter;
RBinXtrPlugin *xtr;
bool supported = false;
r_list_foreach (bin->binxtrs, iter, xtr) {
if (xtr->check (bin)) {
// xtr->extractall (bin);
rabin_extract ((!arch && !arch_name && !bits));
supported = true;
break;
}
}
if (!supported) {
// if we reach here, no supported xtr plugins found
eprintf ("Cannot extract bins from '%s'. No supported plugins found!\n", bin->file);
}
}
if (op && action & ACTION_OPERATION)
rabin_do_operation (op);