pwn 0.5.217 → 0.5.219
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -3
- data/bin/pwn_rdoc_to_jsonl +9 -4
- data/lib/pwn/plugins/open_ai.rb +9 -13
- data/lib/pwn/version.rb +1 -1
- data/third_party/pwn_rdoc.jsonl +1286 -0
- metadata +2 -7
- data/e(File.read(rdoc_html_file)) +0 -298
- data/on_obj = { +0 -298
- data/onl = [] +0 -298
- data/onl.push(/"-{json_obj.to_json}n/") +0 -298
- data/s('div').each do |div| +0 -298
- data/s=/"method-name/"]').text +0 -298
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 58a55be13ad9968ee1a2ec11d4d6a4f83fa5d690f4742c1cdcdf35ca23513bfa
|
4
|
+
data.tar.gz: 418f44ce4b2bfec5b0cdacd073f19fb616c4fcc8e268fc1ed448b18a18384f21
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aa7ab4d1286a3bbd0c842bddc1ffe90ad78d36036565460b6b8aa861de325958ac5ff6f77ead67071b109c6a6ebee040e3b8a4469a71fb55365b6364b05aaa51
|
7
|
+
data.tar.gz: 6f5fe523e33592e80e2da2117890838cb0ca89abe67a2e0432552760e7328f337adb1cddb4e53c7098478fa5f80fb7f8b198dfc2af72723a6baecad3bd77b3d3
|
data/README.md
CHANGED
@@ -37,7 +37,7 @@ $ cd /opt/pwn
|
|
37
37
|
$ ./install.sh
|
38
38
|
$ ./install.sh ruby-gem
|
39
39
|
$ pwn
|
40
|
-
pwn[v0.5.
|
40
|
+
pwn[v0.5.219]: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.3.5@pwn
|
|
52
52
|
$ gem uninstall --all --executables pwn
|
53
53
|
$ gem install --verbose pwn
|
54
54
|
$ pwn
|
55
|
-
pwn[v0.5.
|
55
|
+
pwn[v0.5.219]:001 >>> PWN.help
|
56
56
|
```
|
57
57
|
|
58
58
|
If you're using a multi-user install of RVM do:
|
@@ -62,7 +62,7 @@ $ rvm use ruby-3.3.5@pwn
|
|
62
62
|
$ rvmsudo gem uninstall --all --executables pwn
|
63
63
|
$ rvmsudo gem install --verbose pwn
|
64
64
|
$ pwn
|
65
|
-
pwn[v0.5.
|
65
|
+
pwn[v0.5.219]:001 >>> PWN.help
|
66
66
|
```
|
67
67
|
|
68
68
|
PWN periodically upgrades to the latest version of Ruby which is reflected in `/opt/pwn/.ruby-version`. The easiest way to upgrade to the latest version of Ruby from a previous PWN installation is to run the following script:
|
data/bin/pwn_rdoc_to_jsonl
CHANGED
@@ -61,10 +61,15 @@ begin
|
|
61
61
|
# puts "Desc: #{method_description.inspect}"
|
62
62
|
# gets
|
63
63
|
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
jsonl_hash = {
|
64
|
+
user_content = "#{module_name}.#{method_name} Usage"
|
65
|
+
assistant_content = "`#{module_name}.#{method_name}`: #{method_description}"
|
66
|
+
|
67
|
+
jsonl_hash = {
|
68
|
+
messages: [
|
69
|
+
{ role: 'user', content: user_content },
|
70
|
+
{ role: 'assistant', content: assistant_content }
|
71
|
+
]
|
72
|
+
}
|
68
73
|
# puts "JSONL: #{jsonl}"
|
69
74
|
# gets
|
70
75
|
|
data/lib/pwn/plugins/open_ai.rb
CHANGED
@@ -448,17 +448,14 @@ module PWN
|
|
448
448
|
token = opts[:token]
|
449
449
|
training_file = opts[:training_file]
|
450
450
|
validation_file = opts[:validation_file]
|
451
|
-
model = opts[:model]
|
452
|
-
model ||= :davinci
|
451
|
+
model = opts[:model] ||= 'gpt-4o-mini'
|
453
452
|
|
454
|
-
n_epochs = opts[:n_epochs]
|
455
|
-
n_epochs ||= 4
|
453
|
+
n_epochs = opts[:n_epochs] ||= 4
|
456
454
|
|
457
455
|
batch_size = opts[:batch_size]
|
458
456
|
learning_rate_multipler = opts[:learning_rate_multipler]
|
459
457
|
|
460
|
-
prompt_loss_weight = opts[:prompt_loss_weight]
|
461
|
-
prompt_loss_weight ||= 0.01
|
458
|
+
prompt_loss_weight = opts[:prompt_loss_weight] ||= 0.01
|
462
459
|
|
463
460
|
computer_classification_metrics = true if opts[:computer_classification_metrics]
|
464
461
|
classification_n_classes = opts[:classification_n_classes]
|
@@ -498,7 +495,7 @@ module PWN
|
|
498
495
|
response = open_ai_rest_call(
|
499
496
|
http_method: :post,
|
500
497
|
token: token,
|
501
|
-
rest_call: '
|
498
|
+
rest_call: 'fine_tuning/jobs',
|
502
499
|
http_body: http_body,
|
503
500
|
timeout: timeout
|
504
501
|
)
|
@@ -520,7 +517,7 @@ module PWN
|
|
520
517
|
|
521
518
|
response = open_ai_rest_call(
|
522
519
|
token: token,
|
523
|
-
rest_call: '
|
520
|
+
rest_call: 'fine_tuning/jobs',
|
524
521
|
timeout: timeout
|
525
522
|
)
|
526
523
|
|
@@ -541,7 +538,7 @@ module PWN
|
|
541
538
|
fine_tune_id = opts[:fine_tune_id]
|
542
539
|
timeout = opts[:timeout]
|
543
540
|
|
544
|
-
rest_call = "
|
541
|
+
rest_call = "fine_tuning/jobs/#{fine_tune_id}"
|
545
542
|
|
546
543
|
response = open_ai_rest_call(
|
547
544
|
token: token,
|
@@ -566,7 +563,7 @@ module PWN
|
|
566
563
|
fine_tune_id = opts[:fine_tune_id]
|
567
564
|
timeout = opts[:timeout]
|
568
565
|
|
569
|
-
rest_call = "
|
566
|
+
rest_call = "fine_tuning/jobs/#{fine_tune_id}/cancel"
|
570
567
|
|
571
568
|
response = open_ai_rest_call(
|
572
569
|
http_method: :post,
|
@@ -592,7 +589,7 @@ module PWN
|
|
592
589
|
fine_tune_id = opts[:fine_tune_id]
|
593
590
|
timeout = opts[:timeout]
|
594
591
|
|
595
|
-
rest_call = "
|
592
|
+
rest_call = "fine_tuning/jobs/#{fine_tune_id}/events"
|
596
593
|
|
597
594
|
response = open_ai_rest_call(
|
598
595
|
token: token,
|
@@ -665,8 +662,7 @@ module PWN
|
|
665
662
|
file = opts[:file]
|
666
663
|
raise "ERROR: #{file} not found." unless File.exist?(file)
|
667
664
|
|
668
|
-
purpose = opts[:purpose]
|
669
|
-
purpose ||= 'fine-tune'
|
665
|
+
purpose = opts[:purpose] ||= 'fine-tune'
|
670
666
|
|
671
667
|
timeout = opts[:timeout]
|
672
668
|
|
data/lib/pwn/version.rb
CHANGED