patronus_fati 1.2.0 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/patronus_fati/message_processor/client.rb +11 -3
- data/lib/patronus_fati/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 834ec87c87d7d827048e86216be2e44976f82799
|
4
|
+
data.tar.gz: '09464ed15eba72388c2a8d5d35a196dfb20dea07'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 360d209f018964966b6f32539836362e9061924a2ab2859aef83359780610f53877a269cd14fae7490fb980b308214efbc7ba10fd74d0260f6ca3148e78c03fd
|
7
|
+
data.tar.gz: 1024400265408e37bcad86eb0dbe37d6007e37586b0d566b601fca49a9791afd27905e278369422a03a1f21561e8b5402c09c965b30cebc13ac6c76ff42f9274
|
@@ -17,8 +17,10 @@ module PatronusFati::MessageProcessor::Client
|
|
17
17
|
# obj[:mac] is the client's MAC address
|
18
18
|
# obj[:bssid] is the AP's MAC address
|
19
19
|
unless obj[:bssid].nil? || obj[:bssid].empty? || obj[:bssid] == obj[:mac]
|
20
|
-
|
21
|
-
|
20
|
+
if PatronusFati::DataModels::AccessPoint.exists?(obj[:bssid])
|
21
|
+
access_point = PatronusFati::DataModels::AccessPoint[obj[:bssid]]
|
22
|
+
access_point.presence.mark_visible
|
23
|
+
end
|
22
24
|
end
|
23
25
|
|
24
26
|
# Some messages from kismet come in corrupted with partial MACs. We care
|
@@ -46,12 +48,18 @@ module PatronusFati::MessageProcessor::Client
|
|
46
48
|
return if access_point.nil? ||
|
47
49
|
obj[:lasttime] < PatronusFati::DataModels::Connection.current_expiration_threshold
|
48
50
|
|
51
|
+
connection_key = "#{obj[:bssid]}^#{obj[:mac]}"
|
52
|
+
|
53
|
+
# from_ds are leaking wired assets, allow updating of connections but not
|
54
|
+
# creation
|
55
|
+
return obj[:type] == 'from_ds' &&
|
56
|
+
!PatronusFati::DataModels::Connection.exists?(connection_key)
|
57
|
+
|
49
58
|
access_point.add_client(obj[:mac])
|
50
59
|
access_point.announce_changes
|
51
60
|
|
52
61
|
client.add_access_point(obj[:bssid])
|
53
62
|
|
54
|
-
connection_key = "#{obj[:bssid]}^#{obj[:mac]}"
|
55
63
|
connection = PatronusFati::DataModels::Connection[connection_key]
|
56
64
|
connection.presence.mark_visible
|
57
65
|
connection.announce_changes
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: patronus_fati
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sam Stelfox
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-05-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: louis
|