Skip to content
This repository was archived by the owner on Oct 22, 2020. It is now read-only.

Commit ffa3fc3

Browse files
committed
Add #before_upload hook
1 parent b0f3e87 commit ffa3fc3

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

lib/wpxf/wordpress/shell_upload.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,17 @@ def payload_body_builder
4646
def uploaded_payload_location
4747
end
4848

49+
# Called prior to preparing and uploading the payload.
50+
# @return [Boolean] true if no errors occurred.
51+
def before_upload
52+
true
53+
end
54+
4955
# Run the module.
5056
# @return [Boolean] true if successful.
5157
def run
5258
return false unless super
59+
return false unless before_upload
5360

5461
emit_info 'Preparing payload...'
5562
@payload_name = "#{Utility::Text.rand_alpha(payload_name_length)}.php"

0 commit comments

Comments
 (0)