Skip to content

Commit 19abce7

Browse files
committed
Land #16505, Fix Lotus Domino Hash Parsing
This fixes an issue with the regex that was parsing Lotus Domino hashes. The fix also changes the regex to xml parsing
2 parents 2762b92 + d6547c0 commit 19abce7

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

modules/auxiliary/scanner/lotus/lotus_domino_hashes.rb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,9 +157,10 @@ def dump_hashes(view_id, cookie, uri)
157157
}, 25)
158158

159159
if res && res.body
160-
short_name = res.body.scan(/<INPUT NAME=\"ShortName\" TYPE=(?:.*) VALUE=\"([^\s]+)"/i).join
161-
user_mail = res.body.scan(/<INPUT NAME=\"InternetAddress\" TYPE=(?:.*) VALUE=\"([^\s]+)"/i).join
162-
pass_hash = res.body.scan(/<INPUT NAME=\"\$?dspHTTPPassword\" TYPE=(?:.*) VALUE=\"([^\s]+)"/i).join
160+
doc = res.get_html_document
161+
short_name = doc.xpath('//input[@name="ShortName"]/@value').text
162+
user_mail = doc.xpath('//input[@name="InternetAddress"]/@value').text
163+
pass_hash = doc.xpath('//input[@name="$dspHTTPPassword" or @name="dspHTTPPassword"]/@value').first&.text
163164

164165
short_name = 'NULL' if short_name.to_s.strip.empty?
165166
user_mail = 'NULL' if user_mail.to_s.strip.empty?

0 commit comments

Comments
 (0)