Skip to content

Commit c32a341

Browse files
committed
Updated register_file_for_clean to account for windows
1 parent 6816589 commit c32a341

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

modules/exploits/multi/http/tomcat_partial_put_deserialization.rb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,12 @@ def upload_payload(cmd)
145145
"#{session_id}.session"
146146
)
147147

148-
register_file_for_cleanup("../webapps/ROOT/#{session_id}.session")
148+
case target['Platform']
149+
when ['unix', 'linux']
150+
register_file_for_cleanup("../webapps/ROOT/#{session_id}.session")
151+
when 'win'
152+
register_file_for_cleanup("..\\webapps\\ROOT\\#{session_id}.session}")
153+
end
149154
# 201/204 is the normal success code
150155
# 409 indicates a conflict or file permission issue
151156
# but the partial file will still be created

0 commit comments

Comments
 (0)