Saluton!

* Brian Candler; 2003-07-01, 16:12 UTC:
>     if ip_match("1.2.3.4", "1.2.3.0/24")
>       ... etc
>     end

Found solution in Ruby 1.8 pre 3:

require 'ipaddr'

def ip_match(ip, net)
  IPAddr.new(net).include?(IPAddr.new(ip))
end

Cannot test it - ipaddr.rb requires IPv6 support which is not
available here.

Gis,

Josef 'Jupp' Schugt
-- 
Someone even submitted a fingerprint for Debian Linux running on the
Microsoft Xbox. You have to love that irony :).
                               -- Fyodor on nmap-hackers / insecure.org