winevt_c 0.3.1-x64-mingw32 → 0.3.2-x64-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/example/eventlog.rb +1 -9
- data/example/tailing.rb +2 -6
- data/lib/winevt/2.4/winevt.so +0 -0
- data/lib/winevt/2.5/winevt.so +0 -0
- data/lib/winevt/2.6/winevt.so +0 -0
- data/lib/winevt/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 796d07047951ecc8f038dfec2db2bf970da7f8a4f63b6ca9c0c01136fb5cb4cf
|
4
|
+
data.tar.gz: bad21f43be67c17e8b54721ecb34cfd6c00cd4b51c0f81cf84c5596829931c72
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e15c6bb8b48c107e6534f4d727331ae020aa431cb8f4264bd47dc6455dad37dd9ce658f0a1f1b0314a9f46d46c3b7e2d1562d5d3f6df6b62f184cc25c082b0a0
|
7
|
+
data.tar.gz: ecc10d8c811200216058dc6072fd43920aafd98903b5d60203a0240531908ca65cb7445e564a94890ca3f9022da9c4722299aea0e27cced890e6f5ab57513164
|
data/example/eventlog.rb
CHANGED
@@ -3,14 +3,6 @@ require 'rexml/document'
|
|
3
3
|
|
4
4
|
@query = Winevt::EventLog::Query.new("Application", "*[System[(Level <= 3) and TimeCreated[timediff(@SystemTime) <= 86400000]]]")
|
5
5
|
|
6
|
-
@query.each do |eventlog, message|
|
7
|
-
doc = REXML::Document.new(eventlog)
|
8
|
-
nodes = []
|
9
|
-
REXML::XPath.each(doc, "/Event/EventData/Data") do |node|
|
10
|
-
nodes << node.text
|
11
|
-
end
|
12
|
-
message = message.gsub(/(%\d+)/, '\1$s')
|
13
|
-
message = sprintf(message, *nodes)
|
14
|
-
|
6
|
+
@query.each do |eventlog, message, string_inserts|
|
15
7
|
puts ({eventlog: eventlog, data: message})
|
16
8
|
end
|
data/example/tailing.rb
CHANGED
@@ -8,13 +8,9 @@ while (1) do
|
|
8
8
|
if @subscribe.next
|
9
9
|
eventlog = @subscribe.render
|
10
10
|
message = @subscribe.message
|
11
|
-
|
12
|
-
nodes = []
|
13
|
-
REXML::XPath.each(doc, "/Event/EventData/Data") do |node|
|
14
|
-
nodes << node.text
|
15
|
-
end
|
11
|
+
string_inserts = @subscribe.string_inserts
|
16
12
|
message = message.gsub(/(%\d+)/, '\1$s')
|
17
|
-
message = sprintf(message, *
|
13
|
+
message = sprintf(message, *string_inserts)
|
18
14
|
|
19
15
|
puts ({eventlog: eventlog, data: message})
|
20
16
|
else
|
data/lib/winevt/2.4/winevt.so
CHANGED
Binary file
|
data/lib/winevt/2.5/winevt.so
CHANGED
Binary file
|
data/lib/winevt/2.6/winevt.so
CHANGED
Binary file
|
data/lib/winevt/version.rb
CHANGED