pwn 0.4.577 → 0.4.580

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: 82b40d0807c2179cfcf55eb8f0a39ca8b70c1ad829509cbe20df80e49c48ca2b
4
- data.tar.gz: 3e37e2e01a9473884cc9c7c5180040378170d74e9b80e982a2620c419403ee78
3
+ metadata.gz: 6ae4532b1dee1229394edd0a05c463f5564b2a60c6b074a03ec620718135213e
4
+ data.tar.gz: 274d7dcceae01727cd707806aad455e78f178866baf571795d3c4044817a3bc1
5
5
  SHA512:
6
- metadata.gz: fe3e01924bdfa8ad543f2c0a62f7f08333a92e2ed4e81d69865cde205d65a92db0e328b6022ab1d6eee39cf951643711dabd3899dce92efcd97d5e2995227fb0
7
- data.tar.gz: c4e37f4a41b60f332dc25deb4e96d4c4b04e518ac3083ca9e3eff5c8036c370597a3bbe48def228a42d89da199e298ce3d7f9eea0e6bf267a114b9d91bc99599
6
+ metadata.gz: 77ede4cbcb57adc8949eeffd331c0f5b0c8404ae6dd80941a51ed6ef747d309d3f682544022982752581db9df207d6af490fddbf1dd8a2e70577cc43fff401ac
7
+ data.tar.gz: 9ce69103a872bbe97d8479b087e92a2f17f6df8f095058f4be39948c04b811b75650f4f6b052f9a6c5af1a5b1f4a284cb27dbab0bde79ad37cb93657dca97075
data/README.md CHANGED
@@ -37,7 +37,7 @@ $ rvm use ruby-3.1.3@pwn
37
37
  $ rvm list gemsets
38
38
  $ gem install --verbose pwn
39
39
  $ pwn
40
- pwn[v0.4.577]:001 >>> PWN.help
40
+ pwn[v0.4.580]: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.1.3@pwn
52
52
  $ gem uninstall --all --executables pwn
53
53
  $ gem install --verbose pwn
54
54
  $ pwn
55
- pwn[v0.4.577]:001 >>> PWN.help
55
+ pwn[v0.4.580]:001 >>> PWN.help
56
56
  ```
57
57
 
58
58
 
@@ -6,8 +6,8 @@ module PWN
6
6
  module Plugins
7
7
  # This plugin is used for interacting w/ OpenAI's REST API using
8
8
  # the 'rest' browser type of PWN::Plugins::TransparentBrowser.
9
- # This is based on the following OpenAI API Specification:
10
- # https://developer.shodan.io/api
9
+ # This is based on the following OpenAI API Specification:
10
+ # https://api.openai.com/v1
11
11
  module OpenAI
12
12
  @@logger = PWN::Plugins::PWNLogger.create
13
13
 
@@ -95,14 +95,20 @@ module PWN
95
95
  # response = PWN::Plugins::OpenAI.chat_gpt(
96
96
  # token: 'required - Bearer token',
97
97
  # request: 'required - message to ChatGPT'
98
+ # model: 'optional - model to use for text generation (defaults to text-davinci-003)',
99
+ # alt_response: 'optional boolean to generate a more creative response (defaults to false)'
98
100
  # )
99
101
 
100
102
  public_class_method def self.chat_gpt(opts = {})
101
103
  token = opts[:token]
102
104
  request = opts[:request]
105
+ model = opts[:model]
106
+ model ||= 'text-davinci-003'
107
+ rest_call = 'completions'
108
+ rest_call = 'text-generations' if opts[:alt_response]
103
109
 
104
110
  http_body = {
105
- model: 'text-davinci-003',
111
+ model: model,
106
112
  prompt: request,
107
113
  temperature: 0,
108
114
  max_tokens: 1024
@@ -111,7 +117,7 @@ module PWN
111
117
  response = open_ai_rest_call(
112
118
  http_method: :post,
113
119
  token: token,
114
- rest_call: 'completions',
120
+ rest_call: rest_call,
115
121
  http_body: http_body.to_json
116
122
  )
117
123
 
@@ -132,9 +138,11 @@ module PWN
132
138
 
133
139
  public_class_method def self.help
134
140
  puts "USAGE:
135
- response #{self}.chat_gpt(
141
+ response = #{self}.chat_gpt(
136
142
  token: 'required - Bearer token',
137
- request: 'required - message to ChatGPT'
143
+ request: 'required - message to ChatGPT',
144
+ model: 'optional - model to use for text generation (defaults to text-davinci-003)',
145
+ alt_response: 'optional boolean to generate a more creative response (defaults to false)'
138
146
  )
139
147
 
140
148
  #{self}.authors
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.577'
4
+ VERSION = '0.4.580'
5
5
  end
data/upgrade_ruby.sh CHANGED
@@ -27,7 +27,6 @@ if [[ $# < 1 ]]; then
27
27
  fi
28
28
 
29
29
  # Upgrade RVM
30
- #curl -sSL https://get.rvm.io | sudo bash -s latest
31
30
  curl -sSL https://rvm.io/mpapis.asc | sudo gpg2 --import -
32
31
  curl -sSL https://rvm.io/pkuczynski.asc | sudo gpg2 --import -
33
32
  export rvmsudo_secure_path=1
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.577
4
+ version: 0.4.580
5
5
  platform: ruby
6
6
  authors:
7
7
  - 0day Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-12-28 00:00:00.000000000 Z
11
+ date: 2022-12-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -2033,7 +2033,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
2033
2033
  - !ruby/object:Gem::Version
2034
2034
  version: '0'
2035
2035
  requirements: []
2036
- rubygems_version: 3.3.26
2036
+ rubygems_version: 3.4.1
2037
2037
  signing_key:
2038
2038
  specification_version: 4
2039
2039
  summary: Automated Security Testing for CI/CD Pipelines & Beyond