pwn 0.5.217 → 0.5.219

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: 5fcd08cace1206ca512f8505dc2b697164a92f518143fc3510f555963c02f44a
4
- data.tar.gz: f540dd48550734a5c7ee259bd6e6451f40a288afaffb3431bd23c6295f9182e0
3
+ metadata.gz: 58a55be13ad9968ee1a2ec11d4d6a4f83fa5d690f4742c1cdcdf35ca23513bfa
4
+ data.tar.gz: 418f44ce4b2bfec5b0cdacd073f19fb616c4fcc8e268fc1ed448b18a18384f21
5
5
  SHA512:
6
- metadata.gz: 19056325157ea846b3717a610038b0232ab6679073a79d1804ce078dfbae7e2931f9233aa763c74d307ae3b19fd1cd862715ec91dbb9182ddcc93aa439e9fd23
7
- data.tar.gz: e5ad3899be169546126534ca45b5cc3e52a244a1fcb0d52571b047fcad3242d6504f58a55c3bb1309623417918b285861c4b17d7de109be2d73715b85971b33f
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.217]:001 >>> PWN.help
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.217]:001 >>> PWN.help
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.217]:001 >>> PWN.help
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:
@@ -61,10 +61,15 @@ begin
61
61
  # puts "Desc: #{method_description.inspect}"
62
62
  # gets
63
63
 
64
- prompt = "#{module_name}.#{method_name} Usage"
65
- completion = "`#{module_name}.#{method_name}`: #{method_description}"
66
-
67
- jsonl_hash = { prompt: prompt, completion: completion }
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
 
@@ -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: 'fine-tunes',
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: 'fine-tunes',
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 = "fine-tunes/#{fine_tune_id}"
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 = "fine-tunes/#{fine_tune_id}/cancel"
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 = "fine-tunes/#{fine_tune_id}/events"
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PWN
4
- VERSION = '0.5.217'
4
+ VERSION = '0.5.219'
5
5
  end