Parent

Methods

Wordlist::Builders::Website

Attributes

host[RW]

Host to spider

Public Class Methods

new(path,host,&block) click to toggle source

Creates a new Website builder object with the specified path and host. If a block is given, it will be passed the new created Website builder object.

# File lib/wordlist/builders/website.rb, line 17
      def initialize(path,host,&block)
        @host = host

        super(path,&block)
      end

Public Instance Methods

build!(&block) click to toggle source

Builds the word-list file by spidering the host and parsing the inner-text from all HTML pages. If a block is given, it will be called before all HTML pages on the host have been parsed.

# File lib/wordlist/builders/website.rb, line 28
      def build!(&block)
        super(&block)

        Spidr.host(@host) do |spidr|
          spidr.every_page do |page|
            if page.html?
              page.doc.search('//h1|//h2|//h3|//h4|//h5|//p|//span').each do |element|
                parse(element.inner_text)
              end
            end
          end
        end
      end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.