Sha256: b3fcd8e16dfb619dd766a44760e243d1d59fa686a8d0dfd58edf4f51a5b9b7f9
Contents?: true
Size: 1.04 KB
Versions: 65
Compression:
Stored size: 1.04 KB
Contents
module PatronusFati::MessageProcessor::Capability include PatronusFati::MessageProcessor 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 end
Version data entries
65 entries across 65 versions & 1 rubygems