Module: Ronin::Exploits::Verifiers
- Included in:
- Exploit
- Defined in:
- lib/ronin/exploits/verifiers.rb
Instance Method Summary collapse
-
#verify_arch! ⇒ true
Verifies that the selected target has an arch property.
-
#verify_os! ⇒ true
Verifies that the selected target has an os property.
-
#verify_product! ⇒ true
Verifies that the selected target has an product property.
-
#verify_restricted!(text) ⇒ true
Reviews text for restricted characters.
-
#verify_target! ⇒ true
Verifies that a target has been selected.
Instance Method Details
#verify_arch! ⇒ true
Verifies that the selected target has an arch property.
52 53 54 55 56 57 58 |
# File 'lib/ronin/exploits/verifiers.rb', line 52 def verify_arch! if arch.nil? raise(TargetDataMissing,"no suitable arch was provided",caller) end return true end |
#verify_os! ⇒ true
Verifies that the selected target has an os property.
70 71 72 73 74 75 76 |
# File 'lib/ronin/exploits/verifiers.rb', line 70 def verify_os! if os.nil? raise(TargetDataMissing,"no suitable os was provided",caller) end return true end |
#verify_product! ⇒ true
Verifies that the selected target has an product property.
88 89 90 91 92 93 94 |
# File 'lib/ronin/exploits/verifiers.rb', line 88 def verify_product! if product.nil? raise(TargetDataMissing,"no suitable product was provided",caller) end return true end |
#verify_restricted!(text) ⇒ true
Reviews text for restricted characters.
108 109 110 111 112 113 114 115 116 117 118 |
# File 'lib/ronin/exploits/verifiers.rb', line 108 def verify_restricted!(text) found = @restricted_chars.select { |char| text.include?(char) }.map { |char| char.dump } unless found.empty? raise(RestrictedChar,"restricted characters #{found.join(', ')} was detected in #{text.dump}",caller) end return true end |
#verify_target! ⇒ true
Verifies that a target has been selected.
34 35 36 37 38 39 40 |
# File 'lib/ronin/exploits/verifiers.rb', line 34 def verify_target! if target.nil? raise(TargetUnspecified,"no suitable target provided",caller) end return true end |