Sha256: 9551c01ab0d8c3ad318d29af9a3b81dfeff1029a5ee1363f2ca30ca59548438b

Contents?: true

Size: 621 Bytes

Versions: 3

Compression:

Stored size: 621 Bytes

Contents

# Input file is a list of hosts or domains, output is a list of unknown hosts / domains
# Usage: ruby filter_domain_x.rb [file_host]
require	"wmap"

puts Wmap.banner
puts "Host,Domain,IP,Trusted CIDR,Trusted CIDR Netname"
myD = Wmap::DomainTracker.new
f_urls = File.open(ARGV[0], 'r')
f_urls.each do |line|
	url=line.chomp
	host=myD.url_2_host(url)
	next if host.nil?
	domain=myD.domain_root(host)
	next if domain.nil?
	if myD.domain_known?(domain)
		#puts url
		next
	else
		#next
		tracker=Wmap.track(host)
		puts "#{host}, #{domain}, #{tracker['ip']}, #{tracker['cidr']}, #{tracker['netname']}"
	end
end

f_urls.close

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
wmap-2.4.6 demos/filter_domain.rb
wmap-2.4.5 demos/filter_domain.rb
wmap-2.4.4 demos/filter_domain.rb