pwn 0.4.393 → 0.4.394
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/bin/pwn +31 -36
- 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: 00fdd984c56c17e08366de15f8d1627da1a6fb193e55b6eb7a3648f75ab457e5
|
4
|
+
data.tar.gz: 8807dcbe516537df70d8e3e73db1f0431b1390e3395a46bce5c0fc10b0d3499e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 10a1926b599089ccc218a5cac4e60570cd7d9fb27a8ae39d6ab0fc170a24dcf4242f3d504e2ef023fb2c8b62150fe4bfa982bdb44cbbff4a88f8553626e09b40
|
7
|
+
data.tar.gz: 1571134fce31b0218649722d6535d9918af3351f8e3a2cb40fadb3fb8b2a9ecfd554d713bc3662f01ada558294b7ca1e3464faf195867ceb60020378fdb0b69e
|
data/README.md
CHANGED
@@ -37,7 +37,7 @@ $ rvm use ruby-3.1.1@pwn
|
|
37
37
|
$ rvm list gemsets
|
38
38
|
$ gem install --verbose pwn
|
39
39
|
$ pwn
|
40
|
-
pwn[v0.4.
|
40
|
+
pwn[v0.4.394]: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.1@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.394]:001 >>> PWN.help
|
56
56
|
```
|
57
57
|
|
58
58
|
|
data/bin/pwn
CHANGED
@@ -7,6 +7,26 @@ require 'tty-prompt'
|
|
7
7
|
require 'tty-reader'
|
8
8
|
|
9
9
|
begin
|
10
|
+
def gen_ps1_proc(opts = {})
|
11
|
+
delim = opts[:delim]
|
12
|
+
|
13
|
+
# Custom Main & Wait (Multi-Line) Prompts
|
14
|
+
title = "\001\e[1m\002\001\e[31m\002pwn\001\e[0m\002" # Bold Red
|
15
|
+
version = "\001\e[36m\002v#{PWN::VERSION}\001\e[0m\002" # Cyan
|
16
|
+
dchars = "\001\e[32m\002>>>\001\e[0m\002" # Green
|
17
|
+
dchars = "\001\e[33m\002***\001\e[0m\002" if delim == :splat # Yellow
|
18
|
+
|
19
|
+
proc do |_target_self, _nest_level, pry|
|
20
|
+
pry.config.pwn_repl_line += 1
|
21
|
+
line_pad = format(
|
22
|
+
'%0.3d',
|
23
|
+
pry.config.pwn_repl_line
|
24
|
+
)
|
25
|
+
line_count = "\001\e[34m\002#{line_pad}\001\e[0m\002" # Blue
|
26
|
+
"#{title}[#{version}]:#{line_count} #{dchars} ".to_s.scrub
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
10
30
|
class Pry
|
11
31
|
# Overwrite Pry::History.push method in History class to get duplicate history entries
|
12
32
|
# in order to properly replay automation in this prototyping driver
|
@@ -31,13 +51,12 @@ begin
|
|
31
51
|
end
|
32
52
|
end
|
33
53
|
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
cli.config.tty_reader = TTY::Reader.new
|
54
|
+
Pry.config.prompt_name = :pwn
|
55
|
+
Pry.config.pwn_repl_line = 0
|
56
|
+
Pry.config.tty_prompt = TTY::Prompt.new
|
57
|
+
Pry.config.tty_reader = TTY::Reader.new
|
39
58
|
|
40
|
-
|
59
|
+
Pry.config.hooks.add_hook(:before_session, :welcome) do |output, _binding, _pry|
|
41
60
|
output.puts 'Use the #help method for more options.'
|
42
61
|
output.puts 'e.g help'
|
43
62
|
output.puts 'e.g PWN.help'
|
@@ -45,41 +64,17 @@ begin
|
|
45
64
|
output.puts 'e.g PWN::Plugins::TransparentBrowser.help'
|
46
65
|
end
|
47
66
|
|
48
|
-
|
67
|
+
Pry::Commands.create_command 'toggle-pager' do
|
49
68
|
description 'Toggle less on returned objects surpassing the terminal.'
|
50
69
|
|
51
70
|
def process
|
52
|
-
|
71
|
+
pi = pry_instance
|
72
|
+
pi.config.pager ? pi.config.pager = false : pi.config.pager = true
|
53
73
|
end
|
54
74
|
end
|
55
75
|
|
56
|
-
|
57
|
-
|
58
|
-
version = "\001\e[36m\002v#{PWN::VERSION}\001\e[0m\002" # Cyan
|
59
|
-
# @line = cli.config.custom_attrs[:line_number]
|
60
|
-
arrow = "\001\e[32m\002>>>\001\e[0m\002" # Green
|
61
|
-
splat = "\001\e[33m\002***\001\e[0m\002" # Yellow
|
62
|
-
|
63
|
-
arrow_ps1_proc = proc do |_target_self, _nest_level, pry|
|
64
|
-
pry.config.pwn_repl_line += 1
|
65
|
-
line_pad = format(
|
66
|
-
'%0.3d',
|
67
|
-
pry.config.pwn_repl_line
|
68
|
-
)
|
69
|
-
line_count = "\001\e[34m\002#{line_pad}\001\e[0m\002" # Blue
|
70
|
-
"#{title}[#{version}]:#{line_count} #{arrow} ".to_s.scrub
|
71
|
-
end
|
72
|
-
|
73
|
-
splat_ps1_proc = proc do |_target_self, _nest_level, pry|
|
74
|
-
pry.config.pwn_repl_line += 1
|
75
|
-
line_pad = format(
|
76
|
-
'%0.3d',
|
77
|
-
pry.config.pwn_repl_line
|
78
|
-
)
|
79
|
-
line_count = "\001\e[34m\002#{line_pad}\001\e[0m\002" # Blue
|
80
|
-
"#{title}[#{version}]:#{line_count} #{splat} ".to_s.scrub
|
81
|
-
end
|
82
|
-
|
76
|
+
arrow_ps1_proc = gen_ps1_proc
|
77
|
+
splat_ps1_proc = gen_ps1_proc(delim: :splat)
|
83
78
|
prompt_ps1 = [arrow_ps1_proc, splat_ps1_proc]
|
84
79
|
|
85
80
|
pwn_prompt = Pry::Prompt.new(
|
@@ -88,7 +83,7 @@ begin
|
|
88
83
|
prompt_ps1
|
89
84
|
)
|
90
85
|
|
91
|
-
|
86
|
+
Pry.start(
|
92
87
|
self,
|
93
88
|
prompt: pwn_prompt
|
94
89
|
)
|
data/lib/pwn/version.rb
CHANGED