>From 80c24b25a551866e15f75f807fc02cc33b12d127 Mon Sep 17 00:00:00 2001 From: Frank Dittrich Date: Thu, 5 Jul 2012 14:48:27 +0200 Subject: [PATCH] Make some more --list= commands work despite a broken config --- src/john.c | 42 +++++++++++++++++++++++------------------- 1 files changed, 23 insertions(+), 19 deletions(-) diff --git a/src/john.c b/src/john.c index cb7b3c3..0445b16 100644 --- a/src/john.c +++ b/src/john.c @@ -650,7 +650,29 @@ static void john_init(char *name, int argc, char **argv) #endif exit(0); } + } + + if (options.listconf && !strcasecmp(options.listconf, "encodings")) + { + listEncodings(); + exit(0); + } +#ifdef CL_VERSION_1_0 + if (options.listconf && !strcasecmp(options.listconf, "opencl-devices")) + { + listOpenCLdevices(); + exit(0); + } +#endif +#ifdef HAVE_CUDA + if (options.listconf && !strcasecmp(options.listconf, "cuda-devices")) + { + cuda_device_list(); + exit(0); + } +#endif + if (!make_check) { if (options.config) { path_init_ex(options.config); @@ -717,25 +739,7 @@ static void john_init(char *name, int argc, char **argv) cfg_print_subsections("List.External", "generate", NULL, 0); exit(0); } - if (options.listconf && !strcasecmp(options.listconf, "encodings")) - { - listEncodings(); - exit(0); - } -#ifdef CL_VERSION_1_0 - if (options.listconf && !strcasecmp(options.listconf, "opencl-devices")) - { - listOpenCLdevices(); - exit(0); - } -#endif -#ifdef HAVE_CUDA - if (options.listconf && !strcasecmp(options.listconf, "cuda-devices")) - { - cuda_device_list(); - exit(0); - } -#endif + if (options.listconf && !strcasecmp(options.listconf, "formats")) { int column; -- 1.7.7.6