A WiFi security auditing software
deps: make aircrack-ng an optional dependency (#224)
Martin Olivier9bd2e46dc784
diff --git a/.fpm b/.fpmindex d509756..eaf9403 100644--- a/.fpm+++ b/.fpm@@ -2,7 +2,7 @@--name airgorah--license MIT--version 0.8.1---description "A WiFi security auditing software mainly based on aircrack-ng tools suite"+--description "A WiFi security auditing software"--url "https://github.com/martin-olivier/airgorah"--maintainer "Martin Olivier <[email protected]>"@@ -13,7 +13,6 @@--depends xterm--depends iw--depends macchanger---depends aircrack-ng--depends adwaita-icon-themetarget/debug/airgorah=/usr/bin/airgorahdiff --git a/Dockerfile b/Dockerfileindex 374f9ac..df6ce10 100644--- a/Dockerfile+++ b/Dockerfile@@ -20,9 +20,9 @@ RUN rustup component add rustfmtWORKDIR /workspace-ENV DEBIAN_DEPS="--depends libgtk-4-1 --depends dbus-x11 --depends iproute2 --depends crunch"-ENV REDHAT_DEPS="--depends gtk4-devel --depends dbus-x11 --depends iproute"-ENV ARCHLINUX_DEPS="--depends gtk4 --depends dbus --depends iproute2"+ENV DEBIAN_DEPS="--depends libgtk-4-1 --depends dbus-x11 --depends iproute2 --depends crunch --deb-recommends aircrack-ng"+ENV REDHAT_DEPS="--depends gtk4-devel --depends dbus-x11 --depends iproute --rpm-tag Recommends:aircrack-ng"+ENV ARCHLINUX_DEPS="--depends gtk4 --depends dbus --depends iproute2 --pacman-optional-depends aircrack-ng"# Build and package the projectCMD cargo build && \diff --git a/README.md b/README.mdindex b401d47..03d56e2 100644--- a/README.md+++ b/README.md@@ -3,7 +3,7 @@Airgorah</h1><p align="center">- <span>A WiFi security auditing software mainly based on <a href="https://github.com/aircrack-ng/aircrack-ng">aircrack-ng</a> tools suite</span>+ <span>A WiFi security auditing software</span></p><p align="center">diff --git a/crates/common/src/deps.rs b/crates/common/src/deps.rsindex 43902fb..106d117 100644--- a/crates/common/src/deps.rs+++ b/crates/common/src/deps.rs@@ -25,6 +25,7 @@ pub struct Tool {}// Optional tool names, referenced at their on-demand check sites.+pub const AIRCRACK_NG: &str = "aircrack-ng";pub const CRUNCH: &str = "crunch";pub const SYSTEMCTL: &str = "systemctl";pub const PKEXEC: &str = "pkexec";@@ -47,11 +48,6 @@ pub const TOOLS: &[Tool] = &[requirer: Requirer::Gui,optional: false,},- Tool {- name: "aircrack-ng",- requirer: Requirer::Gui,- optional: false,- },Tool {name: "xterm",requirer: Requirer::Gui,@@ -68,6 +64,11 @@ pub const TOOLS: &[Tool] = &[optional: false,},// Optional, checked on demand.+ Tool {+ name: AIRCRACK_NG,+ requirer: Requirer::Gui,+ optional: true,+ },Tool {name: CRUNCH,requirer: Requirer::Gui,diff --git a/crates/common/src/handshake.rs b/crates/common/src/handshake.rsindex fea0858..b48d79f 100644--- a/crates/common/src/handshake.rs+++ b/crates/common/src/handshake.rs@@ -1,7 +1,6 @@//! Native WPA handshake detection.//!-//! Reads capture file(s) and reports which access points have a crackable WPA-//! 4-way handshake — the in-house replacement for shelling out to `aircrack-ng`.+//! Reads capture file(s) and reports which access points have a crackable WPA 4-way handshake.//! Shared because both sides need it against different files: the agent scans the//! root-owned live/old captures to flag APs while scanning, and the GUI inspects a//! user-selected capture before offering it for decryption. Reading a capture anddiff --git a/crates/gui/Cargo.toml b/crates/gui/Cargo.tomlindex 8eea1e1..e213aef 100644--- a/crates/gui/Cargo.toml+++ b/crates/gui/Cargo.toml@@ -3,11 +3,11 @@ name = "airgorah"version.workspace = trueedition.workspace = truelicense.workspace = true-description = "A WiFi security auditing software mainly based on aircrack-ng tools suite"+description = "A WiFi security auditing software"homepage.workspace = truerepository.workspace = truedocumentation.workspace = true-keywords = ["networking", "pentest", "aircrack-ng", "gui", "linux"]+keywords = ["networking", "pentest", "gui", "linux"]readme.workspace = true[[bin]]diff --git a/crates/gui/src/frontend/connections/app.rs b/crates/gui/src/frontend/connections/app.rsindex a479a46..23a25a3 100755--- a/crates/gui/src/frontend/connections/app.rs+++ b/crates/gui/src/frontend/connections/app.rs@@ -325,7 +325,6 @@ fn connect_about_button(app_data: Rc<AppData>) {app_data,move |_| {let icon = Pixbuf::from_read(BufReader::new(globals::APP_ICON)).unwrap();- let desc = "A WiFi security auditing software mainly based on aircrack-ng tools suite";AboutDialog::builder().program_name("Airgorah")@@ -334,7 +333,7 @@ fn connect_about_button(app_data: Rc<AppData>) {.copyright("Copyright (c) Martin OLIVIER").license_type(License::MitX11).logo(&Picture::for_pixbuf(&icon).paintable().unwrap())- .comments(desc)+ .comments("A WiFi security auditing software").website_label("https://github.com/martin-olivier/airgorah").transient_for(&app_data.app_gui.window).modal(true)diff --git a/crates/gui/src/frontend/connections/decrypt.rs b/crates/gui/src/frontend/connections/decrypt.rsindex 40bf290..db2be9b 100755--- a/crates/gui/src/frontend/connections/decrypt.rs+++ b/crates/gui/src/frontend/connections/decrypt.rs@@ -356,6 +356,11 @@ fn connect_decrypt_button(app_data: Rc<AppData>) {let stack = app_data.decrypt_gui.stack.visible_child_name().unwrap();+ if !backend::deps::is_installed(backend::deps::AIRCRACK_NG) {+ let err_msg = "\"aircrack-ng\" is not installed on your system, could not run the decryption";+ return ErrorDialog::spawn(&app_data.decrypt_gui.window, "Failed to run decryption", err_msg);+ }+if stack == "bruteforce" && !backend::deps::is_installed(backend::deps::CRUNCH) {let err_msg = "\"crunch\" is not installed on your system, could not generate a wordlist from a charset";return ErrorDialog::spawn(&app_data.decrypt_gui.window, "Failed to run decryption", err_msg);diff --git a/package/.desktop b/package/.desktopindex e18a772..16aa73b 100644--- a/package/.desktop+++ b/package/.desktop@@ -1,6 +1,6 @@[Desktop Entry]Name=Airgorah-Comment=A WiFi security auditing software mainly based on aircrack-ng tools suite+Comment=A WiFi security auditing softwareExec=airgorahIcon=/usr/share/pixmaps/airgorah.pngCategories=Network;Monitor;GTK;