From 76f9148267570088d702bfb43395460e80975bf9 Mon Sep 17 00:00:00 2001
From: pyllyukko <pyllyukko@maimed.org>
Date: Sat, 6 Oct 2012 22:10:05 +0300
Subject: Improved password hashing detection

- Added support for blowfish & sha256 hashes
- Modified the SHA512 detection, so it detects SHA512 hashes properly,
  when $rounds is defined.
  See the discussion on https://savannah.nongnu.org/patch/?7186 for
  details.
---
 systems/Linux/2/gen_passwd_sets |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/systems/Linux/2/gen_passwd_sets b/systems/Linux/2/gen_passwd_sets
index ec48944..e47dc8f 100755
--- a/systems/Linux/2/gen_passwd_sets
+++ b/systems/Linux/2/gen_passwd_sets
@@ -96,6 +96,16 @@ zappasswd()
       \$1\$[a-zA-Z0-9\./][a-zA-Z0-9\./][a-zA-Z0-9\./][a-zA-Z0-9\./][a-zA-Z0-9\./][a-zA-Z0-9\./][a-zA-Z0-9\./][a-zA-Z0-9\./]\$[a-zA-Z0-9\./][a-zA-Z0-9\./][a-zA-Z0-9\./][a-zA-Z0-9\./][a-zA-Z0-9\./][a-zA-Z0-9\./][a-zA-Z0-9\./][a-zA-Z0-9\./][a-zA-Z0-9\./][a-zA-Z0-9\./][a-zA-Z0-9\./][a-zA-Z0-9\./][a-zA-Z0-9\./][a-zA-Z0-9\./][a-zA-Z0-9\./][a-zA-Z0-9\./][a-zA-Z0-9\./][a-zA-Z0-9\./][a-zA-Z0-9\./][a-zA-Z0-9\./][a-zA-Z0-9\./][a-zA-Z0-9\./])
 	     passwd="md5"
 	   ;;
+      \$2a\$*)
+             passwd="blowfish"
+           ;;
+      \$5\$*)
+             passwd="sha256"
+           ;;
+# For SHA512 passwds starting with $6$ (Linux)
+      \$6\$*)
+             passwd="sha512"
+           ;;
       " ") passwd=""
 	   ;;
 	*|!!)
-- 
1.7.4.4

