wazuh-ruby-client 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -1
- data/README.md +33 -26
- data/lib/wazuh/api/endpoints/syscheck.rb +0 -33
- data/lib/wazuh/version.rb +1 -1
- data/lib/wazuh-ruby-client/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 63a6ddbb80cd6499e2cfe9a11f7b217db920f19f36a77c9adc0028e9395c9493
|
4
|
+
data.tar.gz: 6d83f60c2fb3cfc72d1ae0d6577c247b460b64ad3bacca2b9ee2b0a6d827793e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e14095fa07607dbbac624bec91b8bbe0da5225eb582cde3e68302c9d17891e0b548df48507434a9dd88e33c1ba76e0fd03106539ec100a41a1316466c758bfd7
|
7
|
+
data.tar.gz: 032f27fbfbdff5ad128beca87f9331abc241dfaa349278d9ca97c37bc4ba74c8e77bc95cd105939efe59c07bb93af615c17fb847cbe5cec9b546c0cc95d97225
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -78,30 +78,37 @@ Get all agents list.
|
|
78
78
|
|
79
79
|
```ruby
|
80
80
|
> client.all_agents
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
81
|
+
=> [
|
82
|
+
{
|
83
|
+
:os=>{
|
84
|
+
:arch=>"x86_64",
|
85
|
+
:codename=>"Xenial Xerus",
|
86
|
+
:major=>"16",
|
87
|
+
:minor=>"04",
|
88
|
+
:name=>"Ubuntu",
|
89
|
+
:platform=>"ubuntu",
|
90
|
+
:uname=>"Linux |wazuh-manager |4.15.0-60-generic |#67-Ubuntu SMP Thu Aug 22 16:55:30 UTC 2019 |x86_64",
|
91
|
+
:version=>"16.04.6 LTS"
|
92
|
+
},
|
93
|
+
:manager=>"wazuh-manager",
|
94
|
+
:id=>"000",
|
95
|
+
:registerIP=>"127.0.0.1",
|
96
|
+
:name=>"wazuh-manager",
|
97
|
+
:version=>"Wazuh v3.11.0",
|
98
|
+
:ip=>"127.0.0.1",
|
99
|
+
:dateAdd=>"2020-01-27 17:02:18",
|
100
|
+
:status=>"Active",
|
101
|
+
:lastKeepAlive=>"9999-12-31 23:59:59",
|
102
|
+
:node_name=>"wazuh-master-1"
|
103
|
+
},
|
104
|
+
...
|
105
|
+
]
|
106
|
+
|
107
|
+
> agents.first.os.name
|
108
|
+
=> "Ubuntu"
|
109
|
+
|
110
|
+
> agents.first.id
|
111
|
+
=> "000"
|
105
112
|
```
|
106
113
|
|
107
114
|
filter by options. (see https://mrtc0.github.io/wazuh-ruby-client/Wazuh/Api/Endpoints/Agents.html#all_agents-instance_method )
|
@@ -118,7 +125,7 @@ filter by options. (see https://mrtc0.github.io/wazuh-ruby-client/Wazuh/Api/Endp
|
|
118
125
|
List agent's packages.
|
119
126
|
|
120
127
|
```ruby
|
121
|
-
> client.packages('000')
|
128
|
+
> client.packages('000').map { |package| package.name }
|
122
129
|
=> ["python-apt-common",
|
123
130
|
"python-idna",
|
124
131
|
"libedit2",
|
@@ -133,7 +140,7 @@ List agent's packages.
|
|
133
140
|
List agents' processes.
|
134
141
|
|
135
142
|
```ruby
|
136
|
-
> client.
|
143
|
+
> client.packages('000').map { |package| package.name }
|
137
144
|
=> ["entrypoint.sh",
|
138
145
|
"my_init",
|
139
146
|
"syslog-ng",
|
@@ -55,39 +55,6 @@ module Wazuh
|
|
55
55
|
get "/syscheck/#{agent_id}/last_scan"
|
56
56
|
end
|
57
57
|
|
58
|
-
# Returns the syscheck files of an agent.
|
59
|
-
#
|
60
|
-
# @param [String] agent_id
|
61
|
-
# ID to agent
|
62
|
-
# @option options [offset] :offset
|
63
|
-
# First element to return in the collection.
|
64
|
-
# @option options [limit] :limit
|
65
|
-
# Maximum number of elements to return.
|
66
|
-
# @option options [sort] :sort
|
67
|
-
# Sorts the collection by a field or fields (separated by comma). Use +/- at the beginning to list in ascending or descending order.
|
68
|
-
# @option options [search] :search
|
69
|
-
# Looks for elements with the specified string.
|
70
|
-
# @option options [file] :file
|
71
|
-
# Filters file by filename.
|
72
|
-
# @option options [type] :type
|
73
|
-
# Selects type of file. Allowed values: file, registry
|
74
|
-
# @option options [summary] :summary
|
75
|
-
# Returns a summary grouping by filename. Allowed values: yes, no
|
76
|
-
# @option options [select] :select
|
77
|
-
# List of selected fields separated by commas.
|
78
|
-
# @option options [md5] :md5
|
79
|
-
# Returns the files with the specified md5 hash.
|
80
|
-
# @option options [sha1] :sha1
|
81
|
-
# Returns the files with the specified sha1 hash.
|
82
|
-
# @option options [sha256] :sha256
|
83
|
-
# Returns the files with the specified sha256 hash.
|
84
|
-
# @option options [hash] :hash
|
85
|
-
# Returns the files with the specified hash (md5, sha1 or sha256).
|
86
|
-
# @see https://documentation.wazuh.com/3.10/user-manual/api/reference.html#get-syscheck-files
|
87
|
-
def syscheck_files(agent_id, options)
|
88
|
-
get "/syscheck/#{agent_id}", options
|
89
|
-
end
|
90
|
-
|
91
58
|
# Runs syscheck and rootcheck on all agents (Wazuh launches both processes simultaneously).
|
92
59
|
#
|
93
60
|
# @see https://documentation.wazuh.com/3.10/user-manual/api/reference.html#run-syscheck-scan-in-all-agents
|
data/lib/wazuh/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wazuh-ruby-client
|
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
|
- mrtc0
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-02-
|
11
|
+
date: 2020-02-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|