forked from necromant2005/homebrew-boneyard
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cowpatty.rb
31 lines (27 loc) · 925 Bytes
/
cowpatty.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
class Cowpatty < Formula
desc "Offline dictionary attack for WPA-PSK, WPA2-PSK networks"
homepage "http://www.willhackforsushi.com/?page_id=50"
url "http://www.willhackforsushi.com/code/cowpatty/4.6/cowpatty-4.6.tgz"
sha256 "cd3fc113e5052d3ee08ab71aa87edf772d044f760670c73fde5d5581d7803bc2"
depends_on "openssl"
resource "capture" do
url "http://www.lovemytool.com/files/test.pcap"
sha256 "35fba0f92c5e8fb0710453d0c2c5fe5e9c64857dd53b219977871340b22c4942"
end
def install
# May fail on parallel builds with a race condition, see #45150
ENV.deparallelize
system "make", "BINDIR=#{bin}", "install"
end
test do
(testpath/"dict").write <<-EOS.undent
isthisthepassword?
maybethisoneinstead
subnet16121930
EOS
resource("capture").stage do
system bin/"cowpatty", "-r", "test.pcap",
"-f", testpath/"dict", "-s", "dd-wrt2"
end
end
end