arii 1.0.3 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/arii/sqldetector.rb +6 -4
- data/lib/arii/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9df555b89a5f0b1fa014ba97a5d55facbde69bf8
|
4
|
+
data.tar.gz: dfb3002099044484221ad19033e0c20033e151eb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a73c76523e6f5c65ebe8b0367718977d6ecf20022519c1bd7e7eec3a71839212bc59eeee6efcb86331013561d4b741cac0f4fdc38161c622de38b2bcd77d09c0
|
7
|
+
data.tar.gz: 1ba2febff9ee5d54a3ec4e30526bfe84b3740b091e564e8665024295e0ad2156f377ef3dae2b5dc8949462ac22ce4de9d2d75e839002ca268519622804451a8e
|
data/lib/arii/sqldetector.rb
CHANGED
@@ -15,11 +15,13 @@ module ARII
|
|
15
15
|
# == Detect the changes
|
16
16
|
#
|
17
17
|
def detect object
|
18
|
+
puts "object #{object}"
|
19
|
+
#puts "agent #{@agent}"
|
18
20
|
ARII::Config.log.debug(self.class.name) {"Monitoring #{object[:host]}"}
|
19
21
|
begin
|
20
22
|
@client = Mysql2::Client.new(:host => object[:host], :username => object[:username] , :password => object[:password] , :database => object[:database])
|
21
|
-
puts
|
22
|
-
@client.query(
|
23
|
+
puts object[:query]
|
24
|
+
@client.query(object[:query]).each(:symbolize_keys => false) do |row|
|
23
25
|
puts row
|
24
26
|
unless object[:cache].nil? then
|
25
27
|
@response = Cashier.verify row[object[:cache]], object, row, object[:seed]
|
@@ -39,7 +41,7 @@ module ARII
|
|
39
41
|
# The actual processing
|
40
42
|
#
|
41
43
|
if @cache[:status] == 100 then
|
42
|
-
|
44
|
+
ARII::Config.log.info(self.class.name) {"Not on cache, generating payload"}
|
43
45
|
# add row data to payload from selectors (key => key, value => column name)
|
44
46
|
payload = Hash.new
|
45
47
|
object[:selectors].each do |selector|
|
@@ -57,4 +59,4 @@ module ARII
|
|
57
59
|
@cache[:templates]
|
58
60
|
end
|
59
61
|
end
|
60
|
-
end
|
62
|
+
end
|
data/lib/arii/version.rb
CHANGED