Sha256: 8aed197a6111e97540d9dde0794a34daaeefe87900ef6f6cea59305a13bab0f6
Contents?: true
Size: 784 Bytes
Versions: 3
Compression:
Stored size: 784 Bytes
Contents
# filter to select findings for the list of sites # Usage: ruby filter_site.rb [file targets] [file finding keys] # Input A is a list of target sites, input B is a list of site index keys for the finding summary # Output is a list of key for the matching purpose require "wmap" @map=Hash.new def build_map (file) k=Wmap::SiteTracker.new f=File.open(file,'r') f.each do |line| url=line.chomp.strip.downcase if k.is_url?(url) @map[k.url_2_site(url)]=true else #puts url end end f.close k=nil end build_map(ARGV[0]) s=Wmap::SiteTracker.new f=File.open(ARGV[1],'r') f.each do |line| url=line.chomp.strip.downcase if s.is_url?(url) site=s.url_2_site(url) if @map.key?(site) puts "yes" else puts "no" end else puts "Invalid Internet URL" end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
wmap-2.4.6 | demos/filter_site.rb |
wmap-2.4.5 | demos/filter_site.rb |
wmap-2.4.4 | demos/filter_site.rb |