Sha256: f0d85dfb1da8c3c50d7e3c7f4ee30507ebfa3429ddab37f3e6c6e7f6ee12adfe

Contents?: true

Size: 1.55 KB

Versions: 6

Compression:

Stored size: 1.55 KB

Contents

# frozen_string_literal: true
#
# ronin-exploits - A Ruby library for ronin-rb that provides exploitation and
# payload crafting functionality.
#
# Copyright (c) 2007-2023 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/>.
#

module Ronin
  module Exploits
    module Params
      #
      # Adds an optional `bind_host` param to the exploit.
      #
      # @api public
      #
      # @since 1.0.0
      #
      module BindHost
        #
        # Adds the `bind_host` param to the exploit class.
        #
        # @param [Class<Ronin::Exploits::Exploit>] exploit
        #   The exploit class including {Params::BindPort}.
        #
        def self.included(exploit)
          exploit.param :bind_host, desc: 'Local host to bind to'
        end

        #
        # The `bind_host` param.
        #
        # @return [String]
        #
        def bind_host
          params[:bind_host]
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
ronin-exploits-1.0.6 lib/ronin/exploits/params/bind_host.rb
ronin-exploits-1.0.5 lib/ronin/exploits/params/bind_host.rb
ronin-exploits-1.0.4 lib/ronin/exploits/params/bind_host.rb
ronin-exploits-1.0.3 lib/ronin/exploits/params/bind_host.rb
ronin-exploits-1.0.2 lib/ronin/exploits/params/bind_host.rb
ronin-exploits-1.0.1 lib/ronin/exploits/params/bind_host.rb