2014-10-16 04:52:19 +00:00
|
|
|
require "formula"
|
2010-01-14 20:51:40 +00:00
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class AircrackNg < Formula
|
2014-10-16 04:52:19 +00:00
|
|
|
homepage "http://aircrack-ng.org/"
|
|
|
|
# We can't update this due to linux-only dependencies in >1.1.
|
|
|
|
# See https://github.com/Homebrew/homebrew/issues/29450
|
|
|
|
url "http://download.aircrack-ng.org/aircrack-ng-1.1.tar.gz"
|
|
|
|
sha1 "16eed1a8cf06eb8274ae382150b56589b23adf77"
|
|
|
|
revision 1
|
|
|
|
|
|
|
|
depends_on "pkg-config" => :build
|
|
|
|
depends_on "sqlite"
|
|
|
|
depends_on "openssl"
|
2012-06-11 15:50:28 +00:00
|
|
|
|
|
|
|
# Remove root requirement from OUI update script. See:
|
2013-12-14 18:13:11 +00:00
|
|
|
# https://github.com/Homebrew/homebrew/pull/12755
|
2014-03-18 03:44:47 +00:00
|
|
|
patch :DATA
|
2010-04-07 05:58:35 +00:00
|
|
|
|
2010-01-14 20:51:40 +00:00
|
|
|
def install
|
2010-12-20 18:04:50 +00:00
|
|
|
# Fix incorrect OUI url
|
|
|
|
inreplace "scripts/airodump-ng-oui-update",
|
|
|
|
"http://standards.ieee.org/regauth/oui/oui.txt",
|
|
|
|
"http://standards.ieee.org/develop/regauth/oui/oui.txt"
|
|
|
|
|
2012-03-15 00:40:02 +00:00
|
|
|
system "make", "CC=#{ENV.cc}"
|
2010-01-14 20:51:40 +00:00
|
|
|
system "make", "prefix=#{prefix}", "mandir=#{man1}", "install"
|
|
|
|
end
|
2010-05-10 15:14:59 +00:00
|
|
|
|
2010-04-07 05:58:35 +00:00
|
|
|
def caveats; <<-EOS.undent
|
2012-06-11 15:50:28 +00:00
|
|
|
Run `airodump-ng-oui-update` install or update the Airodump-ng OUI file.
|
2010-05-10 15:14:59 +00:00
|
|
|
EOS
|
|
|
|
end
|
2010-01-14 20:51:40 +00:00
|
|
|
end
|
2012-06-11 15:50:28 +00:00
|
|
|
|
|
|
|
__END__
|
|
|
|
--- a/scripts/airodump-ng-oui-update
|
|
|
|
+++ b/scripts/airodump-ng-oui-update
|
|
|
|
@@ -7,25 +7,6 @@
|
|
|
|
OUI_PATH="/usr/local/etc/aircrack-ng"
|
|
|
|
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$UID != "x" ]
|
|
|
|
-then
|
|
|
|
- USERID=$UID
|
|
|
|
-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}
|
|
|
|
|