pwn 0.4.738 → 0.4.740

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: e59d69a65aa936680ee95064a2157b021e85041da83d76ad2a221b2c76101b3c
4
- data.tar.gz: 566196cc27083f6e1817172831cbd3cd6d7910f3909dc8e909e7f7895544d7f4
3
+ metadata.gz: 5a27e88a828871c161854774acd11cf0841e4b7d18f527710e5303b8fe10b9b9
4
+ data.tar.gz: acfcdbe03a94ed5445977159f0674dd3f3abf2088ea3a65e949f09b5d81d8070
5
5
  SHA512:
6
- metadata.gz: d53cb8ed854493a49374922aab075e631a032cc3e411f64b800bc492fc8b7574c4665a5b2f1a7f8859181621b48dc2ac17f6deaac500a9d1dec413212774e733
7
- data.tar.gz: 9052c161432f08efd9c9cb5d034dbd10e000fd586f347dc69c8da91aca10839fcb1c8c4b1b8dd6a7aff7110efda392284a9de9c73540d29683bd1273577bd1a7
6
+ metadata.gz: 4d90f6dfea154b957cb0b8089ea9dff3cd3b76b95a62085f0b9419694cde85528b1827505da94bc948e17c89a7a723a5641899c680172cec8fd50513e6bd228c
7
+ data.tar.gz: 29bfa448bfe958555d6518dd73120e9d12cbf79449fd0ef985e05403e4c0f8183ac2a5fb9683253e9b108e74132ce00d48947951c53de9cbded4a3254ccf2fff
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.738]:001 >>> PWN.help
40
+ pwn[v0.4.740]: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.738]:001 >>> PWN.help
55
+ pwn[v0.4.740]:001 >>> PWN.help
56
56
  ```
57
57
 
58
58
 
@@ -61,7 +61,7 @@ module PWN
61
61
  headers[:content_type] = 'multipart/form-data'
62
62
 
63
63
  response = rest_client.execute(
64
- method: :post,
64
+ method: http_method,
65
65
  url: "#{base_bd_bin_analysis_api_uri}/#{rest_call}",
66
66
  headers: headers,
67
67
  payload: http_body,
@@ -69,7 +69,7 @@ module PWN
69
69
  )
70
70
  else
71
71
  response = rest_client.execute(
72
- method: :post,
72
+ method: http_method,
73
73
  url: "#{base_bd_bin_analysis_api_uri}/#{rest_call}",
74
74
  headers: headers,
75
75
  payload: http_body.to_json,
@@ -192,6 +192,26 @@ module PWN
192
192
  raise e
193
193
  end
194
194
 
195
+ # Supported Method Parameters::
196
+ # response = PWN::Plugins::BlackDuckBinaryAnalysis.get_product(
197
+ # token: 'required - Bearer token',
198
+ # product_id: 'required - product id'
199
+ # )
200
+
201
+ public_class_method def self.get_product(opts = {})
202
+ token = opts[:token]
203
+ product_id = opts[:product_id]
204
+
205
+ response = bd_bin_analysis_rest_call(
206
+ token: token,
207
+ rest_call: "product/#{product_id}"
208
+ )
209
+
210
+ JSON.parse(response, symbolize_names: true)
211
+ rescue StandardError => e
212
+ raise e
213
+ end
214
+
195
215
  # Supported Method Parameters::
196
216
  # response = PWN::Plugins::BlackDuckBinaryAnalysis.get_tasks(
197
217
  # token: 'required - Bearer token'
@@ -527,6 +547,11 @@ module PWN
527
547
  product_id: 'optional - product id'
528
548
  )
529
549
 
550
+ response = #{self}.get_product(
551
+ token: 'required - Bearer token',
552
+ product_id: 'required - product id'
553
+ )
554
+
530
555
  response = #{self}.get_tasks(
531
556
  token: 'required - Bearer token'
532
557
  )
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.738'
4
+ VERSION = '0.4.740'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pwn
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.738
4
+ version: 0.4.740
5
5
  platform: ruby
6
6
  authors:
7
7
  - 0day Inc.