pwn 0.4.393 → 0.4.398

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9638834cb2c2444a04cd23b17e5c0e187c396a712677dd2f02a0be933b7aea3e
4
- data.tar.gz: 49240e2aec06df7358db080036c326969112bad268d0fa08a5b36456f1a6559f
3
+ metadata.gz: 9b4ebf5cc001c0126e5fc6408fae0ce64f99d79985d57a366d704b3b10b96983
4
+ data.tar.gz: 0b68f232f61b082d9245bdeae80de24d4a966eca5db14f0b764c05be4decfd1b
5
5
  SHA512:
6
- metadata.gz: b9375a72e7962e7945f4f8eff2ca994331617e4f4bb392c620510cf5c303795956c27f0a214712d6bb866478bb14d16fb5de52e434fdbee70094b6c6b99fe791
7
- data.tar.gz: 33ea8a6147132f1aa1ccea87c94c25718a865628056bb3517d80453ae70a3b7ba80c5eefd2e8765b7edb9a67f93316ba3e71dae7f016295d6bffc9618ec5c694
6
+ metadata.gz: 8c51aceb2a34f91c882a195c370989f3530c7b6348889075695729f07c5eaeddbf3b95191251ed947f8321e4918c497efa08c6ad13180017b4c3ebdd1c611c77
7
+ data.tar.gz: c8f1dee8c386ef1508885f17a6f71bbc50e48c61122cf1d201bd08e2f26c195e3c9556ce60ecf06d93784bfb7493ea0659de61f8d9a904fe49e5b7211dee377e
data/Gemfile CHANGED
@@ -21,6 +21,7 @@ gem 'bson', '4.14.1'
21
21
  gem 'bundler', '>=2.3.10'
22
22
  gem 'bundler-audit', '0.9.0.1'
23
23
  gem 'bunny', '2.19.0'
24
+ gem 'colorize', '0.8.1'
24
25
  # gem 'credit_card_validations', '4.1.0'
25
26
  gem 'faye-websocket', '0.11.1'
26
27
  gem 'gdb', '1.0.0'
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.393]:001 >>> PWN.help
40
+ pwn[v0.4.398]: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.393]:001 >>> PWN.help
55
+ pwn[v0.4.398]:001 >>> PWN.help
56
56
  ```
57
57
 
58
58
 
data/bin/pwn CHANGED
@@ -3,10 +3,30 @@
3
3
 
4
4
  require 'pwn'
5
5
  require 'pry'
6
- require 'tty-prompt'
7
- require 'tty-reader'
6
+ require 'colorize'
7
+ # require 'tty-prompt'
8
+ # require 'tty-reader'
8
9
 
9
10
  begin
11
+ def gen_ps1_proc(opts = {})
12
+ delim = opts[:delim]
13
+
14
+ title = 'pwn'.red.bold
15
+ version = PWN::VERSION.cyan
16
+ dchars = '>>>'.green
17
+ dchars = '***'.yellow if delim == :splat
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,64 +51,41 @@ begin
31
51
  end
32
52
  end
33
53
 
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
-
40
- cli.config.hooks.add_hook(:before_session, :welcome) do |output, _binding, _pry|
41
- output.puts 'Use the #help method for more options.'
42
- output.puts 'e.g help'
43
- output.puts 'e.g PWN.help'
44
- output.puts 'e.g PWN::Plugins.help'
45
- output.puts 'e.g PWN::Plugins::TransparentBrowser.help'
46
- end
47
-
48
- cli::Commands.create_command 'toggle-pager' do
54
+ # Define Custom REPL Commands
55
+ Pry::Commands.create_command 'toggle-pager' do
49
56
  description 'Toggle less on returned objects surpassing the terminal.'
50
57
 
51
58
  def process
52
- _pry_.config.pager ? _pry_.config.pager = false : _pry_.config.pager = true
59
+ pi = pry_instance
60
+ pi.config.pager ? pi.config.pager = false : pi.config.pager = true
53
61
  end
54
62
  end
55
63
 
56
- # Custom Main & Wait (Multi-Line) Prompts
57
- title = "\001\e[1m\002\001\e[31m\002pwn\001\e[0m\002" # Bold Red
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
64
+ # Define REPL Hooks
65
+ Pry.config.hooks.add_hook(:before_session, :welcome) do |output, _binding, _pry|
66
+ output.puts PWN::Banner.get
67
+ output.puts 'Use the #help command & methods for more options.'
68
+ output.puts 'e.g help'
69
+ output.puts 'e.g PWN.help'
70
+ output.puts 'e.g PWN::Plugins.help'
71
+ output.puts 'e.g PWN::Plugins::TransparentBrowser.help'
81
72
  end
82
73
 
74
+ # Define PS1 Prompt
75
+ Pry.config.pwn_repl_line = 0
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(
86
81
  :pwn,
87
- 'PWN_PROTOTYPING_DRIVER',
82
+ 'PWN Prototyping REPL',
88
83
  prompt_ps1
89
84
  )
90
85
 
91
- cli.start(
86
+ # Start PWN REPL
87
+ Pry.config.prompt_name = :pwn
88
+ Pry.start(
92
89
  self,
93
90
  prompt: pwn_prompt
94
91
  )
@@ -0,0 +1,42 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'colorize'
4
+
5
+ module PWN
6
+ module Banner
7
+ # This plugin processes images into readable text
8
+ module Bubble
9
+ # Supported Method Parameters::
10
+ # PWN::Banner::Bubble.get
11
+
12
+ public_class_method def self.get
13
+ '
14
+ _ _ _
15
+ / \ / \ / \
16
+ ( P )( W )( N )
17
+ \_/ \_/ \_/
18
+ '.red
19
+ rescue StandardError => e
20
+ raise e
21
+ end
22
+
23
+ # Author(s):: 0day Inc. <request.pentest@0dayinc.com>
24
+
25
+ public_class_method def self.authors
26
+ "AUTHOR(S):
27
+ 0day Inc. <request.pentest@0dayinc.com>
28
+ "
29
+ end
30
+
31
+ # Display Usage for this Module
32
+
33
+ public_class_method def self.help
34
+ puts "USAGE:
35
+ #{self}.get
36
+
37
+ #{self}.authors
38
+ "
39
+ end
40
+ end
41
+ end
42
+ end
@@ -0,0 +1,196 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'colorize'
4
+
5
+ module PWN
6
+ module Banner
7
+ # This plugin processes images into readable text
8
+ module Matrix
9
+ # Supported Method Parameters::
10
+ # PWN::Banner::Matrix.get
11
+
12
+ public_class_method def self.get
13
+ cols = 33
14
+
15
+ matrix_arr = [
16
+ 0x30a0.chr('UTF-8'),
17
+ 0x30a1.chr('UTF-8'),
18
+ 0x30a2.chr('UTF-8'),
19
+ 0x30a3.chr('UTF-8'),
20
+ 0x30a4.chr('UTF-8'),
21
+ 0x30a5.chr('UTF-8'),
22
+ 0x30a6.chr('UTF-8'),
23
+ 0x30a7.chr('UTF-8'),
24
+ 0x30a8.chr('UTF-8'),
25
+ 0x30a9.chr('UTF-8'),
26
+ 0x30aa.chr('UTF-8'),
27
+ 0x30ab.chr('UTF-8'),
28
+ 0x30ac.chr('UTF-8'),
29
+ 0x30ad.chr('UTF-8'),
30
+ 0x30ae.chr('UTF-8'),
31
+ 0x30af.chr('UTF-8'),
32
+ 0x30b0.chr('UTF-8'),
33
+ 0x30b1.chr('UTF-8'),
34
+ 0x30b2.chr('UTF-8'),
35
+ 0x30b3.chr('UTF-8'),
36
+ 0x30b4.chr('UTF-8'),
37
+ 0x30b5.chr('UTF-8'),
38
+ 0x30b6.chr('UTF-8'),
39
+ 0x30b7.chr('UTF-8'),
40
+ 0x30b8.chr('UTF-8'),
41
+ 0x30b9.chr('UTF-8'),
42
+ 0x30ba.chr('UTF-8'),
43
+ 0x30bb.chr('UTF-8'),
44
+ 0x30bc.chr('UTF-8'),
45
+ 0x30bd.chr('UTF-8'),
46
+ 0x30be.chr('UTF-8'),
47
+ 0x30bf.chr('UTF-8'),
48
+ 0x30c0.chr('UTF-8'),
49
+ 0x30c1.chr('UTF-8'),
50
+ 0x30c2.chr('UTF-8'),
51
+ 0x30c3.chr('UTF-8'),
52
+ 0x30c4.chr('UTF-8'),
53
+ 0x30c5.chr('UTF-8'),
54
+ 0x30c6.chr('UTF-8'),
55
+ 0x30c7.chr('UTF-8'),
56
+ 0x30c8.chr('UTF-8'),
57
+ 0x30c9.chr('UTF-8'),
58
+ 0x30ca.chr('UTF-8'),
59
+ 0x30cb.chr('UTF-8'),
60
+ 0x30cc.chr('UTF-8'),
61
+ 0x30cd.chr('UTF-8'),
62
+ 0x30ce.chr('UTF-8'),
63
+ 0x30cf.chr('UTF-8'),
64
+ 0x30d0.chr('UTF-8'),
65
+ 0x30d1.chr('UTF-8'),
66
+ 0x30d2.chr('UTF-8'),
67
+ 0x30d3.chr('UTF-8'),
68
+ 0x30d4.chr('UTF-8'),
69
+ 0x30d5.chr('UTF-8'),
70
+ 0x30d6.chr('UTF-8'),
71
+ 0x30d7.chr('UTF-8'),
72
+ 0x30d8.chr('UTF-8'),
73
+ 0x30d9.chr('UTF-8'),
74
+ 0x30da.chr('UTF-8'),
75
+ 0x30db.chr('UTF-8'),
76
+ 0x30dc.chr('UTF-8'),
77
+ 0x30dd.chr('UTF-8'),
78
+ 0x30de.chr('UTF-8'),
79
+ 0x30df.chr('UTF-8'),
80
+ 0x30e0.chr('UTF-8'),
81
+ 0x30e1.chr('UTF-8'),
82
+ 0x30e2.chr('UTF-8'),
83
+ 0x30e3.chr('UTF-8'),
84
+ 0x30e4.chr('UTF-8'),
85
+ 0x30e5.chr('UTF-8'),
86
+ 0x30e6.chr('UTF-8'),
87
+ 0x30e7.chr('UTF-8'),
88
+ 0x30e8.chr('UTF-8'),
89
+ 0x30e9.chr('UTF-8'),
90
+ 0x30ea.chr('UTF-8'),
91
+ 0x30eb.chr('UTF-8'),
92
+ 0x30ec.chr('UTF-8'),
93
+ 0x30ed.chr('UTF-8'),
94
+ 0x30ee.chr('UTF-8'),
95
+ 0x30ef.chr('UTF-8'),
96
+ 0x30f0.chr('UTF-8'),
97
+ 0x30f1.chr('UTF-8'),
98
+ 0x30f2.chr('UTF-8'),
99
+ 0x30f3.chr('UTF-8'),
100
+ 0x30f4.chr('UTF-8'),
101
+ 0x30f5.chr('UTF-8'),
102
+ 0x30f6.chr('UTF-8'),
103
+ 0x30f7.chr('UTF-8'),
104
+ 0x30f8.chr('UTF-8'),
105
+ 0x30f9.chr('UTF-8'),
106
+ 0x30fa.chr('UTF-8'),
107
+ 0x30fb.chr('UTF-8'),
108
+ 0x30fc.chr('UTF-8'),
109
+ 0x30fd.chr('UTF-8'),
110
+ 0x30fe.chr('UTF-8'),
111
+ '0 ',
112
+ '1 ',
113
+ '2 ',
114
+ '3 ',
115
+ '4 ',
116
+ '5 ',
117
+ '6 ',
118
+ '7 ',
119
+ '8 ',
120
+ '9 ',
121
+ 'A ',
122
+ 'c ',
123
+ 'R ',
124
+ 'y ',
125
+ 'P ',
126
+ 't ',
127
+ 'U ',
128
+ 'm ',
129
+ 'x ',
130
+ 'Z ',
131
+ ': ',
132
+ '{ ',
133
+ '[ ',
134
+ '} ',
135
+ '] ',
136
+ '| ',
137
+ '` ',
138
+ '~ ',
139
+ '! ',
140
+ '@ ',
141
+ '# ',
142
+ '$ ',
143
+ '% ',
144
+ '^ ',
145
+ '& ',
146
+ '* ',
147
+ '( ',
148
+ ') ',
149
+ '_ ',
150
+ '- ',
151
+ '= ',
152
+ '+ ',
153
+ '> ',
154
+ '< ',
155
+ '. ',
156
+ ', '
157
+ ]
158
+
159
+ last_index = matrix_arr.length - 1
160
+
161
+ matrix = ''
162
+ cols.times do
163
+ matrix_row = ''
164
+ most_cols = cols - 1
165
+ most_cols.times.each do
166
+ matrix_row += "#{matrix_arr[Random.rand(0..last_index)]} "
167
+ end
168
+ matrix_row += matrix_arr[Random.rand(0..last_index)]
169
+ matrix = "#{matrix}#{matrix_row}\n"
170
+ end
171
+
172
+ matrix.green
173
+ rescue StandardError => e
174
+ raise e
175
+ end
176
+
177
+ # Author(s):: 0day Inc. <request.pentest@0dayinc.com>
178
+
179
+ public_class_method def self.authors
180
+ "AUTHOR(S):
181
+ 0day Inc. <request.pentest@0dayinc.com>
182
+ "
183
+ end
184
+
185
+ # Display Usage for this Module
186
+
187
+ public_class_method def self.help
188
+ puts "USAGE:
189
+ #{self}.get
190
+
191
+ #{self}.authors
192
+ "
193
+ end
194
+ end
195
+ end
196
+ end
@@ -0,0 +1,54 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'colorize'
4
+
5
+ module PWN
6
+ module Banner
7
+ # This plugin processes images into readable text
8
+ module Ninja
9
+ # Supported Method Parameters::
10
+ # PWN::Banner::Ninja.get
11
+
12
+ public_class_method def self.get
13
+ '
14
+ .=+*****=-
15
+ :#%%%%%%%%%%%=
16
+ :%%%%%%%%%%%%%%+
17
+ *%%#+=-::--=*%%%+*#*
18
+ *%+:%%-:::#@=:%%%#*-
19
+ :: =%*:==::::-=:=%#:*%-
20
+ *#*- +%%%#######%%#.
21
+ :+##=.+%%%%%%%%%=
22
+ :-+%%%%%%%%%%%%#=
23
+ -%%%%%%%%%%%%%%%%%-
24
+ -%%#:.%%%%%%%%%.:#%%:
25
+ -##- -%%%%%%%%%- -##:
26
+ *%%%#+#%%%*::.
27
+ %%%+ *%%#
28
+ .%%%. :%%%.
29
+ =**+ +##=
30
+ '.light_blue
31
+ rescue StandardError => e
32
+ raise e
33
+ end
34
+
35
+ # Author(s):: 0day Inc. <request.pentest@0dayinc.com>
36
+
37
+ public_class_method def self.authors
38
+ "AUTHOR(S):
39
+ 0day Inc. <request.pentest@0dayinc.com>
40
+ "
41
+ end
42
+
43
+ # Display Usage for this Module
44
+
45
+ public_class_method def self.help
46
+ puts "USAGE:
47
+ #{self}.get
48
+
49
+ #{self}.authors
50
+ "
51
+ end
52
+ end
53
+ end
54
+ end
@@ -0,0 +1,58 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'colorize'
4
+
5
+ module PWN
6
+ module Banner
7
+ # This plugin processes images into readable text
8
+ module OffTheAir
9
+ # Supported Method Parameters::
10
+ # PWN::Banner::OffTheAir.get
11
+
12
+ public_class_method def self.get
13
+ '
14
+ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
15
+ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
16
+ @@#####%%%%%%%%%%%%%%%%%%%%@@@@@@@@@@@@@
17
+ @%.....=====-::::-=====++++*%%%%%#####@@
18
+ @%.....=====-::::-=====++++*%%%%%#####@@
19
+ @%.....=====-::::-=====++++*%%%%%#####@@
20
+ @%.....=====-::::-=====++++*%%%%%#####@@
21
+ @%.....=====-::::-=====++++*%%%%%#####@@
22
+ @%.....=====-::::-=====++++*%%%%%#####@@
23
+ @%.....=====-::::-=====++++*%%%%%#####@@
24
+ @%.....=====-::::-=====++++*%%%%%#####@@
25
+ @%.....=====-::::-=====++++*%%%%%#####@@
26
+ @%.....=====-::::-=====++++*%%%%%#####@@
27
+ @@+++++%%%%%+++++*%%%%*----=@@@@@:::::%@
28
+ @@######.... *###%%@@@@@@@@@@@@@%%%%%@@
29
+ @@###### *#####%@@@@@@@@@@@@@@@@@@@
30
+ @@###### *#####%@@@@@@@@@@@@@@@@@@@
31
+ @@@@@@@@######@@@@@@@@@@@@@@@@@@@@@@@@@@
32
+ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
33
+ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
34
+ '
35
+ rescue StandardError => e
36
+ raise e
37
+ end
38
+
39
+ # Author(s):: 0day Inc. <request.pentest@0dayinc.com>
40
+
41
+ public_class_method def self.authors
42
+ "AUTHOR(S):
43
+ 0day Inc. <request.pentest@0dayinc.com>
44
+ "
45
+ end
46
+
47
+ # Display Usage for this Module
48
+
49
+ public_class_method def self.help
50
+ puts "USAGE:
51
+ #{self}.get
52
+
53
+ #{self}.authors
54
+ "
55
+ end
56
+ end
57
+ end
58
+ end
@@ -0,0 +1,61 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'colorize'
4
+
5
+ module PWN
6
+ module Banner
7
+ # This plugin processes images into readable text
8
+ module Pirate
9
+ # Supported Method Parameters::
10
+ # PWN::Banner::Pirate.get
11
+
12
+ public_class_method def self.get
13
+ '
14
+ @@@@@@@%%@@%%%%%%%%%%%%%%%%%%%%%%@@@@@@@@@@@@@@@@@@@@@@@@@@@
15
+ @@@@@@@%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@@@@@@@@@@@@@@@@@@@@@@@
16
+ @@@@@@@@@@%%%%@%%%%%%%%%%%%%%%%%%%%%%%%%@@@@@@@@@@@@@@@@@@@@
17
+ @@@@@@@@@@@@@@@@@%%%%%%%%%%%%%%%%%%%%%%%%%%@@@@@@@@@@@@@@@@@
18
+ @@@@@@@@@@@@%@@@@%%%%%%%%%%%%#***#%%%%%%%%%%%@@@@@@@@@@@@@@@
19
+ @@@@@@@@@@@@@%@@@%%%@%%%%%+-.......:+%%%%%%%%%%@@@@@@@@@@@@@
20
+ @@@@@@@@@@@@@@@@@@@%%%%@#:............*%%%%%%%%%%%%@%@@@@@@@
21
+ @@@@@@@@@@@@@@@@@@@@@%%%:.:.....*%%*:..%%%%%%%%%%%%%%%@@@@@@
22
+ @@@@@@@@@@@@@@@@@@@@@%%%:.-%%:..%%%%*.:%%%%%%%%%%%%%%%%%%%@@
23
+ @@@@@@@@@@@@@@@@%%@%%%%%%+=##::::*##-=#%%%%%%%%%%%%%%%%%%%%@
24
+ @@@@@@@@@@@@@@@@@@@%*#%%@#==::*=.=+=*%%%%%%%%%%%%%%%%%%%%%%@
25
+ @@@@@@@@@@@@@@@@@@@*-::=#@%%+::::*@%%=..%%%%%%%%%%%%%%%%%%%%
26
+ @@@@@@@@@@@@@@@@@@@@@%*+--+#%%%%%%#+:...+%%%%%%%%%%%%%%%%%%%
27
+ @@@@@@@@@@@@@@@@@@@@@@%%@#+-:+*+=-+*#%*:-%%%%%%%%%%%%%@%%%%%
28
+ @@@@@@@@@@@@@@@@@@@@@+-+**+=-==:-+#%%%%%@%%%%%%%%%%%%%%%%%%%
29
+ @@@@@@@@@@@@@@@@@@@@@%*::=*#%@@%*=::-=#%%%%%%%%%%%%%%%%%%%%%
30
+ @@@@@@@@@@@@@@@@%%@@@@+:=%@@@@%%%@%+:..+%%%%%%%%%%%%%%%%%%%%
31
+ @@@@@@@@@@@@@@@@@@@@@@%#%@@@@@@%%@@%%%#*#%%%%%%%%%%%%%%%%%%%
32
+ @@@@@@@@@@@@@@@@@@@@@@%%%%@@@@@%%%%%###%%%%%%%%%%%%%%%%%%%%%
33
+ @@@@@@@@@@@@@@@@@@@@@%%%%%%%%@%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
34
+ @@@@@@@@@@@@@@@@@@@@@@@@@@@%%%%%%%@@%%%%%%%%%%%%%%%%%%%%%%%%
35
+ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%%%%%%%%%%%%%%%%%%%%%%%%%%%%
36
+ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%%%%%%%%%%%%%%%%%%%%%%%%
37
+ '.light_black
38
+ rescue StandardError => e
39
+ raise e
40
+ end
41
+
42
+ # Author(s):: 0day Inc. <request.pentest@0dayinc.com>
43
+
44
+ public_class_method def self.authors
45
+ "AUTHOR(S):
46
+ 0day Inc. <request.pentest@0dayinc.com>
47
+ "
48
+ end
49
+
50
+ # Display Usage for this Module
51
+
52
+ public_class_method def self.help
53
+ puts "USAGE:
54
+ #{self}.get
55
+
56
+ #{self}.authors
57
+ "
58
+ end
59
+ end
60
+ end
61
+ end
data/lib/pwn/banner.rb ADDED
@@ -0,0 +1,62 @@
1
+ # frozen_string_literal: true
2
+
3
+ module PWN
4
+ # This file, using the autoload directive loads SP reports
5
+ # into memory only when they're needed. For more information, see:
6
+ # http://www.rubyinside.com/ruby-techniques-revealed-autoload-1652.html
7
+ module Banner
8
+ autoload :Bubble, 'pwn/banner/bubble'
9
+ autoload :Matrix, 'pwn/banner/matrix'
10
+ autoload :Ninja, 'pwn/banner/ninja'
11
+ autoload :OffTheAir, 'pwn/banner/off_the_air'
12
+ autoload :Pirate, 'pwn/banner/pirate'
13
+
14
+ # Supported Method Parameters::
15
+ # PWN::Banner.get(
16
+ # index: 'optional - defaults to random banner index'
17
+ # )
18
+
19
+ public_class_method def self.get(opts = {})
20
+ index = opts[:index].to_i
21
+ index = Random.rand(1..5) unless index.positive?
22
+
23
+ banner = ''
24
+ case index
25
+ when 1
26
+ banner = PWN::Banner::Bubble.get
27
+ when 2
28
+ banner = PWN::Banner::Matrix.get
29
+ when 3
30
+ banner = PWN::Banner::Ninja.get
31
+ when 4
32
+ banner = PWN::Banner::OffTheAir.get
33
+ when 5
34
+ banner = PWN::Banner::Pirate.get
35
+ else
36
+ raise 'Invalid Index.'
37
+ end
38
+
39
+ banner
40
+ end
41
+
42
+ # Author(s):: 0day Inc. <request.pentest@0dayinc.com>
43
+
44
+ public_class_method def self.authors
45
+ "AUTHOR(S):
46
+ 0day Inc. <request.pentest@0dayinc.com>
47
+ "
48
+ end
49
+
50
+ # Display Usage for this Module
51
+
52
+ public_class_method def self.help
53
+ puts "USAGE:
54
+ banner = #{self}.get(
55
+ index: 'optional - defaults to random banner index'
56
+ )
57
+
58
+ #{self}.authors
59
+ "
60
+ end
61
+ end
62
+ end
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.4.393'
4
+ VERSION = '0.4.398'
5
5
  end
data/lib/pwn.rb CHANGED
@@ -10,6 +10,7 @@ module PWN
10
10
  $stdout.flush # < Ensure that all print statements output progress in realtime
11
11
  # TODO: Determine best balance for namespace naming conventions
12
12
  autoload :AWS, 'pwn/aws'
13
+ autoload :Banner, 'pwn/banner'
13
14
  autoload :FFI, 'pwn/ffi'
14
15
  autoload :Plugins, 'pwn/plugins'
15
16
  autoload :Reports, 'pwn/reports'
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helper'
4
+
5
+ describe PWN::Banner::Bubble do
6
+ it 'should cointain a method for banner retrieval' do
7
+ get_response = PWN::Banner::Bubble
8
+ expect(get_response).to respond_to :get
9
+ end
10
+
11
+ it 'should display information for authors' do
12
+ authors_response = PWN::Banner::Bubble
13
+ expect(authors_response).to respond_to :authors
14
+ end
15
+
16
+ it 'should display information for existing help method' do
17
+ help_response = PWN::Banner::Bubble
18
+ expect(help_response).to respond_to :help
19
+ end
20
+ end
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helper'
4
+
5
+ describe PWN::Banner::Matrix do
6
+ it 'should cointain a method for banner retrieval' do
7
+ get_response = PWN::Banner::Matrix
8
+ expect(get_response).to respond_to :get
9
+ end
10
+
11
+ it 'should display information for authors' do
12
+ authors_response = PWN::Banner::Matrix
13
+ expect(authors_response).to respond_to :authors
14
+ end
15
+
16
+ it 'should display information for existing help method' do
17
+ help_response = PWN::Banner::Matrix
18
+ expect(help_response).to respond_to :help
19
+ end
20
+ end
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helper'
4
+
5
+ describe PWN::Banner::Ninja do
6
+ it 'should cointain a method for banner retrieval' do
7
+ get_response = PWN::Banner::Ninja
8
+ expect(get_response).to respond_to :get
9
+ end
10
+
11
+ it 'should display information for authors' do
12
+ authors_response = PWN::Banner::Ninja
13
+ expect(authors_response).to respond_to :authors
14
+ end
15
+
16
+ it 'should display information for existing help method' do
17
+ help_response = PWN::Banner::Ninja
18
+ expect(help_response).to respond_to :help
19
+ end
20
+ end
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helper'
4
+
5
+ describe PWN::Banner::OffTheAir do
6
+ it 'should cointain a method for banner retrieval' do
7
+ get_response = PWN::Banner::OffTheAir
8
+ expect(get_response).to respond_to :get
9
+ end
10
+
11
+ it 'should display information for authors' do
12
+ authors_response = PWN::Banner::OffTheAir
13
+ expect(authors_response).to respond_to :authors
14
+ end
15
+
16
+ it 'should display information for existing help method' do
17
+ help_response = PWN::Banner::OffTheAir
18
+ expect(help_response).to respond_to :help
19
+ end
20
+ end
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helper'
4
+
5
+ describe PWN::Banner::Pirate do
6
+ it 'should cointain a method for banner retrieval' do
7
+ get_response = PWN::Banner::Pirate
8
+ expect(get_response).to respond_to :get
9
+ end
10
+
11
+ it 'should display information for authors' do
12
+ authors_response = PWN::Banner::Pirate
13
+ expect(authors_response).to respond_to :authors
14
+ end
15
+
16
+ it 'should display information for existing help method' do
17
+ help_response = PWN::Banner::Pirate
18
+ expect(help_response).to respond_to :help
19
+ end
20
+ end
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helper'
4
+
5
+ describe PWN::Banner do
6
+ it 'should display information for authors' do
7
+ authors_response = PWN::Banner
8
+ expect(authors_response).to respond_to :authors
9
+ end
10
+
11
+ it 'should display information for existing help method' do
12
+ help_response = PWN::Banner
13
+ expect(help_response).to respond_to :help
14
+ end
15
+ end
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.393
4
+ version: 0.4.398
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-02 00:00:00.000000000 Z
11
+ date: 2022-04-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -150,6 +150,20 @@ dependencies:
150
150
  - - '='
151
151
  - !ruby/object:Gem::Version
152
152
  version: 2.19.0
153
+ - !ruby/object:Gem::Dependency
154
+ name: colorize
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - '='
158
+ - !ruby/object:Gem::Version
159
+ version: 0.8.1
160
+ type: :runtime
161
+ prerelease: false
162
+ version_requirements: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - '='
165
+ - !ruby/object:Gem::Version
166
+ version: 0.8.1
153
167
  - !ruby/object:Gem::Dependency
154
168
  name: faye-websocket
155
169
  requirement: !ruby/object:Gem::Requirement
@@ -1438,6 +1452,12 @@ files:
1438
1452
  - lib/pwn/aws/waf_regional.rb
1439
1453
  - lib/pwn/aws/workspaces.rb
1440
1454
  - lib/pwn/aws/x_ray.rb
1455
+ - lib/pwn/banner.rb
1456
+ - lib/pwn/banner/bubble.rb
1457
+ - lib/pwn/banner/matrix.rb
1458
+ - lib/pwn/banner/ninja.rb
1459
+ - lib/pwn/banner/off_the_air.rb
1460
+ - lib/pwn/banner/pirate.rb
1441
1461
  - lib/pwn/ffi.rb
1442
1462
  - lib/pwn/plugins.rb
1443
1463
  - lib/pwn/plugins/android.rb
@@ -1729,6 +1749,12 @@ files:
1729
1749
  - spec/lib/pwn/aws/workspaces_spec.rb
1730
1750
  - spec/lib/pwn/aws/x_ray_spec.rb
1731
1751
  - spec/lib/pwn/aws_spec.rb
1752
+ - spec/lib/pwn/banner/bubble_spec.rb
1753
+ - spec/lib/pwn/banner/matrix_spec.rb
1754
+ - spec/lib/pwn/banner/ninja_spec.rb
1755
+ - spec/lib/pwn/banner/off_the_air_spec.rb
1756
+ - spec/lib/pwn/banner/pirate_spec.rb
1757
+ - spec/lib/pwn/banner_spec.rb
1732
1758
  - spec/lib/pwn/ffi_spec.rb
1733
1759
  - spec/lib/pwn/plugins/android_spec.rb
1734
1760
  - spec/lib/pwn/plugins/authentication_helper_spec.rb
@@ -1990,6 +2016,12 @@ test_files:
1990
2016
  - spec/lib/pwn/aws/workspaces_spec.rb
1991
2017
  - spec/lib/pwn/aws/x_ray_spec.rb
1992
2018
  - spec/lib/pwn/aws_spec.rb
2019
+ - spec/lib/pwn/banner/bubble_spec.rb
2020
+ - spec/lib/pwn/banner/matrix_spec.rb
2021
+ - spec/lib/pwn/banner/ninja_spec.rb
2022
+ - spec/lib/pwn/banner/off_the_air_spec.rb
2023
+ - spec/lib/pwn/banner/pirate_spec.rb
2024
+ - spec/lib/pwn/banner_spec.rb
1993
2025
  - spec/lib/pwn/ffi_spec.rb
1994
2026
  - spec/lib/pwn/plugins/android_spec.rb
1995
2027
  - spec/lib/pwn/plugins/authentication_helper_spec.rb