diff -urp john-1.7.8/run/john.conf john-1.7.8-external-events/run/john.conf --- john-1.7.8/run/john.conf 2011-05-23 01:19:14 +0000 +++ john-1.7.8-external-events/run/john.conf 2011-09-12 22:55:06 +0000 @@ -1244,3 +1244,10 @@ void filter() word[i--] = 0; word[i] = map2[(o & 0xfff) + (e >> 12)]; } + +[List.External:TestAbort] +void filter() +{ + if (word[0] == 'a') + event_pending = event_abort = 1; +} diff -urp john-1.7.8/src/external.c john-1.7.8-external-events/src/external.c --- john-1.7.8/src/external.c 2006-02-27 03:58:02 +0000 +++ john-1.7.8-external-events/src/external.c 2011-09-12 22:51:24 +0000 @@ -12,6 +12,7 @@ #include "compiler.h" #include "loader.h" #include "logger.h" +#include "signals.h" #include "status.h" #include "recovery.h" #include "config.h" @@ -24,8 +25,20 @@ char *ext_mode = NULL; static c_int ext_word[PLAINTEXT_BUFFER_SIZE]; -static struct c_ident ext_globals = { +static struct c_ident ext_event_pending = { NULL, + "event_pending", + (int *)&event_pending +}; + +static struct c_ident ext_event_abort = { + &ext_event_pending, + "event_abort", + (int *)&event_abort +}; + +static struct c_ident ext_globals = { + &ext_event_abort, "word", ext_word };