badtouch 0.6.1 (new formula)

Closes #30723.

Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
This commit is contained in:
kpcyrd 2018-08-02 22:05:29 +01:00 committed by Dominyk Tiller
parent ea674b077b
commit 7ddff49f9f
No known key found for this signature in database
GPG key ID: FE19AEFCF658C6F6

29
Formula/badtouch.rb Normal file
View file

@ -0,0 +1,29 @@
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"
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