Sha256: d4cb82a39b29c90fd2ad939ebdec76d550fd98f7253a95cf460062166646f510
Contents?: true
Size: 798 Bytes
Versions: 9
Compression:
Stored size: 798 Bytes
Contents
# frozen_string_literal: true module Fushin module Models class Attachment < Model attr_reader :url def initialize(url) @url = url end def sha256 @sha256 ||= [].tap do |out| res = HybridAnalysis.quick_url_scan(url) out << res.dig("sha256") end.first end def title "HA: #{sha256}" end def ha_link "https://www.hybrid-analysis.com/sample/#{sha256}/" end def to_attachements [ { fallback: "HA link", title: title, title_link: ha_link, footer: "hybrid-analysis.com", footer_icon: "http://www.google.com/s2/favicons?domain=hybrid-analysis.com" } ] end end end end
Version data entries
9 entries across 9 versions & 1 rubygems