Skip to content

Commit ecd6df5

Browse files
committed
Added missing Web.exploit_type.
1 parent ef92953 commit ecd6df5

File tree

3 files changed

+25
-1
lines changed

3 files changed

+25
-1
lines changed

lib/ronin/exploits/web.rb

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,22 @@ class Web < Exploit
3434

3535
include Mixins::HTTP
3636

37+
#
38+
# Returns the type or kind of exploit.
39+
#
40+
# @return [Symbol]
41+
#
42+
# @note
43+
# This is used internally to map an exploit class to a printable type.
44+
#
45+
# @api private
46+
#
47+
# @since 1.2.0
48+
#
49+
def self.exploit_type
50+
:web
51+
end
52+
3753
end
3854
end
3955
end

spec/cli/text_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class TestCommand < Ronin::Exploits::CLI::Command
5252
Ronin::Exploits::SEHOverflow => 'SEH Overflow',
5353
Ronin::Exploits::HeapOverflow => 'Heap Overflow',
5454
Ronin::Exploits::UseAfterFree => 'Use After Free',
55-
Ronin::Exploits::Web => 'Custom',
55+
Ronin::Exploits::Web => 'Web',
5656
Ronin::Exploits::LFI => 'Local File Inclusion (LFI)',
5757
Ronin::Exploits::RFI => 'Remote File Inclusion (RFI)',
5858
Ronin::Exploits::SQLI => 'SQL injection (SQLI)',

spec/web_spec.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,12 @@
99
it "must include Ronin::Exploits::Mixin::HTTP" do
1010
expect(described_class).to include(Ronin::Exploits::Mixins::HTTP)
1111
end
12+
13+
describe ".exploit_type" do
14+
subject { described_class }
15+
16+
it "must return :web" do
17+
expect(subject.exploit_type).to eq(:web)
18+
end
19+
end
1220
end

0 commit comments

Comments
 (0)