pwn 0.4.391 → 0.4.393
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 +19 -26
- data/lib/pwn/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9638834cb2c2444a04cd23b17e5c0e187c396a712677dd2f02a0be933b7aea3e
|
4
|
+
data.tar.gz: 49240e2aec06df7358db080036c326969112bad268d0fa08a5b36456f1a6559f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b9375a72e7962e7945f4f8eff2ca994331617e4f4bb392c620510cf5c303795956c27f0a214712d6bb866478bb14d16fb5de52e434fdbee70094b6c6b99fe791
|
7
|
+
data.tar.gz: 33ea8a6147132f1aa1ccea87c94c25718a865628056bb3517d80453ae70a3b7ba80c5eefd2e8765b7edb9a67f93316ba3e71dae7f016295d6bffc9618ec5c694
|
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.393]: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.393]:001 >>> PWN.help
|
56
56
|
```
|
57
57
|
|
58
58
|
|
data/bin/pwn
CHANGED
@@ -7,10 +7,6 @@ require 'tty-prompt'
|
|
7
7
|
require 'tty-reader'
|
8
8
|
|
9
9
|
begin
|
10
|
-
class LineCount
|
11
|
-
attr_accessor :total
|
12
|
-
end
|
13
|
-
|
14
10
|
class Pry
|
15
11
|
# Overwrite Pry::History.push method in History class to get duplicate history entries
|
16
12
|
# in order to properly replay automation in this prototyping driver
|
@@ -24,8 +20,6 @@ begin
|
|
24
20
|
last_line = nil
|
25
21
|
end
|
26
22
|
|
27
|
-
# return line if line == last_line
|
28
|
-
|
29
23
|
@history << line
|
30
24
|
@history_line_count += 1
|
31
25
|
@saver.call(line) if !should_ignore?(line) &&
|
@@ -37,24 +31,20 @@ begin
|
|
37
31
|
end
|
38
32
|
end
|
39
33
|
|
40
|
-
prompt = TTY::Prompt.new
|
41
|
-
reader = TTY::Reader.new
|
42
|
-
|
43
34
|
cli = Pry
|
35
|
+
cli.config.prompt_name = :pwn
|
36
|
+
cli.config.pwn_repl_line = 0
|
37
|
+
cli.config.tty_prompt = TTY::Prompt.new
|
38
|
+
cli.config.tty_reader = TTY::Reader.new
|
39
|
+
|
44
40
|
cli.config.hooks.add_hook(:before_session, :welcome) do |output, _binding, _pry|
|
45
41
|
output.puts 'Use the #help method for more options.'
|
42
|
+
output.puts 'e.g help'
|
46
43
|
output.puts 'e.g PWN.help'
|
47
44
|
output.puts 'e.g PWN::Plugins.help'
|
48
45
|
output.puts 'e.g PWN::Plugins::TransparentBrowser.help'
|
49
46
|
end
|
50
47
|
|
51
|
-
cli.config.hooks.add_hook(:before_eval, :autocomplete) do |output, _binding, _pry|
|
52
|
-
reader.on(:keypress) do |key_event|
|
53
|
-
output.puts "Key: #{key_event.inspect}"
|
54
|
-
prompt.select('', key_event)
|
55
|
-
end
|
56
|
-
end
|
57
|
-
|
58
48
|
cli::Commands.create_command 'toggle-pager' do
|
59
49
|
description 'Toggle less on returned objects surpassing the terminal.'
|
60
50
|
|
@@ -66,23 +56,26 @@ begin
|
|
66
56
|
# Custom Main & Wait (Multi-Line) Prompts
|
67
57
|
title = "\001\e[1m\002\001\e[31m\002pwn\001\e[0m\002" # Bold Red
|
68
58
|
version = "\001\e[36m\002v#{PWN::VERSION}\001\e[0m\002" # Cyan
|
69
|
-
@
|
70
|
-
@line_count.total = 0
|
59
|
+
# @line = cli.config.custom_attrs[:line_number]
|
71
60
|
arrow = "\001\e[32m\002>>>\001\e[0m\002" # Green
|
72
61
|
splat = "\001\e[33m\002***\001\e[0m\002" # Yellow
|
73
62
|
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
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
|
+
)
|
78
69
|
line_count = "\001\e[34m\002#{line_pad}\001\e[0m\002" # Blue
|
79
70
|
"#{title}[#{version}]:#{line_count} #{arrow} ".to_s.scrub
|
80
71
|
end
|
81
72
|
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
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
|
+
)
|
86
79
|
line_count = "\001\e[34m\002#{line_pad}\001\e[0m\002" # Blue
|
87
80
|
"#{title}[#{version}]:#{line_count} #{splat} ".to_s.scrub
|
88
81
|
end
|
data/lib/pwn/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pwn
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.393
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- 0day Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-04-
|
11
|
+
date: 2022-04-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|