homebrew-core/Formula/hydra.rb
2019-09-09 09:38:35 +02:00

43 lines
1.6 KiB
Ruby

class Hydra < Formula
desc "Network logon cracker which supports many services"
homepage "https://github.com/vanhauser-thc/thc-hydra"
url "https://github.com/vanhauser-thc/thc-hydra/archive/v9.0.tar.gz"
sha256 "56672e253c128abaa6fb19e77f6f59ba6a93762a9ba435505a009ef6d58e8d0e"
revision 1
head "https://github.com/vanhauser-thc/thc-hydra.git"
bottle do
cellar :any
sha256 "d32c31d03f85bb4322958d87f03b00ffd7e00e28267ed024aed077251f5cc87d" => :mojave
sha256 "2a385cbc51aed18dbe041893ebd019501143dab7c8a9afaed32b8690cdcee9b2" => :high_sierra
sha256 "56765a66963c8867d3e47998eaa97db2d1558b24475e4779b3f5f3f7e9eb6f4c" => :sierra
end
depends_on "pkg-config" => :build
depends_on "libssh"
depends_on "mysql-client"
depends_on "openssl@1.1"
def install
inreplace "configure" do |s|
# Link against our OpenSSL
# https://github.com/vanhauser-thc/thc-hydra/issues/80
s.gsub! "/opt/local/lib", Formula["openssl@1.1"].opt_lib
s.gsub! "/opt/local/*ssl", Formula["openssl@1.1"].opt_lib
s.gsub! "/opt/*ssl/include", Formula["openssl@1.1"].opt_include
# Avoid opportunistic linking of subversion
s.gsub! "libsvn", "oh_no_you_dont"
end
# Having our gcc in the PATH first can cause issues. Monitor this.
# https://github.com/vanhauser-thc/thc-hydra/issues/22
system "./configure", "--prefix=#{prefix}"
bin.mkpath
system "make", "all", "install"
share.install prefix/"man" # Put man pages in correct place
end
test do
assert_match version.to_s, shell_output("#{bin}/hydra", 255)
end
end