Sha256: 55df979d2e2a44138015fcad3358d2639a02e0a66724e42938d8af52cef6c91f
Contents?: true
Size: 1.26 KB
Versions: 1
Compression:
Stored size: 1.26 KB
Contents
module Ownlan # Access point for the gem configurations. # # @return [Ownlan::Configuration] a configuration instance. def self.config @config ||= Configuration.new end # Configure hook used in the gem initializer. Convinient way to set all the # gem configurations. # # example: # Ownlan.configure do |config| # config.depth = 3 # end # # @return [void] def self.configure yield config if block_given? end class Configuration attr_accessor :attack, :protect, :broadcast, :capture, :client, :gateway, :ntoa, :fake_ip_conflict, :stealth, :static, :freeze, :resynchronize, :delay, :interface, :version, :help, :victim_ip, :random_mac, :modes # Create a new instance. # # @return [Ownlan::Configuration] def initialize @modes = { attack: attack_sub_modes, protect: protect_sub_modes, manual: manual_sub_modes } @interface = 'wlan0' @delay = 0.5 end private def main_modes [:attack, :protect, :manual] end def attack_sub_modes [:client, :gateway, :ntoa, :fake_ip_conflict] end def protect_sub_modes [:freeze, :resynchronize, :static, :stealth] end def manual_sub_modes [:broadcast, :capture] end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ownlan-0.3.0 | lib/ownlan/config.rb |