pwn 0.4.729 → 0.4.731
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/pwn/plugins/black_duck_binary_analysis.rb +380 -81
- data/lib/pwn/plugins/open_ai.rb +4 -16
- data/lib/pwn/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: 714a8e7624b1623c1154e5c19305a09a653cc121f1450117d51b4179e6f536b4
|
4
|
+
data.tar.gz: af52945bed9bf0d7b5b8d84e349a3d3c499512b0a8198aa4139475e725c920a2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f260b2d62f3b453631a38786ab3e626380c5ad2a464f3c9d041a2526695d04b6b75ceae2a83ef43d4cbf3f9ff5f5ac70139dcb5654922de2eb13ba45dc68efa9
|
7
|
+
data.tar.gz: b7f8c4cf50029c92cd838c75dd55c03d1b1fa8d8fecb4f30be365b2e1c9bef60f26df7d0392ff0112d6fa320dd6049b0bd0a660f27e769cf2605ad16bdbab145
|
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.731]:001 >>> PWN.help
|
41
41
|
```
|
42
42
|
|
43
43
|
[![Installing the pwn Security Automation Framework](https://raw.githubusercontent.com/0dayInc/pwn/master/documentation/pwn_install.png)](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.731]:001 >>> PWN.help
|
56
56
|
```
|
57
57
|
|
58
58
|
|
@@ -17,6 +17,7 @@ module PWN
|
|
17
17
|
# http_method: 'optional HTTP method (defaults to GET)
|
18
18
|
# rest_call: 'required rest call to make per the schema',
|
19
19
|
# params: 'optional params passed in the URI or HTTP Headers',
|
20
|
+
# http_headers: 'optional HTTP headers sent in HTTP methods that support it e.g. POST'
|
20
21
|
# http_body: 'optional HTTP body sent in HTTP methods that support it e.g. POST'
|
21
22
|
# )
|
22
23
|
|
@@ -42,78 +43,46 @@ module PWN
|
|
42
43
|
spinner.auto_spin
|
43
44
|
|
44
45
|
case http_method
|
45
|
-
when :delete
|
46
|
+
when :delete, :get
|
47
|
+
headers = opts[:http_headers]
|
48
|
+
headers ||= {
|
49
|
+
content_type: content_type,
|
50
|
+
authorization: "Bearer #{token}",
|
51
|
+
params: params
|
52
|
+
}
|
46
53
|
response = rest_client.execute(
|
47
|
-
method:
|
54
|
+
method: http_method,
|
48
55
|
url: "#{base_bd_bin_analysis_api_uri}/#{rest_call}",
|
49
|
-
headers:
|
50
|
-
content_type: content_type,
|
51
|
-
authorization: "Bearer #{token}",
|
52
|
-
params: params
|
53
|
-
},
|
56
|
+
headers: headers,
|
54
57
|
verify_ssl: false
|
55
58
|
)
|
56
59
|
|
57
|
-
when :
|
58
|
-
|
59
|
-
method: :get,
|
60
|
-
url: "#{base_bd_bin_analysis_api_uri}/#{rest_call}",
|
61
|
-
headers: {
|
62
|
-
content_type: content_type,
|
63
|
-
authorization: "Bearer #{token}",
|
64
|
-
params: params
|
65
|
-
},
|
66
|
-
verify_ssl: false
|
67
|
-
)
|
68
|
-
|
69
|
-
when :post
|
60
|
+
when :post, :put
|
61
|
+
headers = opts[:http_headers]
|
70
62
|
if http_body.key?(:multipart)
|
63
|
+
headers ||= {
|
64
|
+
authorization: "Bearer #{token}"
|
65
|
+
}
|
71
66
|
response = rest_client.execute(
|
72
67
|
method: :post,
|
73
68
|
url: "#{base_bd_bin_analysis_api_uri}/#{rest_call}",
|
74
|
-
headers:
|
75
|
-
authorization: "Bearer #{token}"
|
76
|
-
},
|
77
|
-
payload: http_body,
|
78
|
-
verify_ssl: false
|
79
|
-
)
|
80
|
-
else
|
81
|
-
response = rest_client.execute(
|
82
|
-
method: :post,
|
83
|
-
url: "#{base_bd_bin_analysis_api_uri}/#{rest_call}",
|
84
|
-
headers: {
|
85
|
-
content_type: content_type,
|
86
|
-
authorization: "Bearer #{token}"
|
87
|
-
},
|
88
|
-
payload: http_body.to_json,
|
89
|
-
verify_ssl: false
|
90
|
-
)
|
91
|
-
end
|
92
|
-
|
93
|
-
when :put
|
94
|
-
if http_body.key?(:multipart)
|
95
|
-
response = rest_client.execute(
|
96
|
-
method: :put,
|
97
|
-
url: "#{base_bd_bin_analysis_api_uri}/#{rest_call}",
|
98
|
-
headers: {
|
99
|
-
authorization: "Bearer #{token}"
|
100
|
-
},
|
69
|
+
headers: headers,
|
101
70
|
payload: http_body,
|
102
71
|
verify_ssl: false
|
103
72
|
)
|
104
73
|
else
|
74
|
+
headers ||= {
|
75
|
+
content_type: content_type,
|
76
|
+
authorization: "Bearer #{token}"
|
77
|
+
}
|
105
78
|
response = rest_client.execute(
|
106
|
-
method:
|
79
|
+
method: http_method,
|
107
80
|
url: "#{base_bd_bin_analysis_api_uri}/#{rest_call}",
|
108
|
-
headers:
|
109
|
-
content_type: content_type,
|
110
|
-
authorization: "Bearer #{token}"
|
111
|
-
},
|
81
|
+
headers: headers,
|
112
82
|
payload: http_body.to_json,
|
113
83
|
verify_ssl: false
|
114
84
|
)
|
115
85
|
end
|
116
|
-
|
117
86
|
else
|
118
87
|
raise @@logger.error("Unsupported HTTP Method #{http_method} for #{self} Plugin")
|
119
88
|
end
|
@@ -147,6 +116,77 @@ module PWN
|
|
147
116
|
raise e
|
148
117
|
end
|
149
118
|
|
119
|
+
# Supported Method Parameters::
|
120
|
+
# response = PWN::Plugins::BlackDuckBinaryAnalysis.get_apps_by_group(
|
121
|
+
# token: 'required - Bearer token',
|
122
|
+
# group_id: 'required - group id'
|
123
|
+
# )
|
124
|
+
|
125
|
+
public_class_method def self.get_apps_by_group(opts = {})
|
126
|
+
token = opts[:token]
|
127
|
+
group_id = opts[:group_id]
|
128
|
+
|
129
|
+
response = bd_bin_analysis_rest_call(
|
130
|
+
token: token,
|
131
|
+
rest_call: "apps/#{group_id}"
|
132
|
+
)
|
133
|
+
|
134
|
+
JSON.parse(response, symbolize_names: true)
|
135
|
+
rescue StandardError => e
|
136
|
+
raise e
|
137
|
+
end
|
138
|
+
|
139
|
+
# Supported Method Parameters::
|
140
|
+
# response = PWN::Plugins::BlackDuckBinaryAnalysis.upload_file(
|
141
|
+
# token: 'required - Bearer token',
|
142
|
+
# file: 'required - file to upload'
|
143
|
+
# )
|
144
|
+
|
145
|
+
public_class_method def self.upload_file(opts = {})
|
146
|
+
token = opts[:token]
|
147
|
+
file = opts[:file]
|
148
|
+
raise "ERROR: #{file} not found." unless File.exist?(file)
|
149
|
+
|
150
|
+
http_headers = {
|
151
|
+
authorization: "Bearer #{token}"
|
152
|
+
}
|
153
|
+
|
154
|
+
http_body = {
|
155
|
+
multipart: true,
|
156
|
+
file: File.new(file, 'rb')
|
157
|
+
}
|
158
|
+
|
159
|
+
response = bd_bin_analysis_rest_call(
|
160
|
+
http_method: :post,
|
161
|
+
token: token,
|
162
|
+
rest_call: 'files',
|
163
|
+
http_headers: http_headers,
|
164
|
+
http_body: http_body
|
165
|
+
)
|
166
|
+
|
167
|
+
JSON.parse(response, symbolize_names: true)
|
168
|
+
rescue StandardError => e
|
169
|
+
raise e
|
170
|
+
end
|
171
|
+
|
172
|
+
# Supported Method Parameters::
|
173
|
+
# response = PWN::Plugins::BlackDuckBinaryAnalysis.get_tasks(
|
174
|
+
# token: 'required - Bearer token'
|
175
|
+
# )
|
176
|
+
|
177
|
+
public_class_method def self.get_tasks(opts = {})
|
178
|
+
token = opts[:token]
|
179
|
+
|
180
|
+
response = bd_bin_analysis_rest_call(
|
181
|
+
token: token,
|
182
|
+
rest_call: 'tasks'
|
183
|
+
)
|
184
|
+
|
185
|
+
JSON.parse(response, symbolize_names: true)
|
186
|
+
rescue StandardError => e
|
187
|
+
raise e
|
188
|
+
end
|
189
|
+
|
150
190
|
# Supported Method Parameters::
|
151
191
|
# response = PWN::Plugins::BlackDuckBinaryAnalysis.get_groups(
|
152
192
|
# token: 'required - Bearer token'
|
@@ -166,18 +206,67 @@ module PWN
|
|
166
206
|
end
|
167
207
|
|
168
208
|
# Supported Method Parameters::
|
169
|
-
# response = PWN::Plugins::BlackDuckBinaryAnalysis.
|
209
|
+
# response = PWN::Plugins::BlackDuckBinaryAnalysis.create_group(
|
170
210
|
# token: 'required - Bearer token',
|
171
|
-
#
|
211
|
+
# name: 'required - group name',
|
212
|
+
# desc: 'optional - group description',
|
213
|
+
# parent: 'optional - parent group id',
|
214
|
+
# delete_binary: 'optional - delete binary after analysis C|Y|N (Default: C== company default)',
|
215
|
+
# binary_cleanup_age: 'optional - after how long the binary will be deleted in seconds (Default: 604_800 / 1 week)',
|
216
|
+
# product_cleanup_age: 'optional - after how long the product will be deleted in seconds (Default: 604_800 / 1 week)',
|
217
|
+
# file_download_enabled: 'optional - allow download of uploaded binaries from group (Default: false),
|
218
|
+
# low_risk_tolerance: 'optional - low risk tolerance nil|true|false (Default: nil == company default)',
|
219
|
+
# include_historical_vulns: 'optional - include historical vulns nil|true|false (Default: nil == company default)',
|
220
|
+
# cvss3_fallback: 'optional - cvss3 fallback nil|true|false (Default: nil == company default)',
|
221
|
+
# assume_unknown_version_as_latest: 'optional - assume unknown version as latest nil|true|false (Default: nil == company default)',
|
222
|
+
# custom_data: 'optional - custom data hash (see group metadata for details)',
|
223
|
+
# scan_infoleak: 'optional - scan infoleak nil|true|false (Default: nil == company default)',
|
224
|
+
# code_analysis: 'optional - code analysis nil|true|false (Default: nil == company default)',
|
225
|
+
# scan_code_similarity: 'optional - scan code similarity nil|true|false (Default: nil == company default)'
|
172
226
|
# )
|
173
227
|
|
174
|
-
public_class_method def self.
|
228
|
+
public_class_method def self.create_group(opts = {})
|
175
229
|
token = opts[:token]
|
176
|
-
|
230
|
+
name = opts[:name]
|
231
|
+
desc = opts[:desc]
|
232
|
+
parent = opts[:parent]
|
233
|
+
delete_binary = opts[:delete_binary] ||= 'C'
|
234
|
+
binary_cleanup_age = opts[:binary_cleanup_age] ||= 604_800
|
235
|
+
product_cleanup_age = opts[:product_cleanup_age] ||= 604_800
|
236
|
+
file_download_enabled = opts[:file_download_enabled] ||= false
|
237
|
+
low_risk_tolerance = opts[:low_risk_tolerance]
|
238
|
+
include_historical_vulns = opts[:include_historical_vulns]
|
239
|
+
cvss3_fallback = opts[:cvss3_fallback]
|
240
|
+
assume_unknown_version_as_latest = opts[:assume_unknown_version_as_latest]
|
241
|
+
custom_data = opts[:custom_data]
|
242
|
+
scan_infoleak = opts[:scan_infoleak]
|
243
|
+
code_analysis = opts[:code_analysis]
|
244
|
+
scan_code_similarity = opts[:scan_code_similarity]
|
245
|
+
|
246
|
+
http_headers = {
|
247
|
+
authorization: "Bearer #{token}",
|
248
|
+
name: name,
|
249
|
+
description: desc,
|
250
|
+
parent: parent,
|
251
|
+
delete_binary_after_scan: delete_binary,
|
252
|
+
binary_cleanup_age: binary_cleanup_age,
|
253
|
+
product_cleanup_age: product_cleanup_age,
|
254
|
+
file_download_enabled: file_download_enabled,
|
255
|
+
low_risk_tolerance: low_risk_tolerance,
|
256
|
+
include_historical_vulnerabilities: include_historical_vulns,
|
257
|
+
cvss3_fallback: cvss3_fallback,
|
258
|
+
assume_unknown_version_as_latest: assume_unknown_version_as_latest,
|
259
|
+
custom_data: custom_data,
|
260
|
+
scan_infoleak: scan_infoleak,
|
261
|
+
code_analysis: code_analysis,
|
262
|
+
scan_code_similarity: scan_code_similarity
|
263
|
+
}
|
177
264
|
|
178
265
|
response = bd_bin_analysis_rest_call(
|
266
|
+
http_method: :post,
|
179
267
|
token: token,
|
180
|
-
rest_call:
|
268
|
+
rest_call: 'groups',
|
269
|
+
http_headers: http_headers
|
181
270
|
)
|
182
271
|
|
183
272
|
JSON.parse(response, symbolize_names: true)
|
@@ -206,31 +295,178 @@ module PWN
|
|
206
295
|
end
|
207
296
|
|
208
297
|
# Supported Method Parameters::
|
209
|
-
# response = PWN::Plugins::BlackDuckBinaryAnalysis.
|
210
|
-
# token: 'required - Bearer token'
|
211
|
-
# file: 'required - file to upload',
|
212
|
-
# purpose: 'optional - intended purpose of the uploaded documents (defaults to fine-tune'
|
298
|
+
# response = PWN::Plugins::BlackDuckBinaryAnalysis.get_licenses(
|
299
|
+
# token: 'required - Bearer token'
|
213
300
|
# )
|
214
301
|
|
215
|
-
public_class_method def self.
|
302
|
+
public_class_method def self.get_licenses(opts = {})
|
216
303
|
token = opts[:token]
|
217
|
-
file = opts[:file]
|
218
|
-
raise "ERROR: #{file} not found." unless File.exist?(file)
|
219
304
|
|
220
|
-
|
221
|
-
|
305
|
+
response = bd_bin_analysis_rest_call(
|
306
|
+
token: token,
|
307
|
+
rest_call: 'licenses'
|
308
|
+
)
|
222
309
|
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
310
|
+
JSON.parse(response, symbolize_names: true)
|
311
|
+
rescue StandardError => e
|
312
|
+
raise e
|
313
|
+
end
|
314
|
+
|
315
|
+
# Supported Method Parameters::
|
316
|
+
# response = PWN::Plugins::BlackDuckBinaryAnalysis.get_component_licenses(
|
317
|
+
# token: 'required - Bearer token'
|
318
|
+
# )
|
319
|
+
|
320
|
+
public_class_method def self.get_component_licenses(opts = {})
|
321
|
+
token = opts[:token]
|
228
322
|
|
229
323
|
response = bd_bin_analysis_rest_call(
|
230
|
-
http_method: :post,
|
231
324
|
token: token,
|
232
|
-
rest_call: '
|
233
|
-
|
325
|
+
rest_call: 'component-licenses'
|
326
|
+
)
|
327
|
+
|
328
|
+
JSON.parse(response, symbolize_names: true)
|
329
|
+
rescue StandardError => e
|
330
|
+
raise e
|
331
|
+
end
|
332
|
+
|
333
|
+
# Supported Method Parameters::
|
334
|
+
# response = PWN::Plugins::BlackDuckBinaryAnalysis.get_tags(
|
335
|
+
# token: 'required - Bearer token'
|
336
|
+
# )
|
337
|
+
|
338
|
+
public_class_method def self.get_tags(opts = {})
|
339
|
+
token = opts[:token]
|
340
|
+
|
341
|
+
response = bd_bin_analysis_rest_call(
|
342
|
+
token: token,
|
343
|
+
rest_call: 'tags'
|
344
|
+
)
|
345
|
+
|
346
|
+
JSON.parse(response, symbolize_names: true)
|
347
|
+
rescue StandardError => e
|
348
|
+
raise e
|
349
|
+
end
|
350
|
+
|
351
|
+
# Supported Method Parameters::
|
352
|
+
# response = PWN::Plugins::BlackDuckBinaryAnalysis.get_vulnerabilities(
|
353
|
+
# token: 'required - Bearer token'
|
354
|
+
# )
|
355
|
+
|
356
|
+
public_class_method def self.get_vulnerabilities(opts = {})
|
357
|
+
token = opts[:token]
|
358
|
+
|
359
|
+
response = bd_bin_analysis_rest_call(
|
360
|
+
token: token,
|
361
|
+
rest_call: 'vulnerabilities'
|
362
|
+
)
|
363
|
+
|
364
|
+
JSON.parse(response, symbolize_names: true)
|
365
|
+
rescue StandardError => e
|
366
|
+
raise e
|
367
|
+
end
|
368
|
+
|
369
|
+
# Supported Method Parameters::
|
370
|
+
# response = PWN::Plugins::BlackDuckBinaryAnalysis.get_components(
|
371
|
+
# token: 'required - Bearer token'
|
372
|
+
# )
|
373
|
+
|
374
|
+
public_class_method def self.get_components(opts = {})
|
375
|
+
token = opts[:token]
|
376
|
+
|
377
|
+
response = bd_bin_analysis_rest_call(
|
378
|
+
token: token,
|
379
|
+
rest_call: 'components'
|
380
|
+
)
|
381
|
+
|
382
|
+
JSON.parse(response, symbolize_names: true)
|
383
|
+
rescue StandardError => e
|
384
|
+
raise e
|
385
|
+
end
|
386
|
+
|
387
|
+
# Supported Method Parameters::
|
388
|
+
# response = PWN::Plugins::BlackDuckBinaryAnalysis.get_vendor_vulns(
|
389
|
+
# token: 'required - Bearer token'
|
390
|
+
# )
|
391
|
+
|
392
|
+
public_class_method def self.get_vendor_vulns(opts = {})
|
393
|
+
token = opts[:token]
|
394
|
+
|
395
|
+
response = bd_bin_analysis_rest_call(
|
396
|
+
token: token,
|
397
|
+
rest_call: 'teacher/api/vulns'
|
398
|
+
)
|
399
|
+
|
400
|
+
JSON.parse(response, symbolize_names: true)
|
401
|
+
rescue StandardError => e
|
402
|
+
raise e
|
403
|
+
end
|
404
|
+
|
405
|
+
# Supported Method Parameters::
|
406
|
+
# response = PWN::Plugins::BlackDuckBinaryAnalysis.get_audit_trail(
|
407
|
+
# token: 'required - Bearer token'
|
408
|
+
# )
|
409
|
+
|
410
|
+
public_class_method def self.get_audit_trail(opts = {})
|
411
|
+
token = opts[:token]
|
412
|
+
|
413
|
+
response = bd_bin_analysis_rest_call(
|
414
|
+
token: token,
|
415
|
+
rest_call: 'audit-trail'
|
416
|
+
)
|
417
|
+
|
418
|
+
JSON.parse(response, symbolize_names: true)
|
419
|
+
rescue StandardError => e
|
420
|
+
raise e
|
421
|
+
end
|
422
|
+
|
423
|
+
# Supported Method Parameters::
|
424
|
+
# response = PWN::Plugins::BlackDuckBinaryAnalysis.get_status(
|
425
|
+
# token: 'required - Bearer token'
|
426
|
+
# )
|
427
|
+
|
428
|
+
public_class_method def self.get_status(opts = {})
|
429
|
+
token = opts[:token]
|
430
|
+
|
431
|
+
response = bd_bin_analysis_rest_call(
|
432
|
+
token: token,
|
433
|
+
rest_call: 'status'
|
434
|
+
)
|
435
|
+
|
436
|
+
JSON.parse(response, symbolize_names: true)
|
437
|
+
rescue StandardError => e
|
438
|
+
raise e
|
439
|
+
end
|
440
|
+
|
441
|
+
# Supported Method Parameters::
|
442
|
+
# response = PWN::Plugins::BlackDuckBinaryAnalysis.get_service_info(
|
443
|
+
# token: 'required - Bearer token'
|
444
|
+
# )
|
445
|
+
|
446
|
+
public_class_method def self.get_service_info(opts = {})
|
447
|
+
token = opts[:token]
|
448
|
+
|
449
|
+
response = bd_bin_analysis_rest_call(
|
450
|
+
token: token,
|
451
|
+
rest_call: 'service/info'
|
452
|
+
)
|
453
|
+
|
454
|
+
JSON.parse(response, symbolize_names: true)
|
455
|
+
rescue StandardError => e
|
456
|
+
raise e
|
457
|
+
end
|
458
|
+
|
459
|
+
# Supported Method Parameters::
|
460
|
+
# response = PWN::Plugins::BlackDuckBinaryAnalysis.get_service_version(
|
461
|
+
# token: 'required - Bearer token'
|
462
|
+
# )
|
463
|
+
|
464
|
+
public_class_method def self.get_service_version(opts = {})
|
465
|
+
token = opts[:token]
|
466
|
+
|
467
|
+
response = bd_bin_analysis_rest_call(
|
468
|
+
token: token,
|
469
|
+
rest_call: 'service/version'
|
234
470
|
)
|
235
471
|
|
236
472
|
JSON.parse(response, symbolize_names: true)
|
@@ -254,23 +490,86 @@ module PWN
|
|
254
490
|
token: 'required - Bearer token'
|
255
491
|
)
|
256
492
|
|
257
|
-
response = #{self}.
|
493
|
+
response = #{self}.upload_file(
|
494
|
+
token: 'required - Black Duck Binary Analysis API token',
|
495
|
+
file: 'required - file to upload'
|
496
|
+
)
|
497
|
+
|
498
|
+
response = #{self}.get_tasks(
|
258
499
|
token: 'required - Bearer token'
|
259
500
|
)
|
260
501
|
|
261
|
-
response = #{self}.
|
502
|
+
response = #{self}.get_apps_by_group(
|
262
503
|
token: 'required - Bearer token',
|
263
504
|
group_id: 'required - group id'
|
264
505
|
)
|
265
506
|
|
266
|
-
response = #{self}.
|
507
|
+
response = #{self}.get_groups(
|
508
|
+
token: 'required - Bearer token'
|
509
|
+
)
|
510
|
+
|
511
|
+
response = #{self}.create_group(
|
512
|
+
token: 'required - Bearer token',
|
513
|
+
name: 'required - group name',
|
514
|
+
desc: 'optional - group description',
|
515
|
+
parent: 'optional - parent group id',
|
516
|
+
delete_binary: 'optional - delete binary after analysis C|Y|N (Default: C== company default)',
|
517
|
+
binary_cleanup_age: 'optional - after how long the binary will be deleted in seconds (Default: 604_800 / 1 week)',
|
518
|
+
product_cleanup_age: 'optional - after how long the product will be deleted in seconds (Default: 604_800 / 1 week)',
|
519
|
+
file_download_enabled: 'optional - allow download of uploaded binaries from group (Default: false),
|
520
|
+
low_risk_tolerance: 'optional - low risk tolerance nil|true|false (Default: nil == company default)',
|
521
|
+
include_historical_vulns: 'optional - include historical vulns nil|true|false (Default: nil == company default)',
|
522
|
+
cvss3_fallback: 'optional - cvss3 fallback nil|true|false (Default: nil == company default)',
|
523
|
+
assume_unknown_version_as_latest: 'optional - assume unknown version as latest nil|true|false (Default: nil == company default)',
|
524
|
+
custom_data: 'optional - custom data hash (see group metadata for details)',
|
525
|
+
scan_infoleak: 'optional - scan infoleak nil|true|false (Default: nil == company default)',
|
526
|
+
code_analysis: 'optional - code analysis nil|true|false (Default: nil == company default)',
|
527
|
+
scan_code_similarity: 'optional - scan code similarity nil|true|false (Default: nil == company default)'
|
528
|
+
)
|
529
|
+
|
530
|
+
response = #{self}.get_group_details(
|
267
531
|
token: 'required - Bearer token',
|
268
532
|
group_id: 'required - group id'
|
269
533
|
)
|
270
534
|
|
271
|
-
response = #{self}.
|
272
|
-
token: 'required -
|
273
|
-
|
535
|
+
response = #{self}.get_licenses(
|
536
|
+
token: 'required - Bearer token'
|
537
|
+
)
|
538
|
+
|
539
|
+
response = #{self}.get_component_licenses(
|
540
|
+
token: 'required - Bearer token'
|
541
|
+
)
|
542
|
+
|
543
|
+
response = #{self}.get_tags(
|
544
|
+
token: 'required - Bearer token'
|
545
|
+
)
|
546
|
+
|
547
|
+
response = #{self}.get_vulnerabilities(
|
548
|
+
token: 'required - Bearer token'
|
549
|
+
)
|
550
|
+
|
551
|
+
response = #{self}.get_components(
|
552
|
+
token: 'required - Bearer token'
|
553
|
+
)
|
554
|
+
|
555
|
+
response = #{self}.get_vendor_vulns(
|
556
|
+
token: 'required - Bearer token'
|
557
|
+
)
|
558
|
+
|
559
|
+
response = #{self}.get_audit_trail(
|
560
|
+
token: 'required - Bearer token'
|
561
|
+
)
|
562
|
+
|
563
|
+
response = #{self}.get_status(
|
564
|
+
token: 'required - Bearer token'
|
565
|
+
)
|
566
|
+
|
567
|
+
response = #{self}.get_service_info(
|
568
|
+
token: 'required - Bearer token'
|
569
|
+
)
|
570
|
+
|
571
|
+
response = #{self}.get_service_version(
|
572
|
+
token: 'required - Bearer token'
|
274
573
|
)
|
275
574
|
|
276
575
|
#{self}.authors
|
data/lib/pwn/plugins/open_ai.rb
CHANGED
@@ -42,21 +42,9 @@ module PWN
|
|
42
42
|
spinner.auto_spin
|
43
43
|
|
44
44
|
case http_method
|
45
|
-
when :delete
|
45
|
+
when :delete, :get
|
46
46
|
response = rest_client.execute(
|
47
|
-
method:
|
48
|
-
url: "#{base_open_ai_api_uri}/#{rest_call}",
|
49
|
-
headers: {
|
50
|
-
content_type: content_type,
|
51
|
-
authorization: "Bearer #{token}",
|
52
|
-
params: params
|
53
|
-
},
|
54
|
-
verify_ssl: false
|
55
|
-
)
|
56
|
-
|
57
|
-
when :get
|
58
|
-
response = rest_client.execute(
|
59
|
-
method: :get,
|
47
|
+
method: http2_method,
|
60
48
|
url: "#{base_open_ai_api_uri}/#{rest_call}",
|
61
49
|
headers: {
|
62
50
|
content_type: content_type,
|
@@ -69,7 +57,7 @@ module PWN
|
|
69
57
|
when :post
|
70
58
|
if http_body.key?(:multipart)
|
71
59
|
response = rest_client.execute(
|
72
|
-
method:
|
60
|
+
method: http_method,
|
73
61
|
url: "#{base_open_ai_api_uri}/#{rest_call}",
|
74
62
|
headers: {
|
75
63
|
authorization: "Bearer #{token}"
|
@@ -79,7 +67,7 @@ module PWN
|
|
79
67
|
)
|
80
68
|
else
|
81
69
|
response = rest_client.execute(
|
82
|
-
method:
|
70
|
+
method: http_method,
|
83
71
|
url: "#{base_open_ai_api_uri}/#{rest_call}",
|
84
72
|
headers: {
|
85
73
|
content_type: content_type,
|
data/lib/pwn/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pwn
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.731
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- 0day Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-06-
|
11
|
+
date: 2023-06-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|