Skip to content

Commit 58aa9b3

Browse files
committed
PWN::Plugins::BlackDuckBinaryAnalysis && PWN::Plugins::OpenAI modules - #bugfix in private rest methods
1 parent 29d6c72 commit 58aa9b3

File tree

4 files changed

+5
-9
lines changed

4 files changed

+5
-9
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ $ rvm use ruby-3.2.2@pwn
3737
$ rvm list gemsets
3838
$ gem install --verbose pwn
3939
$ pwn
40-
pwn[v0.4.736]:001 >>> PWN.help
40+
pwn[v0.4.737]:001 >>> PWN.help
4141
```
4242

4343
[![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
5252
$ gem uninstall --all --executables pwn
5353
$ gem install --verbose pwn
5454
$ pwn
55-
pwn[v0.4.736]:001 >>> PWN.help
55+
pwn[v0.4.737]:001 >>> PWN.help
5656
```
5757

5858

lib/pwn/plugins/black_duck_binary_analysis.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,14 @@ module BlackDuckBinaryAnalysis
3232

3333
headers = opts[:http_headers]
3434
headers ||= {
35-
content_type: content_type,
35+
content_type: 'application/json; charset=UTF-8',
3636
authorization: "Bearer #{token}"
3737
}
3838

3939
http_body = opts[:http_body]
4040
base_bd_bin_analysis_api_uri = 'https://protecode-sc.com/api'
4141
token = opts[:token]
4242

43-
content_type = 'application/json; charset=UTF-8'
44-
4543
browser_obj = PWN::Plugins::TransparentBrowser.open(browser_type: :rest)
4644
rest_client = browser_obj[:browser]::Request
4745

lib/pwn/plugins/open_ai.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,14 @@ module OpenAI
3030
rest_call = opts[:rest_call].to_s.scrub
3131
params = opts[:params]
3232
headers = {
33-
content_type: content_type,
33+
content_type: 'application/json; charset=UTF-8',
3434
authorization: "Bearer #{token}"
3535
}
3636

3737
http_body = opts[:http_body]
3838
http_body ||= {}
3939
base_open_ai_api_uri = 'https://api.openai.com/v1'
4040

41-
content_type = 'application/json; charset=UTF-8'
42-
4341
browser_obj = PWN::Plugins::TransparentBrowser.open(browser_type: :rest)
4442
rest_client = browser_obj[:browser]::Request
4543

lib/pwn/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# frozen_string_literal: true
22

33
module PWN
4-
VERSION = '0.4.736'
4+
VERSION = '0.4.737'
55
end

0 commit comments

Comments
 (0)