2022-05-28 16:16:35 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, makeWrapper
|
|
|
|
# Required
|
|
|
|
, aircrack-ng
|
|
|
|
, bash
|
|
|
|
, coreutils-full
|
|
|
|
, gawk
|
|
|
|
, gnugrep
|
|
|
|
, gnused
|
|
|
|
, iproute2
|
|
|
|
, iw
|
|
|
|
, pciutils
|
|
|
|
, procps
|
|
|
|
, tmux
|
|
|
|
# X11 Front
|
|
|
|
, xterm
|
|
|
|
, xorg
|
|
|
|
# what the author calls "Internals"
|
|
|
|
, usbutils
|
|
|
|
, wget
|
|
|
|
, ethtool
|
|
|
|
, util-linux
|
|
|
|
, ccze
|
|
|
|
# Optionals
|
2022-11-24 12:43:10 +00:00
|
|
|
# Missing in nixpkgs: beef, hostapd-wpe
|
|
|
|
, asleap
|
2022-05-28 16:16:35 +00:00
|
|
|
, bettercap
|
|
|
|
, bully
|
|
|
|
, crunch
|
|
|
|
, dnsmasq
|
|
|
|
, ettercap
|
|
|
|
, hashcat
|
|
|
|
, hcxdumptool
|
|
|
|
, hcxtools
|
|
|
|
, hostapd
|
|
|
|
, john
|
|
|
|
, lighttpd
|
|
|
|
, mdk4
|
|
|
|
, nftables
|
|
|
|
, openssl
|
|
|
|
, pixiewps
|
|
|
|
, reaverwps-t6x # Could be the upstream version too
|
|
|
|
, wireshark-cli
|
|
|
|
# Undocumented requirements (there is also ping)
|
|
|
|
, apparmor-bin-utils
|
|
|
|
, curl
|
|
|
|
, glibc
|
|
|
|
, ncurses
|
|
|
|
, networkmanager
|
|
|
|
, systemd
|
|
|
|
# Support groups
|
|
|
|
, supportWpaWps ? true # Most common use-case
|
|
|
|
, supportHashCracking ? false
|
|
|
|
, supportEvilTwin ? false
|
|
|
|
, supportX11 ? false # Allow using xterm instead of tmux, hard to test
|
|
|
|
}:
|
|
|
|
let
|
|
|
|
deps = [
|
|
|
|
aircrack-ng
|
|
|
|
bash
|
|
|
|
coreutils-full
|
|
|
|
curl
|
|
|
|
gawk
|
|
|
|
glibc
|
|
|
|
gnugrep
|
|
|
|
gnused
|
|
|
|
iproute2
|
|
|
|
iw
|
|
|
|
networkmanager
|
|
|
|
ncurses
|
|
|
|
pciutils
|
|
|
|
procps
|
|
|
|
tmux
|
|
|
|
usbutils
|
|
|
|
wget
|
|
|
|
ethtool
|
|
|
|
util-linux
|
|
|
|
ccze
|
|
|
|
systemd
|
|
|
|
] ++ lib.optionals supportWpaWps [
|
|
|
|
bully
|
|
|
|
pixiewps
|
|
|
|
reaverwps-t6x
|
|
|
|
] ++ lib.optionals supportHashCracking [
|
2022-11-24 12:43:10 +00:00
|
|
|
asleap
|
2022-05-28 16:16:35 +00:00
|
|
|
crunch
|
|
|
|
hashcat
|
|
|
|
hcxdumptool
|
|
|
|
hcxtools
|
|
|
|
john
|
|
|
|
wireshark-cli
|
|
|
|
] ++ lib.optionals supportEvilTwin [
|
|
|
|
bettercap
|
|
|
|
dnsmasq
|
|
|
|
ettercap
|
|
|
|
hostapd
|
|
|
|
lighttpd
|
|
|
|
openssl
|
|
|
|
mdk4
|
|
|
|
nftables
|
|
|
|
apparmor-bin-utils
|
|
|
|
] ++ lib.optionals supportX11 [
|
|
|
|
xterm
|
|
|
|
xorg.xset
|
|
|
|
xorg.xdpyinfo
|
|
|
|
];
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "airgeddon";
|
2023-03-09 07:17:08 +00:00
|
|
|
version = "11.11";
|
2022-05-28 16:16:35 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "v1s1t0r1sh3r3";
|
|
|
|
repo = "airgeddon";
|
2023-03-09 07:53:27 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2023-03-09 07:17:08 +00:00
|
|
|
hash = "sha256-3Rx1tMRIpSk+IEJGOs+t+kDlvGHYOx1IOSi+663uzrw=";
|
2022-05-28 16:16:35 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
strictDeps = true;
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
# What these replacings do?
|
|
|
|
# - Disable the auto-updates (we'll run from a read-only directory);
|
|
|
|
# - Silence the checks (NixOS will enforce the PATH, it will only see the tools as we listed);
|
|
|
|
# - Use "tmux", we're not patching XTerm commands;
|
|
|
|
# - Remove PWD and $0 references, forcing it to use the paths from store;
|
|
|
|
# - Force our PATH to all tmux sessions.
|
|
|
|
postPatch = ''
|
|
|
|
patchShebangs airgeddon.sh
|
|
|
|
sed -i '
|
|
|
|
s|AIRGEDDON_AUTO_UPDATE=true|AIRGEDDON_AUTO_UPDATE=false|
|
|
|
|
s|AIRGEDDON_SILENT_CHECKS=false|AIRGEDDON_SILENT_CHECKS=true|
|
|
|
|
s|AIRGEDDON_WINDOWS_HANDLING=xterm|AIRGEDDON_WINDOWS_HANDLING=tmux|
|
|
|
|
' .airgeddonrc
|
|
|
|
|
|
|
|
sed -Ei '
|
|
|
|
s|\$\(pwd\)|${placeholder "out"}/share/airgeddon;scriptfolder=${placeholder "out"}/share/airgeddon/|
|
|
|
|
s|\$\{0\}|${placeholder "out"}/bin/airgeddon|
|
|
|
|
s|tmux send-keys -t "([^"]+)" "|tmux send-keys -t "\1" "export PATH=\\"$PATH\\"; |
|
|
|
|
' airgeddon.sh
|
|
|
|
'';
|
|
|
|
|
|
|
|
# ATTENTION: No need to chdir around, we're removing the occurrences of "$(pwd)"
|
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/airgeddon --prefix PATH : ${lib.makeBinPath deps}
|
|
|
|
'';
|
|
|
|
|
|
|
|
# Install only the interesting files
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
install -Dm 755 airgeddon.sh "$out/bin/airgeddon"
|
|
|
|
install -dm 755 "$out/share/airgeddon"
|
|
|
|
cp -dr .airgeddonrc known_pins.db language_strings.sh plugins/ "$out/share/airgeddon/"
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
2023-03-09 07:53:27 +00:00
|
|
|
description = "Multi-use TUI to audit wireless networks";
|
2024-03-19 02:14:51 +00:00
|
|
|
mainProgram = "airgeddon";
|
2022-05-28 16:16:35 +00:00
|
|
|
homepage = "https://github.com/v1s1t0r1sh3r3/airgeddon";
|
2023-03-09 07:53:27 +00:00
|
|
|
changelog = "https://github.com/v1s1t0r1sh3r3/airgeddon/blob/v${version}/CHANGELOG.md";
|
2022-05-28 16:16:35 +00:00
|
|
|
license = licenses.gpl3Plus;
|
2024-07-28 14:44:11 +00:00
|
|
|
maintainers = [ ];
|
2022-05-28 16:16:35 +00:00
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|