pwn 0.4.580 → 0.4.582
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/pwn/plugins/open_ai.rb +11 -5
- data/lib/pwn/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c795f1c0793ed422362a6edbc43a4314e5a0aa7ae127adb831080710ff93205a
|
4
|
+
data.tar.gz: eb341a7109e1cfb7c4ef0f7872a2c47fa032f995fc9ea3163ac2db824c95889f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2d0a07648f561c3cfe36b83ad727e8b3520ee343b86934cc6bceaf0bd865d9db69bef57d495b7db0d7ba9a0e493475a92dae9ca21502e6c20e2ee4a692c87dea
|
7
|
+
data.tar.gz: 587b9c35ff9285d307e9e93f5b5ad5677ac3d56896680204353f33ead3bfc8958edf142a5c0ce18d73ee55a447a4a0f812c73d6571c6d52139ff502e8b3a47c8
|
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.
|
40
|
+
pwn[v0.4.582]: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.
|
55
|
+
pwn[v0.4.582]:001 >>> PWN.help
|
56
56
|
```
|
57
57
|
|
58
58
|
|
data/lib/pwn/plugins/open_ai.rb
CHANGED
@@ -96,7 +96,8 @@ module PWN
|
|
96
96
|
# token: 'required - Bearer token',
|
97
97
|
# request: 'required - message to ChatGPT'
|
98
98
|
# model: 'optional - model to use for text generation (defaults to text-davinci-003)',
|
99
|
-
#
|
99
|
+
# temp: 'optional - integer (deafults to 0)',
|
100
|
+
# max_tokens: 'optional - integer (deafults to 1024)'
|
100
101
|
# )
|
101
102
|
|
102
103
|
public_class_method def self.chat_gpt(opts = {})
|
@@ -104,14 +105,18 @@ module PWN
|
|
104
105
|
request = opts[:request]
|
105
106
|
model = opts[:model]
|
106
107
|
model ||= 'text-davinci-003'
|
108
|
+
temp = opts[:temp]
|
109
|
+
temp ||= 0
|
110
|
+
max_tokens = opts[:max_tokens]
|
111
|
+
max_tokens ||= 1024
|
112
|
+
|
107
113
|
rest_call = 'completions'
|
108
|
-
rest_call = 'text-generations' if opts[:alt_response]
|
109
114
|
|
110
115
|
http_body = {
|
111
116
|
model: model,
|
112
117
|
prompt: request,
|
113
|
-
temperature:
|
114
|
-
max_tokens:
|
118
|
+
temperature: temp.to_i,
|
119
|
+
max_tokens: max_tokens.to_i
|
115
120
|
}
|
116
121
|
|
117
122
|
response = open_ai_rest_call(
|
@@ -142,7 +147,8 @@ module PWN
|
|
142
147
|
token: 'required - Bearer token',
|
143
148
|
request: 'required - message to ChatGPT',
|
144
149
|
model: 'optional - model to use for text generation (defaults to text-davinci-003)',
|
145
|
-
|
150
|
+
temp: 'optional - integer (deafults to 0)',
|
151
|
+
max_tokens: 'optional - integer (deafults to 1024)'
|
146
152
|
)
|
147
153
|
|
148
154
|
#{self}.authors
|
data/lib/pwn/version.rb
CHANGED