Skip to content

Commit

Permalink
feat: third beta version of the application (#4)
Browse files Browse the repository at this point in the history
* feat: settings page and config file
* feat: mac address changer
* feat: github actions release deployer
* fix: header bar icons are now at the left
* fix: columns resizing issues
* fix: improved update window
* fix: channel entry filter

Signed-off-by: Martin Olivier <[email protected]>
  • Loading branch information
martin-olivier authored Mar 28, 2023
1 parent 9401e9b commit 7704f32
Show file tree
Hide file tree
Showing 34 changed files with 723 additions and 182 deletions.
Binary file modified .github/assets/illustration.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ jobs:
name: conventional commits
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: webiny/[email protected]

linter:
name: linter
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Install dependencies
run: sudo apt update && sudo apt install -y libgtk-4-dev libglib2.0-dev
Expand All @@ -60,7 +60,7 @@ jobs:
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Install dependencies
run: sudo apt update && sudo apt install -y libgtk-4-dev libglib2.0-dev
Expand Down
31 changes: 31 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: "Release"

on:
push:
tags:
- "v*"

jobs:
release:
name: "Deploy"
runs-on: "ubuntu-22.04"
permissions: write-all

steps:
- uses: actions/checkout@v3

- name: Install dependencies
run: sudo apt update && sudo apt install -y libgtk-4-dev libglib2.0-dev

- name: Install cargo-deb
run: cargo install cargo-deb

- name: Build project
run: cargo deb

- name: Deploy release
uses: softprops/action-gh-release@v1
with:
files: ./target/debian/*.deb
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
65 changes: 59 additions & 6 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 8 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
[package]
name = "airgorah"
version = "0.2.0"
version = "0.3.0"
edition = "2021"
license = "MIT"
description = "A WiFi auditing software that can perform deauth attacks and passwords cracking"
authors = ["Martin Olivier <[email protected]>"]
homepage = "https://github.com/martin-olivier/airgorah"
repository = "https://github.com/martin-olivier/airgorah"
documentation = "https://github.com/martin-olivier/airgorah"
description = "A WiFi auditing software that can perform deauth attacks and passwords cracking"
keywords = ["networking", "pentest", "aircrack-ng", "gui", "linux"]
readme = "README.md"
exclude = ["/.github", "/package", "/docs"]
Expand All @@ -17,26 +17,28 @@ gtk4 = { version = "0.6.4", features = ["v4_6"] }
glib = "0.17.5"
serde = { version = "1.0.158", features = ["derive"] }
serde_json = "1.0.94"
toml = "0.7.3"
csv = "1.2.1"
sudo = "0.6.0"
ctrlc = "3.2.5"
regex = "1.7.2"
regex = "1.7.3"
lazy_static = "1.4.0"
ureq = { version = "2.6.2", features = ["json"] }
which = "4.4.0"

[package.metadata.deb]
copyright = "2022, Martin Olivier"
copyright = "2023, Martin Olivier"
maintainer = "Martin Olivier <[email protected]>"
license-file = [ "LICENSE" ]
license-file = ["LICENSE"]
extended-description = "A WiFi auditing software that can perform deauth attacks and passwords cracking"
depends = "gnome-terminal, pkexec, libgtk-4-1 (>= 4.6.0), dbus-x11, wireless-tools, aircrack-ng (>= 1.6), wireshark-common"
depends = "gnome-terminal, pkexec, libgtk-4-1 (>= 4.6.0), dbus-x11, net-tools, wireless-tools, aircrack-ng (>= 1.6), wireshark-common, macchanger"
priority = "optional"
section = "utility"
assets = [
["target/release/airgorah", "/usr/bin/airgorah", "755"],
["README.md", "/usr/share/doc/airgorah/README", "644"],
["icons/app_icon.png", "/usr/share/app-install/icons/airgorah.png", "644"],
["package/config.toml", "/etc/airgorah/config.toml", "644"],
["package/.desktop", "/usr/share/applications/com.martin-olivier.airgorah.desktop", "644"],
["package/.policy", "/usr/share/polkit-1/actions/org.freedesktop.policykit.airgorah.policy", "755"],
]
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2022 Martin Olivier
Copyright (c) 2023 Martin Olivier

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
10 changes: 3 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
<h4 align="center">A WiFi auditing software that can perform deauth attacks and passwords cracking</h4>

<p align="center">
<a href="https://github.com/martin-olivier/airgorah/releases/tag/v0.2.0">
<img src="https://img.shields.io/badge/Version-0.2.0_(beta)-blue.svg" alt="version"/>
<a href="https://github.com/martin-olivier/airgorah/releases/tag/v0.3.0">
<img src="https://img.shields.io/badge/Version-0.3.0_(beta)-blue.svg" alt="version"/>
</a>
<a href="https://github.com/martin-olivier/airgorah/blob/main/LICENSE">
<img src="https://img.shields.io/badge/License-MIT-darkgreen.svg" alt="license"/>
Expand Down Expand Up @@ -44,9 +44,7 @@ You will also need a wireless network card that supports `monitor mode` and `pac
You can find pre-built releases for `Debian` based distributions [here](https://github.com/martin-olivier/airgorah/releases/latest) (Ubuntu, PopOS, Mint, Kali). You will just need to download the debian package and install it with the following command:

```
wget https://github.com/martin-olivier/airgorah/releases/download/v0.2.0/airgorah_0.2.0_amd64.deb
sudo apt update
sudo apt install ./airgorah_0.2.0_amd64.deb
sudo apt install ~/Downloads/airgorah_0.3.0_amd64.deb
```

Otherwise, if you'd like to compile from source, you can follow this [guide](docs/build_from_source.md).
Expand All @@ -61,9 +59,7 @@ Pull requests are welcome. For major changes, please open an issue first to disc

## Future

- [ ] Implement the setting page
- [ ] Provide usage documentation
- [ ] Improve the code quality and the documentation
- [ ] Improve the UI
- [ ] Provide releases for other linux distributions (Arch, Fedora, ...)
- [ ] Provide releases for other architectures (arm, ...)
4 changes: 2 additions & 2 deletions docs/build_from_source.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ Then, you will need to install `airgorah` dependencies:
### Debian (Ubuntu, PopOS, Mint, Kali)

```sh
sudo apt install dbus-x11 libgtk-4-dev libglib2.0-dev aircrack-ng wireless-tools gnome-terminal wireshark-common
sudo apt install dbus-x11 libgtk-4-dev libglib2.0-dev aircrack-ng net-tools wireless-tools gnome-terminal wireshark-common macchanger
```

### Fedora

```sh
sudo dnf install dbus-x11 gtk4-devel glib2-devel aircrack-ng wireless-tools-1 gnome-terminal wireshark-cli
sudo dnf install dbus-x11 gtk4-devel glib2-devel aircrack-ng net-tools wireless-tools-1 gnome-terminal wireshark-cli macchanger
```

## 3. Install Airgorah
Expand Down
2 changes: 1 addition & 1 deletion package/.desktop
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[Desktop Entry]
Encoding=UTF-8
Version=0.2.0
Version=0.3.0
Type=Application
Terminal=false
Exec=pkexec airgorah
Expand Down
3 changes: 3 additions & 0 deletions package/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
mac_address = "random"
display_hidden_ap = true
kill_network_manager = true
30 changes: 21 additions & 9 deletions src/backend/app.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
use super::*;
use crate::error::Error;
use crate::globals::*;
use crate::types::*;

use std::thread::JoinHandle;

/// Check if the user is root, and if all the dependencies are installed
pub fn app_setup() -> Result<(), Error> {
app_cleanup();

Expand All @@ -17,6 +19,8 @@ pub fn app_setup() -> Result<(), Error> {
return Err(Error::new("Airgorah need root privilege to run"));
}

load_settings();

check_dependencies(&[
"sh",
"service",
Expand All @@ -29,37 +33,40 @@ pub fn app_setup() -> Result<(), Error> {
"aircrack-ng",
"gnome-terminal",
"mergecap",
"macchanger",
])
}

/// Stop the scan process, kill all the attack process, and remove all the files created by the app
pub fn app_cleanup() {
super::stop_scan_process();
stop_scan_process().ok();

for attacked_ap in super::get_attack_pool().iter_mut() {
for attacked_ap in get_attack_pool().iter_mut() {
match &mut attacked_ap.1 .1 {
AttackedClients::All(child) => {
child.kill().unwrap();
child.wait().unwrap();
child.kill().ok();
child.wait().ok();
}
AttackedClients::Selection(child_list) => {
for (_, child) in child_list {
child.kill().unwrap();
child.wait().unwrap();
child.kill().ok();
child.wait().ok();
}
}
}
}

if let Some(iface) = IFACE.lock().unwrap().as_ref() {
super::disable_monitor_mode(iface).ok();
super::restore_network_manager().ok();
disable_monitor_mode(iface).ok();
restore_network_manager().ok();
}

std::fs::remove_file(LIVE_SCAN_PATH.to_string() + "-01.csv").ok();
std::fs::remove_file(LIVE_SCAN_PATH.to_string() + "-01.cap").ok();
std::fs::remove_file(OLD_SCAN_PATH.to_string() + "-01.cap").ok();
}

/// Check if all the dependencies are installed
pub fn check_dependencies(deps: &[&str]) -> Result<(), Error> {
for dep in deps {
if which::which(dep).is_err() {
Expand All @@ -72,13 +79,18 @@ pub fn check_dependencies(deps: &[&str]) -> Result<(), Error> {
Ok(())
}

/// Spawn a thread that will check if a new version is available
pub fn spawn_update_checker() -> JoinHandle<bool> {
std::thread::spawn(|| {
let url = "https://api.github.com/repos/martin-olivier/airgorah/releases/latest";

if let Ok(response) = ureq::get(url).call() {
if let Ok(json) = response.into_json::<serde_json::Value>() {
return json["tag_name"] != VERSION;
if json["tag_name"] != VERSION {
let new_version = json["tag_name"].as_str().unwrap_or("unknown");
*NEW_VERSION.lock().unwrap() = Some(new_version.to_string());
return true;
}
}
}
false
Expand Down
Loading

0 comments on commit 7704f32

Please sign in to comment.