Skip to content

Commit 70fc028

Browse files
committed
Update regex to work across more JtR versions.
1 parent 74d87fc commit 70fc028

File tree

1 file changed

+3
-3
lines changed
  • lib/metasploit/framework/password_crackers

1 file changed

+3
-3
lines changed

lib/metasploit/framework/password_crackers/cracker.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -320,9 +320,9 @@ def cracker_version
320320
if cracker == 'john'
321321
# John the Ripper 1.8.0.13-jumbo-1-bleeding-973a245b96 2018-12-17 20:12:51 +0100 OMP [linux-gnu 64-bit x86_64 AVX2 AC]
322322
# John the Ripper 1.9.0-jumbo-1 OMP [linux-gnu 64-bit x86_64 AVX2 AC]
323-
#return $1 if line =~ /John the Ripper ([\.\w-]+) 20\d{2}-\d{2}-\d{2}/
324-
return $1 if line =~ /John the Ripper (.+) \[/
325-
return $2 if line =~ /John the Ripper (.+), version (.+)/
323+
# John the Ripper password cracker, version 1.8.0.2-bleeding-jumbo_omp [64-bit AVX-autoconf]
324+
# John the Ripper password cracker, version 1.8.0
325+
return $1 if line =~ /(?: password cracker, version)? ([^\[]+)?/
326326
elsif cracker == 'hashcat'
327327
# v5.1.0
328328
return $1 if line =~ /(v[\d\.]+)/

0 commit comments

Comments
 (0)