默认mac系统是不带aircrack-ng的,首先我们需要安装 homebrew,M1芯片如何安装可以在搜索 安装homebrew具体查看,安装之后,使用命令(当然你也可以使用Xcode,但是相对于brew,还是后者更加简洁实用。):
brew install --build-from-source aircrack-ng
这样等安装完成就可以了。
但是!如果是M1芯片 则需要额外配置:
1、先找到rb文件
find /opt/homebrew -name aircrack-ng.rb /opt/homebrew/Library/Taps/homebrew/homebrew-core/Formula/aircrack-ng.rb
2、找到rb文件的位置之后,用下面代码替换aircrack-ng.rb
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.6.tar.gz" sha256 "4f0bfd486efc6ea7229f7fbc54340ff8b2094a0d73e9f617e0a39f878999a247" license all_of: ["GPL-2.0-or-later", "BSD-3-Clause", "OpenSSL"] livecheck do url :homepage regex(/href=.*?aircrack-ng[._-]v?(\d+(?:\.\d+)+)\.t/i) end bottle do sha256 big_sur: "8a131a99a89edd127981b9dc2c91df91ba7a03b7c0d6c74521392e1649fa7d09" sha256 catalina: "1b5ecf42ef840c108536eac5107cf63c514ca2f3d7e8c4f32e5b301f088729c1" sha256 mojave: "e6bbba9c16ac26aaacaad5ac4935100a79cf702ab8fcb35fa9797e806ec003fe" sha256 high_sierra: "fad333ea8e2792d88305c22b62549f63900ea32aa3f856de57d6e8d70740cd49" end depends_on "autoconf" => :build depends_on "automake" => :build depends_on "libtool" => :build depends_on "pkg-config" => :build depends_on "openssl@1.1" 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" # On MacOS X, some of the c++ header files #include <version> and the makefile has -I. causing problems on_macos do mv "version", "version.txt" end 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} diff --git a/include/aircrack-ng/ce-wpa/pseudo_intrinsics.h b/include/aircrack-ng/ce-wpa/pseudo_intrinsics.h index adb5d23..4a08d17 100644 --- a/include/aircrack-ng/ce-wpa/pseudo_intrinsics.h +++ b/include/aircrack-ng/ce-wpa/pseudo_intrinsics.h @@ -94,13 +94,13 @@ typedef uint64x2_t vtype64; #define vor vorrq_u32 #define vorn vornq_u32 #define vroti_epi32(x, i) \ -(i > 0 ? vsliq_n_u32(vshrq_n_u32(x, 32 - (i)), x, i) \ - : vsriq_n_u32(vshlq_n_u32(x, 32 + (i)), x, -(i))) +(i > 0 ? (vtype)vsliq_n_u32(vshrq_n_u32((x), 32 - ((i) & 31)), (x), (i) & 31) \ + : (vtype)vsriq_n_u32(vshlq_n_u32((x), (32 + (i)) & 31), (x), (-(i)) & 31)) #define vroti_epi64(x, i) \ (i > 0 ? (vtype) vsliq_n_u64( \ - vshrq_n_u64((vtype64)(x), 64 - (i)), (vtype64)(x), i) \ + vshrq_n_u64((vtype64)(x), 64 - ((i) & 63), (vtype64)(x), (i) & 63)) \ : (vtype) vsriq_n_u64( \ - vshlq_n_u64((vtype64)(x), 64 + (i)), (vtype64)(x), -(i))) + vshlq_n_u64((vtype64)(x), (64 + (i)) & 63), (vtype64)(x), (-(i)) & 63)) #define vroti16_epi32 vroti_epi32 #define vset1_epi32(x) vdupq_n_u32(x) #define vset1_epi64(x) (vtype) vdupq_n_u64(x)
然后再执行开始的的安装命令就可以了。
这个代码可能会有更新,最新版地址:
https://github.com/areese/homebrew-core/tree/5f0518be9014b25ac963593cb5c2d6da68cacafb/Formula
上述云端有M1的整体修改文件,用到其他的也可以更改。
最新回复 (0)