Module: Legitbot::MetaIpRanges

Included in:
Facebook, Meta
Defined in:
lib/legitbot/meta.rb

Overview

:nodoc:

Constant Summary collapse

AS =
'AS32934'

Instance Method Summary collapse

Instance Method Details

#fetch_ip_rangesObject



9
10
11
12
13
14
15
16
17
# File 'lib/legitbot/meta.rb', line 9

def fetch_ip_ranges
  client = Irrc::Client.new
  client.query :radb, AS, source: :radb
  results = client.perform

  %i[ipv4 ipv6].map do |family|
    results[AS][family][AS]
  end.flatten
end