pwn 0.4.740 → 0.4.741

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5a27e88a828871c161854774acd11cf0841e4b7d18f527710e5303b8fe10b9b9
4
- data.tar.gz: acfcdbe03a94ed5445977159f0674dd3f3abf2088ea3a65e949f09b5d81d8070
3
+ metadata.gz: 7d584af8d0758445720f5d35b48ce3f518f57c18fca496626ad5e170d1d4d6d6
4
+ data.tar.gz: 67695c0f58e76ac3ffee236312e2dcf45a2df36ef58f61f6a089bdd764e55641
5
5
  SHA512:
6
- metadata.gz: 4d90f6dfea154b957cb0b8089ea9dff3cd3b76b95a62085f0b9419694cde85528b1827505da94bc948e17c89a7a723a5641899c680172cec8fd50513e6bd228c
7
- data.tar.gz: 29bfa448bfe958555d6518dd73120e9d12cbf79449fd0ef985e05403e4c0f8183ac2a5fb9683253e9b108e74132ce00d48947951c53de9cbded4a3254ccf2fff
6
+ metadata.gz: e12c51833606be3cc64c6a492ab4bc1999299c71f4fe2d0071bfc5aba1d77404445b30ed156156eeee3203a9b287a787425e3624136b77b9acf451ba5ad4b773
7
+ data.tar.gz: 92ece1165b579ea8792122699d91d88f977945c4ea8e4d0a2f9095eca43c6d07b150bea49ec6edec280357c05d956cf4e76868ce9d707b37ba2393fa74d1fc3b
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.740]:001 >>> PWN.help
40
+ pwn[v0.4.741]: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.740]:001 >>> PWN.help
55
+ pwn[v0.4.741]:001 >>> PWN.help
56
56
  ```
57
57
 
58
58
 
@@ -212,6 +212,41 @@ module PWN
212
212
  raise e
213
213
  end
214
214
 
215
+ # Supported Method Parameters::
216
+ # response = PWN::Plugins::BlackDuckBinaryAnalysis.generate_product_report(
217
+ # token: 'required - Bearer token',
218
+ # product_id: 'required - product id',
219
+ # output_path: 'required - path to output file',
220
+ # type: 'optional - report type csv_libs||csv_vulns|pdf (Defaults to csv_vulns)'
221
+ # )
222
+
223
+ public_class_method def self.generate_product_report(opts = {})
224
+ token = opts[:token]
225
+ product_id = opts[:product_id]
226
+ output_path = opts[:output_path]
227
+ type = opts[:type] ||= :csv_vulns
228
+
229
+ case type.to_s.downcase.to_sym
230
+ when :csv_libs
231
+ rest_call = "product/#{product_id}/csv-libs"
232
+ when :csv_vulns
233
+ rest_call = "product/#{product_id}/csv-vulns"
234
+ when :pdf
235
+ rest_call = "product/#{product_id}/pdf-report"
236
+ else
237
+ raise "ERROR: Invalid report type #{type}"
238
+ end
239
+
240
+ response = bd_bin_analysis_rest_call(
241
+ token: token,
242
+ rest_call: rest_call
243
+ )
244
+
245
+ File.write(output_path, response.body)
246
+ rescue StandardError => e
247
+ raise e
248
+ end
249
+
215
250
  # Supported Method Parameters::
216
251
  # response = PWN::Plugins::BlackDuckBinaryAnalysis.get_tasks(
217
252
  # token: 'required - Bearer token'
@@ -552,6 +587,13 @@ module PWN
552
587
  product_id: 'required - product id'
553
588
  )
554
589
 
590
+ response = #{self}.generate_product_report(
591
+ token: 'required - Bearer token',
592
+ product_id: 'required - product id',
593
+ output_path: 'required - path to output file',
594
+ type: 'optional - report type csv_libs||csv_vulns|pdf (Defaults to csv_vulns)'
595
+ )
596
+
555
597
  response = #{self}.get_tasks(
556
598
  token: 'required - Bearer token'
557
599
  )
data/lib/pwn/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PWN
4
- VERSION = '0.4.740'
4
+ VERSION = '0.4.741'
5
5
  end
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.740
4
+ version: 0.4.741
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-15 00:00:00.000000000 Z
11
+ date: 2023-06-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport