winevt_c 0.3.1-x86-mingw32 → 0.3.2-x86-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: d810f976d0bd182ffdf7bf16c5ae321e80098f975a4e5c25538f120d84e75106
|
4
|
+
data.tar.gz: 06c5cab117100dfa64050a9153736c82ed9a85d571b5c1d4b818cb505209b1cd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 536343216d88429c3be1aff745e6ebbc41194f38dfd2bd34ece1e0b75df77e62f562dabad06bb16b4ddc6031ede1d898854817dc5694c12f37135eadac3b8a1f
|
7
|
+
data.tar.gz: c6b5242c05ad3988df136a7d9a143d3e31ca1d45137c2ff5e5d4e0df660d32fe3eafb6fbead2ca85a5040b5f408c669d9a1674acaa14d64dfafe57d680876699
|
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