From 6e0787887158837faa9b24e6970acd8275bb76b5 Mon Sep 17 00:00:00 2001 From: Postmodern Date: Mon, 19 Aug 2024 16:20:27 -0700 Subject: [PATCH] Added `PHPPayload#to_html` (closes #183). --- lib/ronin/payloads/php_payload.rb | 14 ++++++++++++++ spec/php_payload_spec.rb | 6 ++++++ 2 files changed, 20 insertions(+) diff --git a/lib/ronin/payloads/php_payload.rb b/lib/ronin/payloads/php_payload.rb index f9c82c8f..e6063e9a 100644 --- a/lib/ronin/payloads/php_payload.rb +++ b/lib/ronin/payloads/php_payload.rb @@ -61,6 +61,20 @@ def to_command "php -r #{Support::Encoding::Shell.quote(to_s)}" end + # + # Converts the built PHP payload into a `` HTML embed. + # + # @return [String] + # The `` HTML embed containing the built PHP payload. + # + # @api public + # + # @since 0.3.0 + # + def to_html + "" + end + end end end diff --git a/spec/php_payload_spec.rb b/spec/php_payload_spec.rb index 022b0f5c..98470c4e 100644 --- a/spec/php_payload_spec.rb +++ b/spec/php_payload_spec.rb @@ -32,4 +32,10 @@ def build expect(subject.to_command).to eq(%{php -r "echo 'PWNED';"}) end end + + describe "#to_html" do + it "must embed the built payload into a '' HTML embed" do + expect(subject.to_html).to eq(%{}) + end + end end