Sha256: 86b1782c3b3690927f54d6dc5c6c8900c7ef2275ba7d030dd932b8dca0caf94f

Contents?: true

Size: 850 Bytes

Versions: 19

Compression:

Stored size: 850 Bytes

Contents

module CMSScan
  module Controller
    # Example Controller
    class Example < CMSScanner::Controller::Core
      # @return [ Array<OptParseValidator::Opt> ]
      def cli_options
        [
          OptString.new(['--dummy VALUE', 'Dummy CLI Option'])
        ]
      end

      def before_scan
        # Anything to do before ?
      end

      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

      # Alternative way of doing it
      def run2
        @is_present = Browser.get(target.homepage_url).body =~ /scan/ ? true : false

        output('scan_word')
      end

      def after_scan
        # Anything after ?
      end
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
cms_scanner-0.0.40 example/app/controllers/example.rb
cms_scanner-0.0.39.4 example/app/controllers/example.rb
cms_scanner-0.0.39.3 example/app/controllers/example.rb
cms_scanner-0.0.39.2 example/app/controllers/example.rb
cms_scanner-0.0.39.1 example/app/controllers/example.rb
cms_scanner-0.0.39.0 example/app/controllers/example.rb
cms_scanner-0.0.38.4 example/app/controllers/example.rb
cms_scanner-0.0.38.3 example/app/controllers/example.rb
cms_scanner-0.0.38.2 example/app/controllers/example.rb
cms_scanner-0.0.38.1 example/app/controllers/example.rb
cms_scanner-0.0.38.0 example/app/controllers/example.rb
cms_scanner-0.0.37.12 example/app/controllers/example.rb
cms_scanner-0.0.37.11 example/app/controllers/example.rb
cms_scanner-0.0.37.10 example/app/controllers/example.rb
cms_scanner-0.0.37.9 example/app/controllers/example.rb
cms_scanner-0.0.37.8 example/app/controllers/example.rb
cms_scanner-0.0.37.7 example/app/controllers/example.rb
cms_scanner-0.0.37.6 example/app/controllers/example.rb
cms_scanner-0.0.37.5 example/app/controllers/example.rb