File tree Expand file tree Collapse file tree 3 files changed +25
-1
lines changed
Expand file tree Collapse file tree 3 files changed +25
-1
lines changed Original file line number Diff line number Diff 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
3955end
Original file line number Diff line number Diff 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)' ,
Original file line number Diff line number Diff line change 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
1220end
You can’t perform that action at this time.
0 commit comments