pwn 0.4.587 → 0.4.588

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: edbd3e039b05f4edfa899e87b7de61684e938d845744ea9e64a298310ad1f814
4
- data.tar.gz: 2edc89df9b6c1ba30a48ea0bade2906a124a6c933dcc8edc2529b42a828788a3
3
+ metadata.gz: d02a210883d31e979073ec66d9c797340d661f0860cc92ec9738f41635ec5574
4
+ data.tar.gz: 1d99380219818a393cc8fab1c9472b91c3e0e5fcabe290e2d036903c5ce7a842
5
5
  SHA512:
6
- metadata.gz: 196749c434149d59b04f937875f06e6f8288c4125b1fb446f975ca2cac7dd4c7857e949470da43aa627e579c92df0fcc88e5a69e004a6a9f2ed8a40cb888ceff
7
- data.tar.gz: a2c64ebab3da4037466a52f0e6af5690c08e3ad28ebae3187784dab2b3a6931fb82e003a642d18e53619d0c52a922d4a5ddd8db782c5ac17b287cfd4b74ac58d
6
+ metadata.gz: b6a6061b68bbdd89bc27fa837e50cfbb4c1d37ced7bc81a45d7ff2f0bac7e4e9ef3302b7b469adf5c48dd2a8db91c889eb01d9c81d3069123d2feee5e8d9c6e9
7
+ data.tar.gz: a6d4b1a91baaeb11447e7551c492aba1e3d34047ea6332ee9016c9d9e64de2ffd89962a740d3378dcfa78fd57f36168f0a1afbcb380df6e80174eafd720fd1e0
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.587]:001 >>> PWN.help
40
+ pwn[v0.4.588]: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.587]:001 >>> PWN.help
55
+ pwn[v0.4.588]:001 >>> PWN.help
56
56
  ```
57
57
 
58
58
 
@@ -130,6 +130,43 @@ module PWN
130
130
  raise e
131
131
  end
132
132
 
133
+ # Supported Method Parameters::
134
+ # response = PWN::Plugins::OpenAI.img_gen(
135
+ # token: 'required - Bearer token',
136
+ # request: 'required - message to ChatGPT'
137
+ # model: 'optional - model to use for text generation (defaults to text-davinci-003)',
138
+ # temp: 'optional - integer (deafults to 0)',
139
+ # max_tokens: 'optional - integer (deafults to 1024)'
140
+ # )
141
+
142
+ public_class_method def self.img_gen(opts = {})
143
+ token = opts[:token]
144
+ request = opts[:request]
145
+ n = opts[:n]
146
+ n ||= 1
147
+ size = opts[:size]
148
+ size ||= '1024x1024'
149
+
150
+ rest_call = 'images/generations'
151
+
152
+ http_body = {
153
+ prompt: request,
154
+ n: n,
155
+ size: size
156
+ }
157
+
158
+ response = open_ai_rest_call(
159
+ http_method: :post,
160
+ token: token,
161
+ rest_call: rest_call,
162
+ http_body: http_body.to_json
163
+ )
164
+
165
+ JSON.parse(response, symbolize_names: true)
166
+ rescue StandardError => e
167
+ raise e
168
+ end
169
+
133
170
  # Author(s):: 0day Inc. <request.pentest@0dayinc.com>
134
171
 
135
172
  public_class_method def 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.587'
4
+ VERSION = '0.4.588'
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.587
4
+ version: 0.4.588
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-01-02 00:00:00.000000000 Z
11
+ date: 2023-01-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport