2010-01-14 20:51:40 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class AircrackNg < Formula
|
2010-01-14 20:51:40 +00:00
|
|
|
homepage 'http://aircrack-ng.org/'
|
2012-06-11 15:50:28 +00:00
|
|
|
url 'http://download.aircrack-ng.org/aircrack-ng-1.1.tar.gz'
|
2012-06-17 21:27:39 +00:00
|
|
|
sha1 '16eed1a8cf06eb8274ae382150b56589b23adf77'
|
2012-06-11 15:50:28 +00:00
|
|
|
|
|
|
|
# Remove root requirement from OUI update script. See:
|
|
|
|
# https://github.com/mxcl/homebrew/pull/12755
|
|
|
|
def patches
|
|
|
|
DATA
|
|
|
|
end
|
2010-04-07 05:58:35 +00:00
|
|
|
|
2010-01-14 20:51:40 +00:00
|
|
|
def install
|
|
|
|
# Force i386, otherwise you get errors:
|
|
|
|
# sha1-sse2.S:190:32-bit absolute addressing is not supported for x86-64
|
|
|
|
# sha1-sse2.S:190:cannot do signed 4 byte relocation
|
|
|
|
%w{ CFLAGS CXXFLAGS LDFLAGS OBJCFLAGS OBJCXXFLAGS }.each do |compiler_flag|
|
|
|
|
ENV.remove compiler_flag, "-arch x86_64"
|
|
|
|
ENV.append compiler_flag, "-arch i386"
|
|
|
|
end
|
2010-04-07 05:58:35 +00:00
|
|
|
|
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}
|
|
|
|
|