pwn 0.5.422 → 0.5.423

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: 5fda4003c5c2b625faae80ac66aa29bd12a7a450e3dc9259cb2d5d82e1d71716
4
- data.tar.gz: 758acc86bc80e1dc4038ee14314025d163fa63d1682bd1cd9c9c2a184332d059
3
+ metadata.gz: f8098304b98e5388c044eb9ff8b9a5bee04075d7a5ccadac260f7a974eb55c15
4
+ data.tar.gz: 4f19ff9ea53d7d4114ae6cbfb2a79fd34f1910d3202f209454645998665a7525
5
5
  SHA512:
6
- metadata.gz: 8db71ed909971e84ce91cc04d3922de9a194c3b2179be7eb56f53ff47ae3e0c1624731cc6ca430ecad984f262968b89fd81146a0ac01e14f20e0b2e6a2b7f802
7
- data.tar.gz: cb1af569edffd8ec983ddb9118b64cf0fc63a0e814de86adc35cfd8d5e39d38427b49228a9cb313c8dab2f393d9d15da6efae94cbc0b6eecdd043fd2f2600386
6
+ metadata.gz: 69952d0e0101a72ef4b08f5d6da5b0d9d034d080b7bfafedf751a8c2cbbb1119593dba7162b733652ab7ae5f02585a6a4ae13272905182cf8437adda621f6efc
7
+ data.tar.gz: b7fc21ff696a807e7e65aec231457224eea412620cf3052d6b5233b6618f83c5b3cfebe2ab1341a2072111d5eb97def1d82a6c57aec9da6fc83870ba4dcea2c6
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.422]:001 >>> PWN.help
40
+ pwn[v0.5.423]: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.4.4@pwn
52
52
  $ gem uninstall --all --executables pwn
53
53
  $ gem install --verbose pwn
54
54
  $ pwn
55
- pwn[v0.5.422]:001 >>> PWN.help
55
+ pwn[v0.5.423]: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.4.4@pwn
62
62
  $ rvmsudo gem uninstall --all --executables pwn
63
63
  $ rvmsudo gem install --verbose pwn
64
64
  $ pwn
65
- pwn[v0.5.422]:001 >>> PWN.help
65
+ pwn[v0.5.423]: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:
@@ -457,6 +457,36 @@ module PWN
457
457
  end
458
458
  end
459
459
 
460
+ Pry::Commands.create_command 'pwn-vault-edit' do
461
+ description 'Edit the pwn.yaml configuration file.'
462
+
463
+ def process
464
+ pi = pry_instance
465
+ yaml_config_path = pi.config.yaml_config_path ||= "#{Dir.home}/pwn.yaml"
466
+ unless File.exist?(yaml_config_path)
467
+ puts "ERROR: pwn.yaml not found: #{yaml_config_path}"
468
+ return
469
+ end
470
+
471
+ decryption_file = pi.config.decryption_file ||= "#{Dir.home}/pwn.decryptor.yaml"
472
+ unless File.exist?(decryption_file)
473
+ puts "ERROR: pwn.decryptor.yaml not found: #{decryption_file}"
474
+ return
475
+ end
476
+ decryptor = YAML.load_file(decryption_file, symbolize_names: true)
477
+ key = decryptor[:key]
478
+ iv = decryptor[:iv]
479
+
480
+ PWN::Plugins::Vault.edit(
481
+ file: yaml_config_path,
482
+ key: key,
483
+ iv: iv
484
+ )
485
+ rescue StandardError => e
486
+ raise e
487
+ end
488
+ end
489
+
460
490
  Pry::Commands.create_command 'toggle-pwn-ai-debug' do
461
491
  description 'Display the response_history object while using pwn.ai'
462
492
 
@@ -507,6 +537,9 @@ module PWN
507
537
  # Initialize pwn.yaml Configuration using :before_session Hook
508
538
  Pry.config.hooks.add_hook(:before_session, :init_opts) do |_output, _binding, pi|
509
539
  opts[:pi] = pi
540
+ Pry.config.yaml_config_path = opts[:yaml_config_path]
541
+ Pry.config.decryption_file = opts[:decryption_file]
542
+
510
543
  PWN::Plugins::Vault.refresh_config_for_repl(opts)
511
544
  end
512
545
 
@@ -652,6 +685,8 @@ module PWN
652
685
  # Monkey Patch Pry, add commands, && hooks
653
686
  PWN::Plugins::MonkeyPatch.pry
654
687
  add_commands
688
+ opts[:yaml_config_path] ||= "#{Dir.home}/pwn.yaml"
689
+ opts[:decryption_file] ||= "#{Dir.home}/pwn.decryptor.yaml"
655
690
  add_hooks(opts)
656
691
 
657
692
  # Define PS1 Prompt
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.422'
4
+ VERSION = '0.5.423'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pwn
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.422
4
+ version: 0.5.423
5
5
  platform: ruby
6
6
  authors:
7
7
  - 0day Inc.