lib/wmap/cidr_tracker.rb
# Main worker method to retrieve known network information for a host / ip
Main worker method to retrieve known network information for a host / ip
Main worker method to retrieve known network information for a host / ip
def cidr_worker (host)
		puts "Starting tracking of known CIDR information for host: #{host}" if @verbose
		host=host.strip.downcase
		ip=host_2_ip(host)
		cidr=cidr_lookup(ip)
		ref=get_cidr_ref(cidr)
		netname=get_cidr_netname(cidr)
		tracker=Hash.new
		tracker['host']=host
		tracker['ip']=ip
		tracker['cidr']=cidr
		tracker['ref']=ref
		tracker['netname']=netname
		return tracker
	rescue => ee
		puts "Exception on method #{__method__} for host #{host}: #{ee}" 
		return nil
	end
def cidr_worker ( host ) puts "Starting tracking of known CIDR information for host: #{host}" if @verbose host = host . strip . downcase ip = host_2_ip ( host ) cidr = cidr_lookup ( ip ) ref = get_cidr_ref ( cidr ) netname = get_cidr_netname ( cidr ) tracker = Hash . new tracker [ 'host' ] = host tracker [ 'ip' ] = ip tracker [ 'cidr' ] = cidr tracker [ 'ref' ] = ref tracker [ 'netname' ] = netname return tracker rescue => ee puts "Exception on method #{__method__} for host #{host}: #{ee}" return nil end
Main worker method to retrieve known network information for a host / ip
Main worker method to retrieve known network information for a host / ip
# save the data # if @verbose
host
<not_specific>