File tree Expand file tree Collapse file tree 1 file changed +10
-15
lines changed
modules/exploits/multi/http Expand file tree Collapse file tree 1 file changed +10
-15
lines changed Original file line number Diff line number Diff line change @@ -112,29 +112,24 @@ def check
112112 'method' => 'GET' ,
113113 'vars_get' => vars
114114 )
115+ return CheckCode ::Unknown ( 'No response from target' ) unless res
115116
116- unless res . body =~ /Lighthouse Studio (\d +_\d +_\d +)/
117- print_error ( "#{ peer } - Unable to extract version number" )
118- end
119-
120- version_match = Regexp . last_match ( 1 ) . to_s
121- if !version_match . empty?
117+ if res . body =~ /Lighthouse Studio (\d +_\d +_\d +)/
118+ version_match = Regexp . last_match ( 1 ) . to_s
122119 print_status ( "Extracted version: #{ version_match . gsub ( '_' , '.' ) } " )
123-
124120 version = Rex ::Version . new ( version_match . gsub ( '_' , '' ) )
125- if version < Rex ::Version . new ( 91614 )
126- return CheckCode ::Appears
127- else
128- return CheckCode ::Safe
129- end
121+
122+ return CheckCode ::Appears if version < Rex ::Version . new ( 91614 )
123+ else
124+ print_error ( "#{ peer } - Unable to extract version number" )
130125 end
131126
132- html = res . get_html_document if res
133- if html . text . include? ( 'Lighthouse Studio' )
127+ html = res . get_html_document
128+ if html & .text & .include? ( 'Lighthouse Studio' )
134129 return CheckCode ::Detected
135130 end
136131
137- CheckCode ::Unknown
132+ CheckCode ::Safe
138133 end
139134
140135 def execute_command ( cmd , _opts = { } )
You can’t perform that action at this time.
0 commit comments