homebrew-core/Formula/dnstwist.rb

133 lines
6.2 KiB
Ruby

class Dnstwist < Formula
include Language::Python::Virtualenv
desc "Test domains for typo squatting, phishing and corporate espionage"
homepage "https://github.com/elceef/dnstwist"
url "https://files.pythonhosted.org/packages/86/fa/e952c219fe85908f664f371b89d0dce9f513ca3f211327ebb19f7b894d70/dnstwist-20221213.tar.gz"
sha256 "beb18ec2c4f866f0715c1b361a1ad8e276bd9e73f15d9c41a078d5a39035dacd"
license "Apache-2.0"
bottle do
sha256 cellar: :any_skip_relocation, arm64_ventura: "d46d210b536e7ec7677061b763f348f24718e23386ef6ab2cc3e5ecf6ab0a4bc"
sha256 cellar: :any_skip_relocation, arm64_monterey: "6424b50c4da3e725acf38d60143b578001537660c64178a8d1002ba2e6a56fd4"
sha256 cellar: :any_skip_relocation, arm64_big_sur: "988596be35b8886f3c8ad89b754a272b72542e82cec26a3d67b1f28af91c4837"
sha256 cellar: :any_skip_relocation, ventura: "b2d7c151d5132e5c1e764f4abca507da2c1916151a8c58b712c76f195a645223"
sha256 cellar: :any_skip_relocation, monterey: "16d3f88caab085745124df362abd9d74381c8eb8ca4674859980c6dfcb300870"
sha256 cellar: :any_skip_relocation, big_sur: "5cd7cbf5f2a38940f6878ea86b8cc10df32c39d5ba804b9df4b1cdacc8f62f0f"
sha256 cellar: :any_skip_relocation, x86_64_linux: "26e51e902c65cd03b5d000dd759c15e8611ef11e812c2bd43abfe2018e5dedc7"
end
depends_on "geoip"
depends_on "python@3.11"
depends_on "ssdeep"
uses_from_macos "libffi"
resource "aiohttp" do
url "https://files.pythonhosted.org/packages/ff/4f/62d9859b7d4e6dc32feda67815c5f5ab4421e6909e48cbc970b6a40d60b7/aiohttp-3.8.3.tar.gz"
sha256 "3828fb41b7203176b82fe5d699e0d845435f2374750a44b480ea6b930f6be269"
end
resource "aiosignal" do
url "https://files.pythonhosted.org/packages/ae/67/0952ed97a9793b4958e5736f6d2b346b414a2cd63e82d05940032f45b32f/aiosignal-1.3.1.tar.gz"
sha256 "54cd96e15e1649b75d6c87526a6ff0b6c1b0dd3459f43d9ca11d48c339b68cfc"
end
resource "async-timeout" do
url "https://files.pythonhosted.org/packages/54/6e/9678f7b2993537452710ffb1750c62d2c26df438aa621ad5fa9d1507a43a/async-timeout-4.0.2.tar.gz"
sha256 "2163e1640ddb52b7a8c80d0a67a08587e5d245cc9c553a74a847056bc2976b15"
end
resource "attrs" do
url "https://files.pythonhosted.org/packages/1a/cb/c4ffeb41e7137b23755a45e1bfec9cbb76ecf51874c6f1d113984ecaa32c/attrs-22.1.0.tar.gz"
sha256 "29adc2665447e5191d0e7c568fde78b21f9672d344281d0c6e1ab085429b22b6"
end
resource "certifi" do
url "https://files.pythonhosted.org/packages/37/f7/2b1b0ec44fdc30a3d31dfebe52226be9ddc40cd6c0f34ffc8923ba423b69/certifi-2022.12.7.tar.gz"
sha256 "35824b4c3a97115964b408844d64aa14db1cc518f6562e8d7261699d1350a9e3"
end
resource "charset-normalizer" do
url "https://files.pythonhosted.org/packages/a1/34/44964211e5410b051e4b8d2869c470ae8a68ae274953b1c7de6d98bbcf94/charset-normalizer-2.1.1.tar.gz"
sha256 "5a3d016c7c547f69d6f81fb0db9449ce888b418b5b9952cc5e6e66843e9dd845"
end
resource "dnspython" do
url "https://files.pythonhosted.org/packages/99/fb/e7cd35bba24295ad41abfdff30f6b4c271fd6ac70d20132fa503c3e768e0/dnspython-2.2.1.tar.gz"
sha256 "0f7569a4a6ff151958b64304071d370daa3243d15941a7beedf0c9fe5105603e"
end
resource "frozenlist" do
url "https://files.pythonhosted.org/packages/e9/10/d629476346112b85c912527b9080944fd2c39a816c2225413dbc0bb6fcc0/frozenlist-1.3.3.tar.gz"
sha256 "58bcc55721e8a90b88332d6cd441261ebb22342e238296bb330968952fbb3a6a"
end
resource "geoip2" do
url "https://files.pythonhosted.org/packages/03/51/3fb1651db4bcb44d69a19b5e82e037f4de1b077974c7549adf8f3d42218b/geoip2-4.6.0.tar.gz"
sha256 "f0e80bce80b06bb38bd08bf4877d5a84e354e932095e6ccfb4d27bb598fa4f83"
end
resource "idna" do
url "https://files.pythonhosted.org/packages/8b/e1/43beb3d38dba6cb420cefa297822eac205a277ab43e5ba5d5c46faf96438/idna-3.4.tar.gz"
sha256 "814f528e8dead7d329833b91c5faa87d60bf71824cd12a7530b5526063d02cb4"
end
resource "maxminddb" do
url "https://files.pythonhosted.org/packages/64/56/fa6d67569af1038a253d2499a3d8cb0566228ff623527cda5ac570a2d165/maxminddb-2.2.0.tar.gz"
sha256 "e37707ec4fab115804670e0fb7aedb4b57075a8b6f80052bdc648d3c005184e5"
end
resource "multidict" do
url "https://files.pythonhosted.org/packages/b5/5b/1dd3b9cf73c474ea1d0f0b1f8b7b712b0f13817493fd93101256ec856b59/multidict-6.0.3.tar.gz"
sha256 "2523a29006c034687eccd3ee70093a697129a3ffe8732535d3b2df6a4ecc279d"
end
resource "ppdeep" do
url "https://files.pythonhosted.org/packages/64/ad/ca722788606970d227b1778c158d4a04ffd8190487fa80b3273e3fa587ac/ppdeep-20200505.tar.gz"
sha256 "acc74bb902e6d21b03d39aed740597093c6562185bfe06da9b5272e01c80a1ff"
end
resource "requests" do
url "https://files.pythonhosted.org/packages/a5/61/a867851fd5ab77277495a8709ddda0861b28163c4613b011bc00228cc724/requests-2.28.1.tar.gz"
sha256 "7c5599b102feddaa661c826c56ab4fee28bfd17f5abca1ebbe3e7f19d7c97983"
end
resource "tld" do
url "https://files.pythonhosted.org/packages/c1/39/68d5ecb596e02d235fc3b0914b1bf0840d8fbc155fa6ff194eee718469d9/tld-0.12.6.tar.gz"
sha256 "69fed19d26bb3f715366fb4af66fdeace896c55c052b00e8aaba3a7b63f3e7f0"
end
resource "urllib3" do
url "https://files.pythonhosted.org/packages/c2/51/32da03cf19d17d46cce5c731967bf58de9bd71db3a379932f53b094deda4/urllib3-1.26.13.tar.gz"
sha256 "c083dd0dce68dbfbe1129d5271cb90f9447dea7d52097c6e0126120c521ddea8"
end
resource "whois" do
url "https://files.pythonhosted.org/packages/9c/ac/949dad82306f47dadd5295ff8ddc14fe5ef4d3f209ab0636da2bbd965ddb/whois-0.9.18.tar.gz"
sha256 "6228a4f9617e9d06c4379ba8464181df64b0ac97dc07fc249c085745063ede91"
end
resource "yarl" do
url "https://files.pythonhosted.org/packages/c4/1e/1b204050c601d5cd82b45d5c8f439cb6f744a2ce0c0a6f83be0ddf0dc7b2/yarl-1.8.2.tar.gz"
sha256 "49d43402c6e3013ad0978602bf6bf5328535c48d192304b91b97a3c6790b1562"
end
def install
ENV.append "CPPFLAGS", "-I#{MacOS.sdk_path_if_needed}/usr/include/ffi"
venv = virtualenv_create(libexec, "python3.11")
venv.pip_install resources
(libexec/"bin").install "dnstwist.py" => "dnstwist"
(bin/"dnstwist").write_env_script libexec/"bin/dnstwist", PATH: "#{libexec}/bin:$PATH"
end
test do
output = shell_output("#{bin}/dnstwist -rsw brew.sh 2>&1")
assert_match "brew.sh", output
assert_match "NS:ns1.dnsimple.com", output
end
end