3
0
Fork 0
forked from mirrors/nixpkgs

Merge pull request #173885 from PedroHLC/init-airgeddon

airgeddon: init at 11.01
This commit is contained in:
Thiago Kenji Okada 2022-06-02 19:20:17 +01:00 committed by GitHub
commit b2564a8a96
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 174 additions and 0 deletions

View file

@ -9885,6 +9885,12 @@
githubId = 8641;
name = "Pierre Carrier";
};
pedrohlc = {
email = "root@pedrohlc.com";
github = "PedroHLC";
githubId = 1368952;
name = "Pedro Lara Campos";
};
penguwin = {
email = "penguwin@penguwin.eu";
github = "penguwin";

View file

@ -0,0 +1,166 @@
{ 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
# Missing in nixpkgs: beef, hostapd-wpe, asleap
, bettercap
, bully
, crunch
, dhcp
, 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 [
crunch
hashcat
hcxdumptool
hcxtools
john
wireshark-cli
] ++ lib.optionals supportEvilTwin [
bettercap
dhcp
dnsmasq
ettercap
hostapd
lighttpd
openssl
mdk4
nftables
apparmor-bin-utils
] ++ lib.optionals supportX11 [
xterm
xorg.xset
xorg.xdpyinfo
];
in
stdenv.mkDerivation rec {
pname = "airgeddon";
version = "11.01";
src = fetchFromGitHub {
owner = "v1s1t0r1sh3r3";
repo = "airgeddon";
rev = "v${version}";
sha256 = "3TjaLEcerRk69Ys4kj7vOMCRUd0ifFJzL4MB5ifoK68=";
};
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; {
description = "Multi-use TUI to audit wireless networks. ";
homepage = "https://github.com/v1s1t0r1sh3r3/airgeddon";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ pedrohlc ];
platforms = platforms.linux;
};
}

View file

@ -1069,6 +1069,8 @@ with pkgs;
airfield = callPackage ../tools/networking/airfield { };
airgeddon = callPackage ../tools/networking/airgeddon { };
apache-airflow = with python3.pkgs; toPythonApplication apache-airflow;
airsonic = callPackage ../servers/misc/airsonic { };