dap 0.1.14 → 0.1.15

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: df3b1c01690f3a54afec98038a1ff7672176a1da
4
- data.tar.gz: fb5d605febd56886448b172ba6a10728c4804129
3
+ metadata.gz: adf8abb293a1c85685f6fc76159e3ab5be1dc757
4
+ data.tar.gz: 1205a2a56d1650c411558601e2cd8f028779a980
5
5
  SHA512:
6
- metadata.gz: 32adb86fe2a9e8a124d50e5c24cd2d5ee27f33f48781dbe5026eab0492a151874d6148018f1d0d8945986749012a9956166a05cb0d7d6b408d8db322436933af
7
- data.tar.gz: 6060c1dd5b6491024ecaaaa62b3afe48805e209e67a6fd5751d455f8ef58951a1bf7bd066214f44e45d7443213f0541ffc1e9b66b5ff4bbbb7d155f9876148d4
6
+ metadata.gz: 60103d15be7a449573bfb1c8b496978e60bd86f5949443c886ae10fd32985c542bcfe1442075bc91fee869b4910497ed0ac628dbfb4cd1b48f67a87ae0c95b7f
7
+ data.tar.gz: 15dce6f7722ae2d7424163af019d810faf055baabfeda62756983e6255ce22e1a2b761ff1d48ef457b19cab1be38df4cc5d9b0cd0f54e2524fdaae17a56134ef
@@ -4,7 +4,7 @@ module Dap
4
4
  module Filter
5
5
 
6
6
  module GeoIPLibrary
7
- GEOIP_DIRS = [
7
+ GEOIP_DIRS = [
8
8
  File.expand_path( File.join( File.dirname(__FILE__), "..", "..", "..", "data")),
9
9
  "/var/lib/geoip"
10
10
  ]
@@ -38,18 +38,20 @@ module GeoIPLibrary
38
38
  break
39
39
  end
40
40
  end
41
- end
41
+ end
42
42
  end
43
43
 
44
44
 
45
45
  #
46
- # Add GeoIP tags using the MaxMind GeoIP::City
46
+ # Add GeoIP tags using the MaxMind GeoIP::City
47
47
  #
48
48
  class FilterGeoIP
49
49
  include BaseDecoder
50
50
  include GeoIPLibrary
51
51
  def decode(ip)
52
- return unless @@geo_city
52
+ unless @@geo_city
53
+ raise "No MaxMind GeoIP::City data found"
54
+ end
53
55
  geo_hash = @@geo_city.look_up(ip)
54
56
  return unless geo_hash
55
57
  ret = {}
@@ -57,7 +59,7 @@ class FilterGeoIP
57
59
  next unless k
58
60
  ret[k.to_s] = v.to_s
59
61
  end
60
-
62
+
61
63
  ret
62
64
  end
63
65
  end
@@ -69,7 +71,9 @@ class FilterGeoIPOrg
69
71
  include BaseDecoder
70
72
  include GeoIPLibrary
71
73
  def decode(ip)
72
- return unless @@geo_orgs
74
+ unless @@geo_orgs
75
+ raise "No MaxMind GeoIP::Organization data found"
76
+ end
73
77
  geo_hash = @@geo_orgs.look_up(ip)
74
78
  return unless (geo_hash and geo_hash[:name])
75
79
  { :org => geo_hash[:name] }
@@ -78,12 +82,14 @@ end
78
82
 
79
83
  #
80
84
  # Add GeoIP ASN tags using the MaxMind GeoIP::ASN database
81
- #
85
+ #
82
86
  class FilterGeoIPAsn
83
87
  include BaseDecoder
84
88
  include GeoIPLibrary
85
89
  def decode(ip)
86
- return unless @@geo_asn
90
+ unless @@geo_asn
91
+ raise "No MaxMind GeoIP::ASN data found"
92
+ end
87
93
  geo_hash = @@geo_asn.look_up(ip)
88
94
  return unless (geo_hash and geo_hash[:name])
89
95
  { :asn => geo_hash[:name].split(' ')[0] }
@@ -1,3 +1,3 @@
1
1
  module Dap
2
- VERSION = "0.1.14"
2
+ VERSION = "0.1.15"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dap
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.14
4
+ version: 0.1.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rapid7 Research
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-05-09 00:00:00.000000000 Z
11
+ date: 2018-06-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -253,7 +253,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
253
253
  version: '0'
254
254
  requirements: []
255
255
  rubyforge_project:
256
- rubygems_version: 2.5.2
256
+ rubygems_version: 2.4.5.2
257
257
  signing_key:
258
258
  specification_version: 4
259
259
  summary: 'DAP: The Data Analysis Pipeline'