Skip to content

Commit 8069633

Browse files
committed
fix fail with condition
1 parent 68f61f3 commit 8069633

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

modules/exploits/windows/iis/iis_webdav_scstoragepathfromurl.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ def exploit
122122
},
123123
'uri' => target_uri.path
124124
)
125-
fail_with(Failure::BadConfig, "Server does not respond to WebDAV request") unless res || res.code != 207
125+
fail_with(Failure::BadConfig, "Server did not respond correctly to WebDAV request") if(res.nil? || res.code != 207)
126126

127127
xml = res.get_xml_document
128128
url = URI.parse(xml.at("//a:response//a:href").text)
@@ -157,7 +157,7 @@ def exploit
157157
'uri' => target_uri.path
158158
)
159159
if res
160-
vprint_status("Server returned #{res.code}")
160+
vprint_status("Server returned status #{res.code}")
161161
if res.code == 502 || res.code == 400
162162
next
163163
elsif session_created?

0 commit comments

Comments
 (0)