File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
modules/auxiliary/scanner/chromecast Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change 44##
55
66require 'msf/core'
7- require 'rexml/document'
87
98class Metasploit4 < Msf ::Auxiliary
109
@@ -35,22 +34,23 @@ def initialize(info = {})
3534 def run_host ( ip )
3635 res = send_request_raw (
3736 'method' => 'GET' ,
38- 'uri' => '/ssdp/device-desc.xml ' ,
37+ 'uri' => '/setup/eureka_info ' ,
3938 'agent' => Rex ::Text . rand_text_english ( rand ( 42 ) + 1 )
4039 )
4140
4241 return unless ( res && res . code == 200 )
4342
44- name = REXML ::Document . new ( res . body ) . elements [ '//friendlyName' ]
43+ json = JSON . parse ( res . body )
44+ name , ssid = json [ 'name' ] , json [ 'ssid' ]
4545
46- if name
47- print_good ( " #{ peer } - #{ name . text } " )
46+ if name && ssid
47+ print_good ( %Q{ #{ peer } - Chromecast " #{ name } " is connected to #{ ssid } } )
4848 report_service (
4949 :host => ip ,
5050 :port => rport ,
5151 :proto => 'tcp' ,
5252 :name => 'chromecast' ,
53- :info => name . text
53+ :info => name
5454 )
5555 end
5656 end
You can’t perform that action at this time.
0 commit comments