-
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
92837f6
commit 8dd3447
Showing
4 changed files
with
70 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# frozen_string_literal: true | ||
# | ||
# ronin-exploits - A Ruby library for ronin-rb that provides exploitation and | ||
# payload crafting functionality. | ||
# | ||
# Copyright (c) 2007-2024 Hal Brodigan (postmodern.mod3 at gmail.com) | ||
# | ||
# ronin-exploits is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU Lesser General Public License as published | ||
# by the Free Software Foundation, either version 3 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# ronin-exploits is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU Lesser General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU Lesser General Public License | ||
# along with ronin-exploits. If not, see <https://www.gnu.org/licenses/>. | ||
# | ||
|
||
require 'ronin/exploits/exploit' | ||
|
||
module Ronin | ||
module Exploits | ||
# | ||
# Represents an authentication bypass exploit. | ||
# | ||
# @api public | ||
# | ||
# @since 1.2.0 | ||
# | ||
class AuthBypass < Exploit | ||
|
||
# | ||
# Returns the type or kind of exploit. | ||
# | ||
# @return [Symbol] | ||
# | ||
# @note | ||
# This is used internally to map an exploit class to a printable type. | ||
# | ||
# @api private | ||
# | ||
def self.exploit_type | ||
:auth_bypass | ||
end | ||
|
||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
require 'spec_helper' | ||
require 'ronin/exploits/auth_bypass' | ||
|
||
describe Ronin::Exploits::AuthBypass do | ||
it "must inherit from Ronin::Exploits::Exploit" do | ||
expect(described_class).to be < Ronin::Exploits::Exploit | ||
end | ||
|
||
describe ".exploit_type" do | ||
subject { described_class } | ||
|
||
it { expect(subject.exploit_type).to eq(:auth_bypass) } | ||
end | ||
end |