homebrew-core/Formula/aircrack-ng.rb
2018-12-10 17:59:04 +01:00

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.5.2.tar.gz"
sha256 "9e592fe7658046220e0ac0a6d05c4026903f3077b248893e0056ccbe4ee88241"
bottle do
sha256 "6aaae61586ea0f80f466e1eaa3740ff64cb5a68d457ee248c6561339778246bf" => :mojave
sha256 "795dfb0d851b602176fa1a68383afee62f6860fdbd868b515cbf7cf4fe010b7c" => :high_sierra
sha256 "e8302d2bb87a615d341dc907cf4a8e8f87f9fd560a28246a5b4a37230abe9d7b" => :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}