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 +4 -4
- data/README.md +3 -3
- data/lib/pwn/plugins/repl.rb +35 -0
- 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: f8098304b98e5388c044eb9ff8b9a5bee04075d7a5ccadac260f7a974eb55c15
|
4
|
+
data.tar.gz: 4f19ff9ea53d7d4114ae6cbfb2a79fd34f1910d3202f209454645998665a7525
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
40
|
+
pwn[v0.5.423]:001 >>> PWN.help
|
41
41
|
```
|
42
42
|
|
43
43
|
[](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.
|
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.
|
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:
|
data/lib/pwn/plugins/repl.rb
CHANGED
@@ -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