>From 1fbdaac800e4e9113a268de03324fe285b27c1fd Mon Sep 17 00:00:00 2001 From: Frank Dittrich Date: Fri, 20 Jul 2012 19:07:50 +0200 Subject: [PATCH 2/2] Add [List.External:Filter_Rot13] --- run/john.conf | 23 +++++++++++++++++++++++ 1 files changed, 23 insertions(+), 0 deletions(-) diff --git a/run/john.conf b/run/john.conf index d9e51c7..dbc93ec 100644 --- a/run/john.conf +++ b/run/john.conf @@ -1543,6 +1543,29 @@ void filter() word[i] = map2[(o & 0xfff) + (e >> 12)]; } +# Trivial Rot13 Example +[List.External:Filter_Rot13] +void filter() +{ + int i, j, c; + + j = 0; + i = 0; // Convert to uppercase + + while (c = word[i]) { + if ((c >= 'a' && c <= 'm') || c >= 'A' && c <= 'M' ) { + word[i] = c + 13; + j++; + } else if ((c >= 'n' && c <= 'z') || c >= 'N' && c <= 'Z' ) { + word[i] = c - 13; + j++; + } + i++; + } + if (j == 0) + word = 0; +} + # Trivial parallel processing example [List.External_base:Parallel] /* -- 1.7.7.6