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

Commit efa3c6f

Browse files
committed
Expose #execute_payload for scenarios where custom action is necessary
1 parent 2862345 commit efa3c6f

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

lib/wpxf/wordpress/shell_upload.rb

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,13 @@ def run
7575
true
7676
end
7777

78+
# Execute the payload at the specified address.
79+
# @param payload_url [String] the payload URL to access.
80+
def execute_payload(payload_url)
81+
res = execute_get_request(url: payload_url, cookie: @session_cookie)
82+
emit_success "Result: #{res.body}" if res && res.code == 200 && !res.body.strip.empty?
83+
end
84+
7885
private
7986

8087
def payload_name_length
@@ -100,9 +107,4 @@ def upload_payload(builder)
100107

101108
true
102109
end
103-
104-
def execute_payload(payload_url)
105-
res = execute_get_request(url: payload_url, cookie: @session_cookie)
106-
emit_success "Result: #{res.body}" if res && res.code == 200 && !res.body.strip.empty?
107-
end
108110
end

0 commit comments

Comments
 (0)