pwn 0.4.727 → 0.4.729
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/pwn/plugins/black_duck_binary_analysis.rb +72 -0
- data/lib/pwn/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: 342b2e93bde34396f0881a3ca94d5940a83e397b1c2e129944d9cb4e1761b38d
|
|
4
|
+
data.tar.gz: 9f608f6bacfd4ebb42516f3594b74140c6b07055d5500d14959a1b3e13083e08
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2bfe0361b99bcea9fe446f7f3df17654a8b0128c6fcce8ae6c11028d41cd3f0ca59452fb6363aba58fe37c05262d59e27f45c3e1967a2fa9f9c92d87019b076f
|
|
7
|
+
data.tar.gz: 4572649902d6fac50fc7b87504893c530368b106e6c086fd8756109aecb13eec5a6d710d79c827b816c009478c5667e2d9fbc26f2b2226c6020783f62e8654ad
|
data/README.md
CHANGED
|
@@ -37,7 +37,7 @@ $ rvm use ruby-3.2.2@pwn
|
|
|
37
37
|
$ rvm list gemsets
|
|
38
38
|
$ gem install --verbose pwn
|
|
39
39
|
$ pwn
|
|
40
|
-
pwn[v0.4.
|
|
40
|
+
pwn[v0.4.729]:001 >>> PWN.help
|
|
41
41
|
```
|
|
42
42
|
|
|
43
43
|
[](https://youtu.be/G7iLUY4FzsI)
|
|
@@ -52,7 +52,7 @@ $ rvm use ruby-3.2.2@pwn
|
|
|
52
52
|
$ gem uninstall --all --executables pwn
|
|
53
53
|
$ gem install --verbose pwn
|
|
54
54
|
$ pwn
|
|
55
|
-
pwn[v0.4.
|
|
55
|
+
pwn[v0.4.729]:001 >>> PWN.help
|
|
56
56
|
```
|
|
57
57
|
|
|
58
58
|
|
|
@@ -129,6 +129,24 @@ module PWN
|
|
|
129
129
|
spinner.stop
|
|
130
130
|
end
|
|
131
131
|
|
|
132
|
+
# Supported Method Parameters::
|
|
133
|
+
# response = PWN::Plugins::BlackDuckBinaryAnalysis.get_apps(
|
|
134
|
+
# token: 'required - Bearer token'
|
|
135
|
+
# )
|
|
136
|
+
|
|
137
|
+
public_class_method def self.get_apps(opts = {})
|
|
138
|
+
token = opts[:token]
|
|
139
|
+
|
|
140
|
+
response = bd_bin_analysis_rest_call(
|
|
141
|
+
token: token,
|
|
142
|
+
rest_call: 'apps'
|
|
143
|
+
)
|
|
144
|
+
|
|
145
|
+
JSON.parse(response, symbolize_names: true)
|
|
146
|
+
rescue StandardError => e
|
|
147
|
+
raise e
|
|
148
|
+
end
|
|
149
|
+
|
|
132
150
|
# Supported Method Parameters::
|
|
133
151
|
# response = PWN::Plugins::BlackDuckBinaryAnalysis.get_groups(
|
|
134
152
|
# token: 'required - Bearer token'
|
|
@@ -147,6 +165,46 @@ module PWN
|
|
|
147
165
|
raise e
|
|
148
166
|
end
|
|
149
167
|
|
|
168
|
+
# Supported Method Parameters::
|
|
169
|
+
# response = PWN::Plugins::BlackDuckBinaryAnalysis.get_apps_by_group(
|
|
170
|
+
# token: 'required - Bearer token',
|
|
171
|
+
# group_id: 'required - group id'
|
|
172
|
+
# )
|
|
173
|
+
|
|
174
|
+
public_class_method def self.apps_by_group(opts = {})
|
|
175
|
+
token = opts[:token]
|
|
176
|
+
group_id = opts[:group_id]
|
|
177
|
+
|
|
178
|
+
response = bd_bin_analysis_rest_call(
|
|
179
|
+
token: token,
|
|
180
|
+
rest_call: "apps/#{group_id}"
|
|
181
|
+
)
|
|
182
|
+
|
|
183
|
+
JSON.parse(response, symbolize_names: true)
|
|
184
|
+
rescue StandardError => e
|
|
185
|
+
raise e
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
# Supported Method Parameters::
|
|
189
|
+
# response = PWN::Plugins::BlackDuckBinaryAnalysis.get_group_details(
|
|
190
|
+
# token: 'required - Bearer token',
|
|
191
|
+
# group_id: 'required - group id'
|
|
192
|
+
# )
|
|
193
|
+
|
|
194
|
+
public_class_method def self.get_group_details(opts = {})
|
|
195
|
+
token = opts[:token]
|
|
196
|
+
group_id = opts[:group_id]
|
|
197
|
+
|
|
198
|
+
response = bd_bin_analysis_rest_call(
|
|
199
|
+
token: token,
|
|
200
|
+
rest_call: "groups/#{group_id}"
|
|
201
|
+
)
|
|
202
|
+
|
|
203
|
+
JSON.parse(response, symbolize_names: true)
|
|
204
|
+
rescue StandardError => e
|
|
205
|
+
raise e
|
|
206
|
+
end
|
|
207
|
+
|
|
150
208
|
# Supported Method Parameters::
|
|
151
209
|
# response = PWN::Plugins::BlackDuckBinaryAnalysis.upload_file(
|
|
152
210
|
# token: 'required - Bearer token',
|
|
@@ -192,10 +250,24 @@ module PWN
|
|
|
192
250
|
|
|
193
251
|
public_class_method def self.help
|
|
194
252
|
puts "USAGE:
|
|
253
|
+
response = #{self}.get_apps(
|
|
254
|
+
token: 'required - Bearer token'
|
|
255
|
+
)
|
|
256
|
+
|
|
195
257
|
response = #{self}.get_groups(
|
|
196
258
|
token: 'required - Bearer token'
|
|
197
259
|
)
|
|
198
260
|
|
|
261
|
+
response = #{self}.get_group_details(
|
|
262
|
+
token: 'required - Bearer token',
|
|
263
|
+
group_id: 'required - group id'
|
|
264
|
+
)
|
|
265
|
+
|
|
266
|
+
response = #{self}.get_apps_by_group(
|
|
267
|
+
token: 'required - Bearer token',
|
|
268
|
+
group_id: 'required - group id'
|
|
269
|
+
)
|
|
270
|
+
|
|
199
271
|
response = #{self}.upload_file(
|
|
200
272
|
token: 'required - Black Duck Binary Analysis API token',
|
|
201
273
|
file: 'required - file to upload'
|
data/lib/pwn/version.rb
CHANGED