lib/wmap/site_tracker.rb
# Retrieve and print specific information of a site in the site store
Retrieve and print specific information of a site in the site store
Retrieve and print specific information of a site in the site store
def print_site(site)
		puts "Site Information Report for: #{site}" if @verbose
		site=site.strip unless site.nil?
		raise "Unknown site: #{site}" unless @known_sites.key?(site)
		ip=@known_sites[site]['ip']
		port=@known_sites[site]['port']
		status=@known_sites[site]['status']
		server=@known_sites[site]['server']
		fp=@known_sites[site]['md5']
		loc=@known_sites[site]['redirection']
		res=@known_sites[site]['code']
		timestamp=@known_sites[site]['timestamp']
		puts "#{site},#{ip},#{port},#{status},#{server},#{res},#{fp},#{loc},#{timestamp}"
	rescue => ee
		puts "Exception on method #{__method__} for #{site}: #{ee}"
	end
def print_site ( site ) puts "Site Information Report for: #{site}" if @verbose site = site . strip unless site . nil? raise "Unknown site: #{site}" unless @known_sites . key? ( site ) ip = @known_sites [ site ] [ 'ip' ] port = @known_sites [ site ] [ 'port' ] status = @known_sites [ site ] [ 'status' ] server = @known_sites [ site ] [ 'server' ] fp = @known_sites [ site ] [ 'md5' ] loc = @known_sites [ site ] [ 'redirection' ] res = @known_sites [ site ] [ 'code' ] timestamp = @known_sites [ site ] [ 'timestamp' ] puts "#{site},#{ip},#{port},#{status},#{server},#{res},#{fp},#{loc},#{timestamp}" rescue => ee puts "Exception on method #{__method__} for #{site}: #{ee}" end
Retrieve and print specific information of a site in the site store
Retrieve and print specific information of a site in the site store
site
<not_specific>