Introducing the fast_port_scanner gem

require 'fast_port_scanner'

a = FastPortScanner.scan
#=> [22, 25, 111]

Resources