Skip to content

Commit 30228bc

Browse files
author
Mark Judice
committed
Added underscore to user regex in smart_hashdump.rb to support usernames that contain underscores. Issue rapid7#4349.
1 parent ebb05a6 commit 30228bc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/post/windows/gather/smart_hashdump.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ def inject_hashdump
323323
# skip if it returns nil for an entry
324324
next if h == nil
325325
begin
326-
user = returned_hash[0].scan(/^[a-zA-Z0-9\-$.]*/).join.gsub(/\.$/,"")
326+
user = returned_hash[0].scan(/^[a-zA-Z0-9_\-$.]*/).join.gsub(/\.$/,"")
327327
lmhash = returned_hash[2].scan(/[a-f0-9]*/).join
328328
next if lmhash == nil
329329
hash_entry = "#{user}:#{rid}:#{lmhash}:#{returned_hash[3]}"

0 commit comments

Comments
 (0)