71 lines
1.8 KiB
Ruby
71 lines
1.8 KiB
Ruby
class AircrackNg < Formula
|
|
desc "Next-generation aircrack with lots of new features"
|
|
homepage "https://aircrack-ng.org/"
|
|
url "https://download.aircrack-ng.org/aircrack-ng-1.3.tar.gz"
|
|
sha256 "8ae08a7c28741f6ace2769267112053366550e7f746477081188ad38410383ca"
|
|
|
|
bottle do
|
|
sha256 "64d5f8a6fd5613bafe78e3164810e9945683bcafab0dae5b6f03ef55d5727e4f" => :high_sierra
|
|
sha256 "3e82549857d088ce8fff9fd9785f86bb4f46ee1bebfad0ccc5c2c95bbdf97d23" => :sierra
|
|
sha256 "235df2c791c923907ee5ce8cc3304c1599407cfc390f0e18afef2bd761a4beca" => :el_capitan
|
|
end
|
|
|
|
depends_on "autoconf" => :build
|
|
depends_on "automake" => :build
|
|
depends_on "libtool" => :build
|
|
depends_on "pkg-config" => :build
|
|
depends_on "sqlite"
|
|
depends_on "openssl"
|
|
depends_on "pcre"
|
|
|
|
# Remove root requirement from OUI update script. See:
|
|
# https://github.com/Homebrew/homebrew/pull/12755
|
|
patch :DATA
|
|
|
|
def install
|
|
system "./autogen.sh", "--disable-silent-rules",
|
|
"--disable-dependency-tracking",
|
|
"--prefix=#{prefix}",
|
|
"--with-experimental"
|
|
system "make", "install"
|
|
end
|
|
|
|
def caveats; <<~EOS
|
|
Run `airodump-ng-oui-update` install or update the Airodump-ng OUI file.
|
|
EOS
|
|
end
|
|
|
|
test do
|
|
system "#{bin}/aircrack-ng", "--help"
|
|
end
|
|
end
|
|
|
|
__END__
|
|
--- a/scripts/airodump-ng-oui-update
|
|
+++ b/scripts/airodump-ng-oui-update
|
|
@@ -20,25 +20,6 @@ fi
|
|
|
|
AIRODUMP_NG_OUI="${OUI_PATH}/airodump-ng-oui.txt"
|
|
OUI_IEEE="${OUI_PATH}/oui.txt"
|
|
-USERID=""
|
|
-
|
|
-
|
|
-# Make sure the user is root
|
|
-if [ x"`which id 2> /dev/null`" != "x" ]
|
|
-then
|
|
- USERID="`id -u 2> /dev/null`"
|
|
-fi
|
|
-
|
|
-if [ x$USERID = "x" -a x$(id -ru) != "x" ]
|
|
-then
|
|
- USERID=$(id -ru)
|
|
-fi
|
|
-
|
|
-if [ x$USERID != "x" -a x$USERID != "x0" ]
|
|
-then
|
|
- echo Run it as root ; exit ;
|
|
-fi
|
|
-
|
|
|
|
if [ ! -d "${OUI_PATH}" ]; then
|
|
mkdir -p ${OUI_PATH}
|