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

Class Method Details

.authorsObject

Author(s)

0day Inc. <[email protected]>



58
59
60
61
62
# File 'lib/pwn/banner.rb', line 58

public_class_method def self.authors
  "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?

  banner = ''
  case index
  when 1
    banner = PWN::Banner::Bubble.get
  when 2
    banner = PWN::Banner::Matrix.get
  when 3
    banner = PWN::Banner::Ninja.get
  when 4
    banner = PWN::Banner::OffTheAir.get
  when 5
    banner = PWN::Banner::Pirate.get
  else
    raise 'Invalid Index.'
  end

  banner
end

.helpObject

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

.welcomeObject

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
  banner = PWN::Banner.get
  banner = "#{banner}\nUse the #help command & methods for more options.\n"
  banner = "#{banner}e.g help\n"
  banner = "#{banner}e.g PWN.help\n"
  banner = "#{banner}e.g PWN::Plugins.help\n"
  banner = "#{banner}e.g PWN::Plugins::TransparentBrowser.help\n"
end