Module: PatronusFati
- Defined in:
- lib/patronus_fati.rb,
lib/patronus_fati/consts.rb,
lib/patronus_fati/version.rb,
lib/patronus_fati/presence.rb,
lib/patronus_fati/bit_field.rb,
lib/patronus_fati/bit_helper.rb,
lib/patronus_fati/cap_struct.rb,
lib/patronus_fati/connection.rb,
lib/patronus_fati/factory_base.rb,
lib/patronus_fati/event_handler.rb,
lib/patronus_fati/message_models.rb,
lib/patronus_fati/message_parser.rb,
lib/patronus_fati/data_models/ssid.rb,
lib/patronus_fati/message_processor.rb,
lib/patronus_fati/data_models/client.rb,
lib/patronus_fati/message_models/ack.rb,
lib/patronus_fati/message_models/gps.rb,
lib/patronus_fati/message_models/info.rb,
lib/patronus_fati/message_models/ssid.rb,
lib/patronus_fati/message_models/time.rb,
lib/patronus_fati/message_models/alert.rb,
lib/patronus_fati/message_models/bssid.rb,
lib/patronus_fati/message_models/error.rb,
lib/patronus_fati/message_models/client.rb,
lib/patronus_fati/message_models/clisrc.rb,
lib/patronus_fati/message_models/clitag.rb,
lib/patronus_fati/message_models/common.rb,
lib/patronus_fati/message_models/kismet.rb,
lib/patronus_fati/message_models/nettag.rb,
lib/patronus_fati/message_models/packet.rb,
lib/patronus_fati/message_models/plugin.rb,
lib/patronus_fati/message_models/remove.rb,
lib/patronus_fati/message_models/source.rb,
lib/patronus_fati/message_models/status.rb,
lib/patronus_fati/message_models/string.rb,
lib/patronus_fati/message_models/wepkey.rb,
lib/patronus_fati/data_models/connection.rb,
lib/patronus_fati/message_models/battery.rb,
lib/patronus_fati/message_models/channel.rb,
lib/patronus_fati/message_models/bssidsrc.rb,
lib/patronus_fati/message_models/critfail.rb,
lib/patronus_fati/message_models/spectrum.rb,
lib/patronus_fati/data_models/access_point.rb,
lib/patronus_fati/data_models/common_state.rb,
lib/patronus_fati/message_models/btscandev.rb,
lib/patronus_fati/message_models/protocols.rb,
lib/patronus_fati/message_models/terminate.rb,
lib/patronus_fati/message_models/trackinfo.rb,
lib/patronus_fati/message_models/capability.rb
Defined Under Namespace
Modules: BitHelper, CapStruct, DataModels, DataObservers, FactoryBase, MessageModels, MessageParser, MessageProcessor Classes: BitField, Connection, EventHandler, Presence
Constant Summary collapse
- BSSID_TYPE_MAP =
{ 0 => 'infrastructure', 1 => 'adhoc', 2 => 'probe', 3 => 'turbocell', 4 => 'data', 255 => 'mixed', 256 => 'remove' }
- CLIENT_TYPE_MAP =
‘DS’ is short for distribution system, it has something to do with packet domains ‘BSS’ (the prefix on BSSID) but it’s clear that identifier is more than what I thought it was…
{ 0 => 'unknown', 1 => 'from_ds', 2 => 'to_ds', 3 => 'inter_ds', 4 => 'established', 5 => 'adhoc', 6 => 'remove' }
- DATA_DELIMITER =
/(\x01[^\x01]+\x01)|(\S+)/
- SSID_CRYPT_MAP =
This map was retrieved from a combination of the packet_ieee80211.h header file and dumpfile_netxml.cc source in the kismet git repo.
{ 0 => 'None', 1 => 'Unknown', (1 << 1) => 'WEP', (1 << 2) => 'Layer3', (1 << 3) => 'WEP40', (1 << 4) => 'WEP104', (1 << 5) => 'WPA+TKIP', (1 << 7) => 'WPA+PSK', (1 << 8) => 'WPA+AES-OCB', (1 << 9) => 'WPA+AES-CCM', (1 << 10) => 'WPA+LEAP', (1 << 11) => 'WPA+TTLS', (1 << 12) => 'WPA+TLS', (1 << 13) => 'WPA+PEAP', (1 << 14) => 'ISAKMP', (1 << 15) => 'PPTP', (1 << 16) => 'Fortress', (1 << 17) => 'Keyguard', (1 << 18) => 'Unknown_NonWEP', (1 << 19) => 'WPA Migration Mode', (1 << 20) => 'WPA', (1 << 21) => 'WPA2', (1 << 26) => 'WPS', }
- SSID_CRYPT_MAP_INVERTED =
Hash[SSID_CRYPT_MAP.map { |k, v| [v, k]
- SSID_TYPE_MAP =
{ 0 => 'beacon', 1 => 'probe_response', 2 => 'probe_request', 3 => 'file' }
- SERVER_MESSAGE =
/ (?<header> [A-Z]+){0} (?<data> .+){0} ^\*\g<header>:\s+\g<data>$ /x
- SYNC_FLAGS =
Various states of synchronization an individual model can be in. The various sync states should remain exclusive to each other (no more than one should be set). Dirtiness is an indicator of what we need to sync.
{ unsynced: 0, syncedOnline: 1, syncedOffline: (1 << 1), dirtyAttributes: (1 << 2), dirtyChildren: (1 << 3), }.freeze
- SIGNAL_THRESHOLD =
The minimum signal threshold we’ll use to decide whether or not to track a new access point or client. This help remove noise in the produced data.
-86
- SIMULTANEOUS_SSID_THRESHOLD =
This is how many tracked intervals that need to be seen overlapping before we consider an access point as transmitting multiple SSIDs. The length of this is dependent on the length of presence intervals. The value of INTERVAL_DURATION determines the length of one interval.
2
- AP_EXPIRATION =
Number of seconds before we consider an access point as offline
300
- CLIENT_EXPIRATION =
Number of seconds before we consider a client as no longer within range.
1800
- CONNECTION_EXPIRATION =
How long before a connection between a client and an access point is consider no longer actively connected.
1800
- SSID_EXPIRATION =
Number of seconds before we consider an access point no longer advertising an SSID. It is safe for this to be longer than the AP expiration; If we think the AP has gone offline we will automatically mark all SSIDs as inactive.
600
- WPS_SETTING_MAP =
{ 0 => 'NO_WPS', 1 => 'WPS_CONFIGURED', (1 << 1) => 'WPS_NOT_CONFIGURED', (1 << 2) => 'WPS_LOCKED', }
- WINDOW_LENGTH =
How many seconds do each of our windows last
3600
- WINDOW_INTERVALS =
How many intervals do we break each of our windows into? This must be less than 64.
60
- INTERVAL_DURATION =
How long each interval will last in seconds
WINDOW_LENGTH / WINDOW_INTERVALS
- Error =
Class.new(StandardError)
- DisconnectError =
Class.new(PatronusFati::Error)
- ParseError =
Class.new(PatronusFati::Error)
- VERSION =
'1.3.7'
- @@startup_time =
Time.now.to_i
Class Method Summary collapse
- .event_handler ⇒ void
- .logger ⇒ void
- .logger=(logger) ⇒ void
- .past_initial_flood! ⇒ void
- .past_initial_flood? ⇒ Boolean
- .setup(kismet_server, kismet_port) ⇒ void
- .startup_time ⇒ void
Class Method Details
.event_handler ⇒ void
38 39 40 |
# File 'lib/patronus_fati.rb', line 38 def self.event_handler @event_handler ||= PatronusFati::EventHandler.new end |
.logger ⇒ void
46 47 48 |
# File 'lib/patronus_fati.rb', line 46 def self.logger @@logger ||= Logger.new(STDOUT) end |
.logger=(logger) ⇒ void
50 51 52 |
# File 'lib/patronus_fati.rb', line 50 def self.logger=(logger) @@logger = logger end |
.past_initial_flood! ⇒ void
62 63 64 |
# File 'lib/patronus_fati.rb', line 62 def self.past_initial_flood! @@flood_status = true end |
.past_initial_flood? ⇒ Boolean
58 59 60 |
# File 'lib/patronus_fati.rb', line 58 def self.past_initial_flood? @@flood_status ||= false end |
.setup(kismet_server, kismet_port) ⇒ void
42 43 44 |
# File 'lib/patronus_fati.rb', line 42 def self.setup(kismet_server, kismet_port) PatronusFati::Connection.new(kismet_server, kismet_port) end |
.startup_time ⇒ void
54 55 56 |
# File 'lib/patronus_fati.rb', line 54 def self.startup_time @@startup_time end |