Module: PatronusFati::MessageProcessor::Capability
- Includes:
- PatronusFati::MessageProcessor
- Defined in:
- lib/patronus_fati/message_processor/capability.rb
Class Method Summary collapse
Methods included from PatronusFati::MessageProcessor
cleanup_models, close_inactive_connections, handle, ignored_types, offline_access_points, offline_clients, periodic_flush
Methods included from FactoryBase
#class_to_name, #factory, #ignored_types, #included, #registered_factories
Class Method Details
.process(obj) ⇒ void
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/patronus_fati/message_processor/capability.rb', line 4 def self.process(obj) # The capability detection for the capability command is broken. It # returns the name of the command followed by the capabilities but the # result of a request ignores that it also sends back the name of the # command. We don't want to mess up our parsing so we work around it by # ignoring these messages. return if obj.name == 'CAPABILITY' return unless PatronusFati::MessageModels.const_defined?(obj.name.downcase.capitalize) target_cap = PatronusFati::MessageModels.const_get(obj.name.downcase.capitalize) target_cap.supported_keys = obj.capabilities.split(',').map(&:to_sym) keys_to_enable = target_cap.enabled_keys.map(&:to_s).join(',') # Limit the amount of data kismet gives us to only the interesting stuff return unless %w(ERROR PROTOCOLS ALERT BSSID SSID CLIENT CRITFAIL).include?(obj.name) # Return the response to the server "ENABLE #{obj.name} #{keys_to_enable}" end |