Skip to content

Commit 4228868

Browse files
committed
Clean up after yourself
Can't use FileDropper. :(
1 parent 1f63f8f commit 4228868

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

modules/exploits/unix/webapp/drupal_coder_exec.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,4 +98,12 @@ def exploit
9898
}
9999
)
100100
end
101+
102+
# XXX: FileDropper can't handle weird filenames
103+
def on_new_session(session)
104+
# This find command should be decently portable...
105+
command = '[ -f coder_upgrade.run.php ] && find . \! -name coder_upgrade.run.php -delete'
106+
print_status("Cleaning up: #{command}")
107+
session.shell_command_token(command)
108+
end
101109
end

0 commit comments

Comments
 (0)