Sha256: 29f203e79cf76667825f21868f5b0b92077ded83c701e1f699afa4db0fb2d63d

Contents?: true

Size: 1.68 KB

Versions: 8

Compression:

Stored size: 1.68 KB

Contents

=begin
    Copyright 2010-2013 Tasos Laskos <tasos.laskos@gmail.com>

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

        http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
=end

#
# @author Tasos "Zapotek" Laskos<tasos.laskos@gmail.com>
#
# @version 0.1.1
#
class Arachni::Plugins::Resolver < Arachni::Plugin::Base

    def prepare
        wait_while_framework_running
    end

    def run
        print_status 'Resolving hostnames...'

        host_to_ipaddress = {}
        framework.auditstore.issues.each_with_index do |issue|
            uri = uri_parse( issue.url.dup )
            next if !uri

            host = uri.host

            begin
                host_to_ipaddress[host] ||= ::IPSocket.getaddress( host )
            rescue
                print_bad "Could not resolve #{host}."
                next
            end
        end

        print_status 'Done!'
        register_results( host_to_ipaddress )
    end

    def self.info
        {
            name:        'Resolver',
            description: %q{Resolves vulnerable hostnames to IP addresses.},
            author:      'Tasos "Zapotek" Laskos <tasos.laskos@gmail.com>',
            tags:        [ 'ip address', 'hostname' ],
            version:     '0.1.1'
        }
    end

end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
arachni-0.4.5.2 plugins/defaults/resolver.rb
arachni-0.4.5.1 plugins/defaults/resolver.rb
arachni-0.4.5 plugins/defaults/resolver.rb
arachni-0.4.4 plugins/defaults/resolver.rb
arachni-0.4.3.2 plugins/defaults/resolver.rb
arachni-0.4.3.1 plugins/defaults/resolver.rb
arachni-0.4.3 plugins/defaults/resolver.rb
arachni-0.4.2 plugins/defaults/resolver.rb