Module: PWN::Banner
- Defined in:
- lib/pwn/banner.rb,
lib/pwn/banner/ninja.rb,
lib/pwn/banner/bubble.rb,
lib/pwn/banner/matrix.rb,
lib/pwn/banner/pirate.rb,
lib/pwn/banner/off_the_air.rb
Overview
This file, using the autoload directive loads SP reports into memory only when they’re needed. For more information, see: www.rubyinside.com/ruby-techniques-revealed-autoload-1652.html
Defined Under Namespace
Modules: Bubble, Matrix, Ninja, OffTheAir, Pirate
Class Method Summary collapse
-
.authors ⇒ Object
- Author(s)
-
0day Inc.
-
.get(opts = {}) ⇒ Object
- Supported Method Parameters
-
PWN::Banner.get( index: ‘optional - defaults to random banner index’ ).
-
.help ⇒ Object
Display Usage for this Module.
-
.welcome ⇒ Object
- Supported Method Parameters
-
PWN::Banner.get( index: ‘optional - defaults to random banner index’ ).
Class Method Details
.authors ⇒ Object
- Author(s)
-
0day Inc. <[email protected]>
58 59 60 61 62 |
# File 'lib/pwn/banner.rb', line 58 public_class_method def self. "AUTHOR(S): 0day Inc. <[email protected]> " end |
.get(opts = {}) ⇒ Object
- Supported Method Parameters
-
PWN::Banner.get(
index: 'optional - defaults to random banner index')
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/pwn/banner.rb', line 19 public_class_method def self.get(opts = {}) index = opts[:index].to_i index = Random.rand(1..5) unless index.positive? = '' case index when 1 = PWN::Banner::Bubble.get when 2 = PWN::Banner::Matrix.get when 3 = PWN::Banner::Ninja.get when 4 = PWN::Banner::OffTheAir.get when 5 = PWN::Banner::Pirate.get else raise 'Invalid Index.' end end |
.help ⇒ Object
Display Usage for this Module
66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/pwn/banner.rb', line 66 public_class_method def self.help puts "USAGE: banner = #{self}.get( index: 'optional - defaults to random banner index' ) banner = #{self}.welcome #{self}.authors " end |
.welcome ⇒ Object
- Supported Method Parameters
-
PWN::Banner.get(
index: 'optional - defaults to random banner index')
47 48 49 50 51 52 53 54 |
# File 'lib/pwn/banner.rb', line 47 public_class_method def self.welcome = PWN::Banner.get = "#{banner}\nUse the #help command & methods for more options.\n" = "#{banner}e.g help\n" = "#{banner}e.g PWN.help\n" = "#{banner}e.g PWN::Plugins.help\n" = "#{banner}e.g PWN::Plugins::TransparentBrowser.help\n" end |