35 lines
1.1 KiB
Ruby
35 lines
1.1 KiB
Ruby
class Badtouch < Formula
|
|
desc "Scriptable network authentication cracker"
|
|
homepage "https://github.com/kpcyrd/badtouch"
|
|
url "https://github.com/kpcyrd/badtouch/archive/v0.6.1.tar.gz"
|
|
sha256 "62181ac05a68a552e1984dd42206f6a5ca195e51addc48cbfdf55a60afc7c3ae"
|
|
|
|
bottle do
|
|
sha256 "4965a902bbe8a22452039b145d5937f785fdac750674dc3c44ada3ca822c4aa4" => :high_sierra
|
|
sha256 "0d24c83275c2988cb09befda551377ee9b803fffdfca094bb4649dbdc2624899" => :sierra
|
|
sha256 "f579fb45cbfd1ee3908f5afd25c91c017d68ab380a8d2d36dc125fcd5031b293" => :el_capitan
|
|
end
|
|
|
|
depends_on "rust" => :build
|
|
depends_on "openssl"
|
|
|
|
def install
|
|
# Prevent cargo from linking against a different library
|
|
ENV["OPENSSL_INCLUDE_DIR"] = Formula["openssl"].opt_include
|
|
ENV["OPENSSL_LIB_DIR"] = Formula["openssl"].opt_lib
|
|
|
|
system "cargo", "install", "--root", prefix
|
|
man1.install "docs/badtouch.1"
|
|
end
|
|
|
|
test do
|
|
(testpath/"true.lua").write <<~EOS
|
|
descr = "always true"
|
|
|
|
function verify(user, password)
|
|
return true
|
|
end
|
|
EOS
|
|
system "#{bin}/badtouch", "oneshot", "-vvx", testpath/"true.lua", "foo"
|
|
end
|
|
end
|