From 6b1d6fbf1644752802c3e5371569f06e24f4ea4f Mon Sep 17 00:00:00 2001 From: "T. Alexander Lystad" Date: Mon, 30 Jan 2012 05:22:04 +0100 Subject: [PATCH] restored HashcatMaskFrequencyAgent to a bug free state --- passpal.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/passpal.rb b/passpal.rb index f7da623..f8b75ea 100644 --- a/passpal.rb +++ b/passpal.rb @@ -311,7 +311,7 @@ def initialize end def analyze(word) if Regexp.new('^[a-zA-Z0-9\p{Punct} ]+$'.force_encoding('utf-8'), Regexp::FIXEDENCODING).match(word) - word.tr!('A-Za-z0-9'+'!"#$%&\'()*+,\\-./:;<=>?@[]^_`{|}~ ', 'U'*26+'L'*26+'D'*10+'S'*33) + word = word.gsub(/[A-Z]/, 'U').gsub(/[a-z]/, 'L').gsub(/[0-9]/, 'D').gsub(Regexp.new('[\p{Punct} ]'.force_encoding('utf-8'), Regexp::FIXEDENCODING), 'S') @results[LUDS::encode(word).to_sym] += 1 else @otherCount += 1