Sha256: 08fb019c51f9b19443934753cedc4bfd59fe9c2e76b97cb8b9a752f47f0b9d45
Contents?: true
Size: 409 Bytes
Versions: 30
Compression:
Stored size: 409 Bytes
Contents
# frozen_string_literal: true module Mihari class CPE < ActiveRecord::Base belongs_to :artifact class << self # # Build CPEs # # @param [String] ip # # @return [Array<Mihari::CPE>] # def build_by_ip(ip) res = Enrichers::Shodan.query(ip) return [] if res.nil? res.cpes.map { |cpe| new(cpe: cpe) } end end end end
Version data entries
30 entries across 30 versions & 1 rubygems