lib/wmap/geoip_tracker.rb
# Wrapper for the Ruby GeoIP ASN class - return data structure below on successful lookup 
# Struct.new(:number, :asn)
Wrapper for the Ruby GeoIP ASN class - return data structure below on successful lookup
Struct.new(:number, :asn)
Wrapper for the Ruby GeoIP ASN class - return data structure below on successful lookup Struct . new ( : number : asn )
def asn(object)	
		puts "Perform GeoIP ASN lookup on: #{object}" if @verbose
		begin
			object=object.strip
			raise "Unknown object format - only valid hostname or IP is accepted: #{object}" unless is_ip?(object) or is_fqdn?(object)
			GeoIP.new(Db_asn).asn(object)
		rescue Exception => ee
			puts "Exception on method asn: #{object}" if @verbose
			return nil
		end
	end
def asn ( object ) puts "Perform GeoIP ASN lookup on: #{object}" if @verbose begin object = object . strip raise "Unknown object format - only valid hostname or IP is accepted: #{object}" unless is_ip? ( object ) or is_fqdn? ( object ) GeoIP . new ( Db_asn ) . asn ( object ) rescue Exception => ee puts "Exception on method asn: #{object}" if @verbose return nil end end
Wrapper for the Ruby GeoIP ASN class - return data structure below on successful lookup
Struct.new(:number, :asn)
Wrapper for the Ruby GeoIP ASN class - return data structure below on successful lookup Struct . new ( : number : asn )
object
<not_specific>