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.4.tar.gz"
|
|
sha256 "96092a8af7af27cdc1923cd5167dfca4a17e9f5fd866973b7b6eb6d3b479e13b"
|
|
|
|
bottle do
|
|
sha256 "62ed831240300adfc48f02eb00d06108374d8e3b3b6ceeae32a32fe7fd267095" => :mojave
|
|
sha256 "8971b9a64b607fe31b5022a3cd5a024e1ef94fc2f3a131bc6e7912038f91530d" => :high_sierra
|
|
sha256 "cf6c2c6d7fdde1ef7c699acd31ff25f7c9c82a01dcf9e4820bd54b64181c4b9c" => :sierra
|
|
end
|
|
|
|
depends_on "autoconf" => :build
|
|
depends_on "automake" => :build
|
|
depends_on "libtool" => :build
|
|
depends_on "pkg-config" => :build
|
|
depends_on "openssl"
|
|
depends_on "pcre"
|
|
depends_on "sqlite"
|
|
|
|
# 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}
|