Skip to content

Commit c8f23b2

Browse files
David MaloneyDavid Maloney
authored andcommitted
fix jtr_postgres_fast too
the JtR hash cracker for postgres hashes now uses the new PostgresMD5 class for finding it's hashes MSP-12244
1 parent 8c0e892 commit c8f23b2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

modules/auxiliary/analyze/jtr_postgres_fast.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,11 +108,12 @@ def wordlist_file
108108

109109
def hash_file
110110
hashlist = Rex::Quickfile.new("hashes_tmp")
111-
Metasploit::Credential::NonreplayableHash.joins(:cores).where(metasploit_credential_cores: { workspace_id: myworkspace.id }, jtr_format: 'raw-md5,postgres').each do |hash|
111+
Metasploit::Credential::PostgresMD5.joins(:cores).where(metasploit_credential_cores: { workspace_id: myworkspace.id }).each do |hash|
112112
hash.cores.each do |core|
113113
user = core.public.username
114114
@username_set << user
115115
hash_string = "#{hash.data}"
116+
hash_string.gsub!(/^md5/, '')
116117
id = core.id
117118
hashlist.puts "#{user}:#{hash_string}:#{id}:"
118119
end

0 commit comments

Comments
 (0)