Class: CMSScan::Controller::Example
- Inherits:
-
CMSScanner::Controller::Core
- Object
- CMSScanner::Controller::Core
- CMSScan::Controller::Example
- Defined in:
- app/controllers/example.rb
Overview
Example Controller
Instance Method Summary collapse
- #after_scan ⇒ Object
- #before_scan ⇒ Object
- #cli_options ⇒ Array<OptParseValidator::Opt>
- #run ⇒ Object
-
#run2 ⇒ Object
Alternative way of doing it.
Instance Method Details
#after_scan ⇒ Object
33 34 35 |
# File 'app/controllers/example.rb', line 33 def after_scan # Anything after ? end |
#before_scan ⇒ Object
14 15 16 |
# File 'app/controllers/example.rb', line 14 def before_scan # Anything to do before ? end |
#cli_options ⇒ Array<OptParseValidator::Opt>
8 9 10 11 12 |
# File 'app/controllers/example.rb', line 8 def [ OptString.new(['--dummy VALUE', 'Dummy CLI Option']) ] end |
#run ⇒ Object
18 19 20 21 22 23 24 |
# File 'app/controllers/example.rb', line 18 def run # Let's check and display whether or not the word 'scan' is present in the homepage of the target is_present = target.homepage_res.body =~ /scan/ ? true : false output('scan_word', is_present: is_present) end |
#run2 ⇒ Object
Alternative way of doing it
27 28 29 30 31 |
# File 'app/controllers/example.rb', line 27 def run2 @is_present = Browser.get(target.homepage_url).body =~ /scan/ ? true : false output('scan_word') end |