Sha256: 9a9f5a96d4f7fce5d4060df38e0d147f928b95cda28c3f7eee26ccd24eeb4d77

Contents?: true

Size: 1.68 KB

Versions: 4

Compression:

Stored size: 1.68 KB

Contents

=begin
    Copyright 2010-2012 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

4 entries across 4 versions & 1 rubygems

Version Path
arachni-0.4.1.3 plugins/defaults/resolver.rb
arachni-0.4.1.2 plugins/defaults/resolver.rb
arachni-0.4.1.1 plugins/defaults/resolver.rb
arachni-0.4.1 plugins/defaults/resolver.rb