threshold 0.2.0 → 0.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/README.md +1 -1
- data/lib/threshold/thresholds.rb +28 -0
- data/lib/threshold/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: a595437c5a3c85288a7dfba97a0359719fec9757
|
|
4
|
+
data.tar.gz: 5a0c0e9290e14a89ff58dc9dc9ea79092348fd5a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 889e86ab47cc43a20f2b66428ecc3c521cb319db2efa8193eac0145e366cbb054618313ab4f6a200e390ffc33daaf838089bf348fea96b3daa104d958734aebf
|
|
7
|
+
data.tar.gz: 99f4949c3c0b4d60a049516ffc4cbf305bfdae37302ba92f577ed989e16b809dd6485f24c47c63a7e0548ddc949293417dad1b7f0bbe9a3f8b0cffcdd48a427a
|
data/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# snort-thresholds
|
|
2
2
|
[](http://badge.fury.io/rb/threshold)
|
|
3
|
-
[]()
|
|
3
|
+
[](http://badge.fury.io/rb/threshold)
|
|
4
4
|
|
|
5
5
|
Threshold is an ORM to map to Snort 2.9.x threshold.conf files.
|
|
6
6
|
|
data/lib/threshold/thresholds.rb
CHANGED
|
@@ -174,6 +174,34 @@ module Threshold
|
|
|
174
174
|
Thresholds.new(@thresholds - an0ther.to_a)
|
|
175
175
|
end
|
|
176
176
|
|
|
177
|
+
# Returns a new Threshold Object with just suppressions
|
|
178
|
+
def suppressions(&blk)
|
|
179
|
+
if block_given?
|
|
180
|
+
self.suppressions.select(&blk)
|
|
181
|
+
else
|
|
182
|
+
Thresholds.new(@thresholds.select{|t| t.class.to_s == "Threshold::Suppression"})
|
|
183
|
+
end
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
# Returns a new Threshold Object with just event_filters
|
|
187
|
+
def event_filters(&blk)
|
|
188
|
+
if block_given?
|
|
189
|
+
self.event_filters.select(&blk)
|
|
190
|
+
else
|
|
191
|
+
Thresholds.new(@thresholds.select{|t| t.class.to_s == "Threshold::EventFilter"})
|
|
192
|
+
end
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
# Returns a new Threshold Object with just rate_filters
|
|
196
|
+
def rate_filters(&blk)
|
|
197
|
+
if block_given?
|
|
198
|
+
self.rate_filters.select(&blk)
|
|
199
|
+
else
|
|
200
|
+
Thresholds.new(@thresholds.select{|t| t.class.to_s == "Threshold::RateFilter"})
|
|
201
|
+
end
|
|
202
|
+
end
|
|
203
|
+
|
|
204
|
+
|
|
177
205
|
private
|
|
178
206
|
|
|
179
207
|
def stored_hash=(foo)
|
data/lib/threshold/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: threshold
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Shadowbq
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2015-01-
|
|
12
|
+
date: 2015-01-24 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: veto
|