pwn 0.4.394 → 0.4.399

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: 00fdd984c56c17e08366de15f8d1627da1a6fb193e55b6eb7a3648f75ab457e5
4
- data.tar.gz: 8807dcbe516537df70d8e3e73db1f0431b1390e3395a46bce5c0fc10b0d3499e
3
+ metadata.gz: 12c6888f493ab5d64d1ae81f369b73ee92137b221610808150d5d90a54c62d33
4
+ data.tar.gz: 56dd40918769d31f4569784705ee7462e01871aaeb9e0fa51e879a1722ca1d70
5
5
  SHA512:
6
- metadata.gz: 10a1926b599089ccc218a5cac4e60570cd7d9fb27a8ae39d6ab0fc170a24dcf4242f3d504e2ef023fb2c8b62150fe4bfa982bdb44cbbff4a88f8553626e09b40
7
- data.tar.gz: 1571134fce31b0218649722d6535d9918af3351f8e3a2cb40fadb3fb8b2a9ecfd554d713bc3662f01ada558294b7ca1e3464faf195867ceb60020378fdb0b69e
6
+ metadata.gz: 20b86720b8e2937f28aa3aadb7d39f77e9fefd561b0642a738d44dda44e69641136a56905a96ffa6da17878415fbc2ebd7b7bf5ca039630d8418ab4d82508f06
7
+ data.tar.gz: 232e2b9c143a8918ac4f65ddc082c02c517a1c90117202077723b6abff5ce724173cab2c11c274a8476ccbb584801117d2d70a0ecca3acc1cc20d4657052d512
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.394]:001 >>> PWN.help
40
+ pwn[v0.4.399]: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.394]:001 >>> PWN.help
55
+ pwn[v0.4.399]:001 >>> PWN.help
56
56
  ```
57
57
 
58
58
 
data/bin/pwn CHANGED
@@ -3,18 +3,18 @@
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
10
11
  def gen_ps1_proc(opts = {})
11
12
  delim = opts[:delim]
12
13
 
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
14
+ title = 'pwn'.red.bold
15
+ version = PWN::VERSION.cyan
16
+ dchars = '>>>'.green
17
+ dchars = '***'.yellow if delim == :splat
18
18
 
19
19
  proc do |_target_self, _nest_level, pry|
20
20
  pry.config.pwn_repl_line += 1
@@ -51,19 +51,7 @@ begin
51
51
  end
52
52
  end
53
53
 
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
58
-
59
- Pry.config.hooks.add_hook(:before_session, :welcome) do |output, _binding, _pry|
60
- output.puts 'Use the #help method for more options.'
61
- output.puts 'e.g help'
62
- output.puts 'e.g PWN.help'
63
- output.puts 'e.g PWN::Plugins.help'
64
- output.puts 'e.g PWN::Plugins::TransparentBrowser.help'
65
- end
66
-
54
+ # Define Custom REPL Commands
67
55
  Pry::Commands.create_command 'toggle-pager' do
68
56
  description 'Toggle less on returned objects surpassing the terminal.'
69
57
 
@@ -73,16 +61,30 @@ begin
73
61
  end
74
62
  end
75
63
 
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'
72
+ end
73
+
74
+ # Define PS1 Prompt
75
+ Pry.config.pwn_repl_line = 0
76
76
  arrow_ps1_proc = gen_ps1_proc
77
77
  splat_ps1_proc = gen_ps1_proc(delim: :splat)
78
78
  prompt_ps1 = [arrow_ps1_proc, splat_ps1_proc]
79
79
 
80
80
  pwn_prompt = Pry::Prompt.new(
81
81
  :pwn,
82
- 'PWN_PROTOTYPING_DRIVER',
82
+ 'PWN Prototyping REPL',
83
83
  prompt_ps1
84
84
  )
85
85
 
86
+ # Start PWN REPL
87
+ Pry.config.prompt_name = :pwn
86
88
  Pry.start(
87
89
  self,
88
90
  prompt: pwn_prompt
@@ -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,73 @@
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
+ c1 = '.....'.light_black
14
+ c2 = '====='.yellow
15
+ c3 = ':::::'.light_blue
16
+ c4 = '====='.light_green
17
+ c5 = '+++++'.magenta
18
+ c6 = '%%%%%'.red
19
+ c7 = '#####'.blue
20
+ d1 = '+++++'.blue
21
+ d2 = '%%%%%'.black
22
+ d3 = '+++++'.magenta
23
+ d4 = '%%%%%'.black
24
+ d5 = '-----'.light_blue
25
+ d6 = '@@@@@'.black
26
+ d7 = ':::::'.white
27
+ ee1 = '######'.red
28
+ ee2 = '......'.white
29
+ ee3 = '******'.blue
30
+ ee4 = '::::::'.black
31
+ ee5 = '@@@@@@'.black
32
+ f1 = '%%%%%'.black
33
+
34
+ "
35
+ #{c1}#{c2}#{c3}#{c4}#{c5}#{c6}#{c7}
36
+ #{c1}#{c2}#{c3}#{c4}#{c5}#{c6}#{c7}
37
+ #{c1}#{c2}#{c3}#{c4}#{c5}#{c6}#{c7}
38
+ #{c1}#{c2}#{c3}#{c4}#{c5}#{c6}#{c7}
39
+ #{c1}#{c2}#{c3}#{c4}#{c5}#{c6}#{c7}
40
+ #{c1}#{c2}#{c3}#{c4}#{c5}#{c6}#{c7}
41
+ #{c1}#{c2}#{c3}#{c4}#{c5}#{c6}#{c7}
42
+ #{c1}#{c2}#{c3}#{c4}#{c5}#{c6}#{c7}
43
+ #{c1}#{c2}#{c3}#{c4}#{c5}#{c6}#{c7}
44
+ #{c1}#{c2}#{c3}#{c4}#{c5}#{c6}#{c7}
45
+ #{d1}#{d2}#{d3}#{d4}#{d5}#{d6}#{d7}
46
+ #{ee1}#{ee2}#{ee3}#{ee4}#{ee5}#{f1}
47
+ #{ee1}#{ee2}#{ee3}#{ee4}#{ee5}#{f1}
48
+ #{ee1}#{ee2}#{ee3}#{ee4}#{ee5}#{f1}
49
+ "
50
+ rescue StandardError => e
51
+ raise e
52
+ end
53
+
54
+ # Author(s):: 0day Inc. <request.pentest@0dayinc.com>
55
+
56
+ public_class_method def self.authors
57
+ "AUTHOR(S):
58
+ 0day Inc. <request.pentest@0dayinc.com>
59
+ "
60
+ end
61
+
62
+ # Display Usage for this Module
63
+
64
+ public_class_method def self.help
65
+ puts "USAGE:
66
+ #{self}.get
67
+
68
+ #{self}.authors
69
+ "
70
+ end
71
+ end
72
+ end
73
+ 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.394'
4
+ VERSION = '0.4.399'
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.394
4
+ version: 0.4.399
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