forked from Homebrew/homebrew-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbadtouch.rb
36 lines (30 loc) · 1.16 KB
/
badtouch.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
class Badtouch < Formula
desc "Scriptable network authentication cracker"
homepage "https://github.com/kpcyrd/badtouch"
url "https://github.com/kpcyrd/badtouch/archive/v0.7.0.tar.gz"
sha256 "d49eb11825ab56245f82f0958a89ea69edf558c1bd142afba2d4408dc9d20fbb"
bottle do
cellar :any_skip_relocation
sha256 "4eecd98779c60f00a1060813bc2bbd66f3f223ad369ab463750df9f6a4bd0c8e" => :mojave
sha256 "02c3fe748b8b48754827a468b8fc9825c614a1e2a6585818612ce9d8e3ab39c3" => :high_sierra
sha256 "100a8b53f7e2f540ab447382ca44b6f4368a189a2ad069caa71c555ca464c04e" => :sierra
end
depends_on "rust" => :build
depends_on "openssl"
def install
# Ensure that the `openssl` crate picks up the intended library.
# https://crates.io/crates/openssl#manual-configuration
ENV["OPENSSL_DIR"] = Formula["openssl"].opt_prefix
system "cargo", "install", "--root", prefix, "--path", "."
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