pwn 0.4.745 → 0.4.747

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0b606f346c629f45a45d84e3e891ecfc7bb6914ede83cc4a16c7fa97e1e43077
4
- data.tar.gz: 3c8cc9c58fe2e78e20e57d67703be7f274c5d45ed4c5546c7169951240d938a0
3
+ metadata.gz: 5f2bde039b093bbbb0db609c0584b674a527cb7c1931c3aa3eb6a328231eceff
4
+ data.tar.gz: e993b9c2ecd8ecce6a7fabbe6795340e3a1bde382a552272d2f626b28fbc3e9c
5
5
  SHA512:
6
- metadata.gz: c747f2566f1bd1c9ca7e53b5565f7ad47d1a8a546ec333e5dde103fe0c20b8308a5b667bbbeccdffc5db3fdc56b8d5195a0489ad1e8f60e2b996bdad12cf45e2
7
- data.tar.gz: 05a43fff9316de146c4aaeaebdd91547155d37e047ac4ade36203f51f2d8bc00da61d92f311a65470f14cdd7e5c070b0a47b9848fa151ec9cf83fc52d43dea0f
6
+ metadata.gz: 9d2f51a00d83d90cc84afb65319f768c401af69fd1116560bd7c1f19742528846f8aa6695937a03dedd06a6e473ac03938c35a4995e026e682d487173f8cf0fc
7
+ data.tar.gz: 8922440a49c478636a31a90200938a2e063457eb4a78f1955a20a63deedd8dd443be10fbb8949f5a40766682038bb04253f8c5e9971826828b1bc91e5764838d
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.745]:001 >>> PWN.help
40
+ pwn[v0.4.747]: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.745]:001 >>> PWN.help
55
+ pwn[v0.4.747]:001 >>> PWN.help
56
56
  ```
57
57
 
58
58
 
data/bin/pwn_bdba_groups CHANGED
@@ -51,7 +51,7 @@ begin
51
51
  token: token
52
52
  )
53
53
 
54
- parent_id = groups_resp[:data].find { |g| g[:name] == parent_group_name }[:id]
54
+ parent_id = groups_resp[:groups].find { |g| g[:name] == parent_group_name }[:id]
55
55
  end
56
56
 
57
57
  PWN::Plugins::BlackDuckBinaryAnalysis.create_group(
data/bin/pwn_bdba_scan CHANGED
@@ -65,7 +65,7 @@ begin
65
65
  token: token
66
66
  )
67
67
 
68
- parent_id = groups_resp[:data].find { |g| g[:name] == parent_group_name }[:id]
68
+ parent_id = groups_resp[:groups].find { |g| g[:name] == parent_group_name }[:id]
69
69
 
70
70
  PWN::Plugins::BlackDuckBinaryAnalysis.upload_file(
71
71
  token: token,
@@ -57,27 +57,19 @@ module PWN
57
57
  )
58
58
 
59
59
  when :post, :put
60
- if http_body.key?(:multipart)
61
- # headers[:content_type] = 'multipart/form-data'
62
- headers[:content_type] = nil
63
-
64
- response = rest_client.execute(
65
- method: http_method,
66
- url: "#{base_bd_bin_analysis_api_uri}/#{rest_call}",
67
- headers: headers,
68
- payload: http_body,
69
- verify_ssl: false
70
- )
71
- else
72
- http_body = http_body.to_json unless http_body.nil?
73
- response = rest_client.execute(
74
- method: http_method,
75
- url: "#{base_bd_bin_analysis_api_uri}/#{rest_call}",
76
- headers: headers,
77
- payload: http_body,
78
- verify_ssl: false
79
- )
60
+ if http_body.is_a?(Hash)
61
+ headers[:content_type] = nil if http_body.key?(:multipart)
62
+ # headers[:content_type] = 'multipart/form-data' if http_body.key?(:multipart)
63
+ http_body = http_body.to_json unless http_body.key?(:multipart)
80
64
  end
65
+
66
+ response = rest_client.execute(
67
+ method: http_method,
68
+ url: "#{base_bd_bin_analysis_api_uri}/#{rest_call}",
69
+ headers: headers,
70
+ payload: http_body,
71
+ verify_ssl: false
72
+ )
81
73
  else
82
74
  raise @@logger.error("Unsupported HTTP Method #{http_method} for #{self} Plugin")
83
75
  end
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.745'
4
+ VERSION = '0.4.747'
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.745
4
+ version: 0.4.747
5
5
  platform: ruby
6
6
  authors:
7
7
  - 0day Inc.