-
Notifications
You must be signed in to change notification settings - Fork 389
/
Copy pathaircrack_ng.rb
72 lines (66 loc) · 2.69 KB
/
aircrack_ng.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
require 'package'
class Aircrack_ng < Package
description 'Key cracker for the 802.11 WEP and WPA-PSK protocols.'
homepage 'https://www.aircrack-ng.org'
version '1.6-17f9'
license 'GPL-2'
compatibility 'all'
source_url 'https://github.com/aircrack-ng/aircrack-ng/archive/17f971cebdaeea0c86e338bde09a52787fcd6d9c.zip'
source_sha256 'd6dc9078f2ab56671f8fb707aa5ddbbec36d1a732cc7ad9a3d2803a5dbbaae5b'
binary_compression 'tar.xz'
binary_sha256({
aarch64: '5e48972faf181388c35a818ecfd5057b384752e82aab190376acbf838be7ee88',
armv7l: '5e48972faf181388c35a818ecfd5057b384752e82aab190376acbf838be7ee88',
i686: 'e3a7f24e822efc47f0402993ca482c5e4eae75cb49e6912eda44dcc52bbc2e81',
x86_64: '5c7cfe8e71c1dc3f5634027855ebee88d458a08f44bca3ed0a01388f0524524c'
})
depends_on 'libnl3'
depends_on 'libpcap'
depends_on 'rfkill'
def self.build
system 'NOCONFIGURE=1 ./autogen.sh'
# system "./configure --help"
# Could also add more specific optimization options:
# --with-static-simd[=x86-sse2|x86-avx|x86-avx2|x86-avx512|ppc-altivec|ppc-power8|arm-neon|arm-asimd],
# use specific SIMD implementation at static link, [default=none]
# --with-avx512[=yes|no] use AVX-512F instruction set, [default=no]
system "env CFLAGS='-flto=auto' CXXFLAGS='-flto=auto' \
LDFLAGS='-flto=auto' \
./configure \
#{CREW_CONFIGURE_OPTIONS} \
--program-prefix='' --program-suffix='' \
--with-lto \
--with-experimental=yes \
--with-openssl=#{CREW_PREFIX} \
sbindir=#{CREW_PREFIX}/sbin \
mandir=#{CREW_PREFIX}/share/man/man1 \
smandir=#{CREW_PREFIX}/share/man/man8"
system 'make'
end
def self.install
system 'make', "DESTDIR=#{CREW_DEST_DIR}",
'install'
# Fix for [*] Run 'airodump-ng-oui-update' as root (or with sudo) to install or update Airodump-ng OUI file (Internet connection required).
#
# Before fix:
# $ sudo airodump-ng-oui-update
# mkdir: cannot create directory '/etc/aircrack-ng': Read-only file system
# [*] Downloading IEEE OUI file...
# [*] Error: Failed to download OUI list, aborting...
#
# After fix:
# $ sudo airodump-ng-oui-update
# [*] Downloading IEEE OUI file...
# [*] Parsing OUI file...
# [*] Airodump-ng OUI file successfully updated
system "sed -i 's,/usr/local,,' #{CREW_DEST_PREFIX}/sbin/airodump-ng-oui-update"
system "sed -i 's,/etc,#{CREW_PREFIX}/etc,g' #{CREW_DEST_PREFIX}/sbin/airodump-ng-oui-update"
system "sed -i 's,/usr/share,#{CREW_PREFIX}/share,' #{CREW_DEST_PREFIX}/sbin/airodump-ng-oui-update"
end
def self.check
system 'make',
'sqlite=true',
'experimental=true',
'check'
end
end