lib/wmap/host_tracker.rb
# Extract a list of sub-domains from the local host repository @known_hosts
Extract a list of sub-domains from the local host repository @known_hosts
Extract a list of sub - domains from the local host repository @known_hosts
def dump_sub_domains
		puts "Dump out all active sub domains from the local hosts." if @verbose
		subs=Array.new
		@known_hosts.keys.each do |hostname|
			next if is_ip?(hostname)
			hostname = hostname.strip
			sub = get_subdomain(hostname)
			subs.push(sub) unless sub.nil?
		end
		subs.uniq!.sort! unless subs.empty?
		puts "Found sub domains: #{subs}" if @verbose
		return subs
	rescue Exception => ee
		puts "Exception on method #{__method__}: #{ee}"
		return subs
	end
def dump_sub_domains puts "Dump out all active sub domains from the local hosts." if @verbose subs = Array . new @known_hosts . keys . each do | hostname | next if is_ip? ( hostname ) hostname = hostname . strip sub = get_subdomain ( hostname ) subs . push ( sub ) unless sub . nil? end subs . uniq! . sort! unless subs . empty? puts "Found sub domains: #{subs}" if @verbose return subs rescue Exception => ee puts "Exception on method #{__method__}: #{ee}" return subs end
Extract a list of sub-domains from the local host repository @known_hosts
Extract a list of sub - domains from the local host repository @known_hosts