From df75443c074451e77c9576d3c1b4096267cf0417 Mon Sep 17 00:00:00 2001 From: Martin Olivier Date: Fri, 8 Mar 2024 01:21:18 +0100 Subject: [PATCH] feat: version 0.7.1 (#94) * feat: project build and packaging in docker * fix: lag related to vendors finder * fix: restoring properly every services that have been killed * fix: logs are now set to info level by default * fix: app is not dependent on systemd anymore * fix: bruteforce startup issue with gnome-terminal * fix: prevents airmon-ng interactive mode Signed-off-by: Martin Olivier --- .fpm | 3 +- .github/workflows/CI.yml | 70 +-- Cargo.lock | 756 +++++++++++------------ Cargo.toml | 40 +- Dockerfile | 31 + LICENSE | 4 +- docker/amd64_builder.Dockerfile | 5 - docker/arm64_builder.Dockerfile | 5 - src/backend/app.rs | 1 - src/backend/decrypt.rs | 8 +- src/backend/interface.rs | 99 ++- src/backend/mod.rs | 2 + src/backend/scan.rs | 22 +- src/backend/settings.rs | 16 +- src/backend/vendors.rs | 38 ++ src/frontend/connections/app.rs | 11 + src/frontend/connections/interface.rs | 13 + src/frontend/connections/scan.rs | 2 +- src/frontend/connections/settings.rs | 11 + src/frontend/interfaces/app.rs | 13 +- src/frontend/interfaces/settings.rs | 2 +- src/frontend/widgets/icon_text_button.rs | 71 --- src/frontend/widgets/mod.rs | 2 - src/globals.rs | 4 +- src/main.rs | 2 +- 25 files changed, 616 insertions(+), 615 deletions(-) create mode 100644 Dockerfile delete mode 100644 docker/amd64_builder.Dockerfile delete mode 100644 docker/arm64_builder.Dockerfile create mode 100644 src/backend/vendors.rs delete mode 100644 src/frontend/widgets/icon_text_button.rs diff --git a/.fpm b/.fpm index 1e16c6a..d0ebc71 100644 --- a/.fpm +++ b/.fpm @@ -1,7 +1,7 @@ -s dir ./target/release/airgorah ./icons/app_icon.png package README.md LICENSE --name airgorah --license MIT ---version 0.7.0 +--version 0.7.1 --description "A WiFi auditing software that can perform deauth attacks and passwords cracking" --url "https://github.com/martin-olivier/airgorah" --maintainer "Martin Olivier " @@ -10,7 +10,6 @@ --conflicts airgorah --depends bash ---depends systemd --depends iw --depends macchanger --depends aircrack-ng diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index d32972d..1b3b30a 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -16,7 +16,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: webiny/action-conventional-commits@v1.1.0 + - uses: webiny/action-conventional-commits@v1.3.0 linter: name: linter @@ -25,14 +25,22 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Install dependencies - run: sudo apt update && sudo apt install -y libgtk-4-dev libglib2.0-dev + - name: Create builder image + run: docker build . -t amd64_builder - name: Clippy - run: cargo clippy --all --all-features -- -D warnings + run: > + docker run --rm + -v ${{ github.workspace }}:/workspace + amd64_builder + cargo clippy --all --all-features -- -D warnings - name: Format - run: cargo fmt --all -- --check + run: > + docker run --rm + -v ${{ github.workspace }}:/workspace + amd64_builder + cargo fmt --all -- --check build: strategy: @@ -63,40 +71,13 @@ jobs: docker build . --platform linux/${{ matrix.platform }} -t ${{ matrix.image }} - -f docker/${{ matrix.image }}.Dockerfile - name: Build project run: > docker run --rm --platform linux/${{ matrix.platform }} -v ${{ github.workspace }}:/workspace - -w /workspace ${{ matrix.image }} - cargo build --release - - - name: Install packaging dependencies - run: > - sudo apt update && sudo apt install -y - build-essential - ruby - ruby-dev - rubygems - rpm - libarchive-tools - - - name: Install fpm - run: sudo gem install fpm - - - name: Build debian package - run: > - fpm -t deb -p airgorah_${{ matrix.arch }}.deb --architecture ${{ matrix.arch }} - --depends policykit-1 - --depends "libgtk-4-1 (>= 4.6.0)" - --depends dbus-x11 - --depends wireshark-common - --depends iproute2 - --depends mdk4 - --depends crunch - name: Test debian package run: > @@ -108,21 +89,12 @@ jobs: sh -c "apt update && apt install -y ./airgorah_${{ matrix.arch }}.deb" - name: Save debian artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: airgorah_${{ matrix.arch }}.deb path: ./airgorah_${{ matrix.arch }}.deb if-no-files-found: error - - name: Build redhat package - run: > - fpm -t rpm -p airgorah_${{ matrix.arch }}.rpm --architecture ${{ matrix.arch }} - --depends polkit - --depends "gtk4-devel >= 4.6.0" - --depends dbus-x11 - --depends wireshark-cli - --depends iproute - - name: Test redhat package run: > docker run --rm @@ -133,22 +105,12 @@ jobs: sh -c "dnf update -y && dnf install -y ./airgorah_${{ matrix.arch }}.rpm" - name: Save redhat artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: airgorah_${{ matrix.arch }}.rpm path: ./airgorah_${{ matrix.arch }}.rpm if-no-files-found: error - - name: Build archlinux package - run: > - fpm -t pacman -p airgorah_${{ matrix.arch }}.pkg.tar.zst --architecture ${{ matrix.arch }} - --depends polkit - --depends gtk4 - --depends dbus - --depends wireshark-cli - --depends iproute2 - --depends mdk4 - - name: Test archlinux package run: > docker run --rm @@ -159,7 +121,7 @@ jobs: sh -c "pacman -Syu --noconfirm && pacman -U --noconfirm ./airgorah_${{ matrix.arch }}.pkg.tar.zst" - name: Save archlinux artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: airgorah_${{ matrix.arch }}.pkg.tar.zst path: ./airgorah_${{ matrix.arch }}.pkg.tar.zst diff --git a/Cargo.lock b/Cargo.lock index 2540597..e0f7e07 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -19,7 +19,7 @@ dependencies = [ [[package]] name = "airgorah" -version = "0.7.0" +version = "0.7.1" dependencies = [ "chrono", "csv", @@ -29,7 +29,7 @@ dependencies = [ "gtk4", "lazy_static", "log", - "nix", + "nix 0.28.0", "regex", "serde", "serde_json", @@ -54,11 +54,59 @@ dependencies = [ "libc", ] +[[package]] +name = "anstream" +version = "0.6.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d96bd03f33fe50a863e394ee9718a706f988b9079b20c3784fb726e7678b62fb" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8901269c6307e8d93993578286ac0edf7f195079ffff5ebdeea6a59ffb7e36bc" + +[[package]] +name = "anstyle-parse" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c75ac65da39e5fe5ab759307499ddad880d724eed2f6ce5b5e8a26f4f387928c" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e28923312444cdd728e4738b3f9c9cac739500909bb3d3c94b43551b16517648" +dependencies = [ + "windows-sys", +] + +[[package]] +name = "anstyle-wincon" +version = "3.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1cd54b81ec8d6180e24654d0b371ad22fc3dd083b6ff8ba325b72e00c87660a7" +dependencies = [ + "anstyle", + "windows-sys", +] + [[package]] name = "anyhow" -version = "1.0.75" +version = "1.0.80" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" +checksum = "5ad32ce52e4161730f7098c077cd2ed6229b5804ccf99e5366be1ab72a98b4e1" [[package]] name = "autocfg" @@ -68,41 +116,40 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "base64" -version = "0.21.5" +version = "0.21.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" [[package]] name = "bitflags" -version = "2.4.1" +version = "2.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" +checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" [[package]] name = "bumpalo" -version = "3.14.0" +version = "3.15.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" +checksum = "7ff69b9dd49fd426c69a0db9fc04dd934cdb6645ff000864d98f7e2af8830eaa" [[package]] name = "cairo-rs" -version = "0.18.3" +version = "0.19.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f33613627f0dea6a731b0605101fad59ba4f193a52c96c4687728d822605a8a1" +checksum = "2650f66005301bd33cc486dec076e1293c4cecf768bc7ba9bf5d2b1be339b99c" dependencies = [ "bitflags", "cairo-sys-rs", "glib", "libc", - "once_cell", "thiserror", ] [[package]] name = "cairo-sys-rs" -version = "0.18.2" +version = "0.19.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "685c9fa8e590b8b3d678873528d83411db17242a73fccaed827770ea0fedda51" +checksum = "fd3bb3119664efbd78b5e6c93957447944f16bdbced84c17a9f41c7829b81e64" dependencies = [ "glib-sys", "libc", @@ -111,18 +158,15 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.83" +version = "1.0.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" -dependencies = [ - "libc", -] +checksum = "8cd6604a82acf3039f1144f54b8eb34e91ffba622051189e71b781822d5ee1f5" [[package]] name = "cfg-expr" -version = "0.15.5" +version = "0.15.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03915af431787e6ffdcc74c645077518c6b6e01f80b761e0fbbfa288536311b3" +checksum = "fa50868b64a9a6fda9d593ce778849ea8715cd2a3d2cc17ffdb4a2f2f2f1961d" dependencies = [ "smallvec", "target-lexicon", @@ -134,31 +178,43 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +[[package]] +name = "cfg_aliases" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" + [[package]] name = "chrono" -version = "0.4.31" +version = "0.4.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38" +checksum = "8eaf5903dcbc0a39312feb77df2ff4c76387d591b9fc7b04a238dcf8bb62639a" dependencies = [ "android-tzdata", "iana-time-zone", "js-sys", "num-traits", "wasm-bindgen", - "windows-targets 0.48.5", + "windows-targets", ] +[[package]] +name = "colorchoice" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" + [[package]] name = "core-foundation-sys" -version = "0.8.4" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" +checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" [[package]] name = "crc32fast" -version = "1.3.2" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" +checksum = "b3855a8a784b474f333699ef2bbca9db2c4a1f6d9088a90a2d25b1eb53111eaa" dependencies = [ "cfg-if", ] @@ -190,27 +246,37 @@ version = "3.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b467862cc8610ca6fc9a1532d7777cee0804e678ab45410897b9396495994a0b" dependencies = [ - "nix", - "windows-sys 0.52.0", + "nix 0.27.1", + "windows-sys", ] [[package]] name = "either" -version = "1.9.0" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11157ac094ffbdde99aa67b23417ebdd801842852b500e395a45a9c0aac03e4a" + +[[package]] +name = "env_filter" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" +checksum = "a009aa4810eb158359dda09d0c87378e4bbb89b5a801f016885a4707ba24f7ea" +dependencies = [ + "log", + "regex", +] [[package]] name = "env_logger" -version = "0.10.1" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95b3f3e67048839cb0d0781f445682a35113da7121f7c949db0e2be96a4fbece" +checksum = "38b35839ba51819680ba087cd351788c9a3c476841207e0b8cee0b04722343b9" dependencies = [ + "anstream", + "anstyle", + "env_filter", "humantime", - "is-terminal", "log", - "regex", - "termcolor", ] [[package]] @@ -221,12 +287,12 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.5" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3e13f66a2f95e32a39eaa81f6b95d42878ca0e1db0c7543723dfe12557e860" +checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" dependencies = [ "libc", - "windows-sys 0.48.0", + "windows-sys", ] [[package]] @@ -251,33 +317,33 @@ dependencies = [ [[package]] name = "form_urlencoded" -version = "1.2.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" dependencies = [ "percent-encoding", ] [[package]] name = "futures-channel" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff4dd66668b557604244583e3e1e1eada8c5c2e96a6d0d6653ede395b78bbacb" +checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" dependencies = [ "futures-core", ] [[package]] name = "futures-core" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb1d22c66e66d9d72e1758f0bd7d4fd0bee04cad842ee34587d68c07e45d088c" +checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" [[package]] name = "futures-executor" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f4fb8693db0cf099eadcca0efe2a5a22e4550f98ed16aba6c48700da29597bc" +checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" dependencies = [ "futures-core", "futures-task", @@ -286,32 +352,32 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bf34a163b5c4c52d0478a4d757da8fb65cabef42ba90515efee0f6f9fa45aaa" +checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" [[package]] name = "futures-macro" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53b153fd91e4b0147f4aced87be237c98248656bb01050b96bf3ee89220a8ddb" +checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.46", + "syn 2.0.52", ] [[package]] name = "futures-task" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efd193069b0ddadc69c46389b740bbccdd97203899b48d09c5f7969591d6bae2" +checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" [[package]] name = "futures-util" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a19526d624e703a3179b3d322efec918b6246ea0fa51d41124525f00f1cc8104" +checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" dependencies = [ "futures-core", "futures-macro", @@ -323,22 +389,21 @@ dependencies = [ [[package]] name = "gdk-pixbuf" -version = "0.18.3" +version = "0.19.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "446f32b74d22c33b7b258d4af4ffde53c2bf96ca2e29abdf1a785fe59bd6c82c" +checksum = "f6a23f8a0b5090494fd04924662d463f8386cc678dd3915015a838c1a3679b92" dependencies = [ "gdk-pixbuf-sys", "gio", "glib", "libc", - "once_cell", ] [[package]] name = "gdk-pixbuf-sys" -version = "0.18.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9839ea644ed9c97a34d129ad56d38a25e6756f99f3a88e15cd39c20629caf7" +checksum = "3dcbd04c1b2c4834cc008b4828bc917d062483b88d26effde6342e5622028f96" dependencies = [ "gio-sys", "glib-sys", @@ -349,9 +414,9 @@ dependencies = [ [[package]] name = "gdk4" -version = "0.7.3" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7edb019ad581f8ecf8ea8e4baa6df7c483a95b5a59be3140be6a9c3b0c632af6" +checksum = "9100b25604183f2fd97f55ef087fae96ab4934d7215118a35303e422688e6e4b" dependencies = [ "cairo-rs", "gdk-pixbuf", @@ -364,9 +429,9 @@ dependencies = [ [[package]] name = "gdk4-sys" -version = "0.7.2" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbab43f332a3cf1df9974da690b5bb0e26720ed09a228178ce52175372dcfef0" +checksum = "d0b76874c40bb8d1c7d03a7231e23ac75fa577a456cd53af32ec17ec8f121626" dependencies = [ "cairo-sys-rs", "gdk-pixbuf-sys", @@ -381,9 +446,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.10" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" +checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5" dependencies = [ "cfg-if", "libc", @@ -392,9 +457,9 @@ dependencies = [ [[package]] name = "gio" -version = "0.18.3" +version = "0.19.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47d809baf02bdf1b5ef4ad3bf60dd9d4977149db4612b7bbb58e56aef168193b" +checksum = "2eae10b27b6dd27e22ed0d812c6387deba295e6fc004a8b379e459b663b05a02" dependencies = [ "futures-channel", "futures-core", @@ -403,7 +468,6 @@ dependencies = [ "gio-sys", "glib", "libc", - "once_cell", "pin-project-lite", "smallvec", "thiserror", @@ -411,22 +475,22 @@ dependencies = [ [[package]] name = "gio-sys" -version = "0.18.1" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37566df850baf5e4cb0dfb78af2e4b9898d817ed9263d1090a2df958c64737d2" +checksum = "bcf8e1d9219bb294636753d307b030c1e8a032062cba74f493c431a5c8b81ce4" dependencies = [ "glib-sys", "gobject-sys", "libc", "system-deps", - "winapi", + "windows-sys", ] [[package]] name = "glib" -version = "0.18.5" +version = "0.19.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "233daaf6e83ae6a12a52055f568f9d7cf4671dabb78ff9560ab6da230ce00ee5" +checksum = "ab9e86540b5d8402e905ad4ce7d6aa544092131ab564f3102175af176b90a053" dependencies = [ "bitflags", "futures-channel", @@ -440,30 +504,28 @@ dependencies = [ "gobject-sys", "libc", "memchr", - "once_cell", "smallvec", "thiserror", ] [[package]] name = "glib-macros" -version = "0.18.3" +version = "0.19.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72793962ceece3863c2965d7f10c8786323b17c7adea75a515809fa20ab799a5" +checksum = "0f5897ca27a83e4cdc7b4666850bade0a2e73e17689aabafcc9acddad9d823b8" dependencies = [ "heck", - "proc-macro-crate 2.0.0", - "proc-macro-error", + "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.46", + "syn 2.0.52", ] [[package]] name = "glib-sys" -version = "0.18.1" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "063ce2eb6a8d0ea93d2bf8ba1957e78dbab6be1c2220dd3daca57d5a9d869898" +checksum = "630f097773d7c7a0bb3258df4e8157b47dc98bbfa0e60ad9ab56174813feced4" dependencies = [ "libc", "system-deps", @@ -471,9 +533,9 @@ dependencies = [ [[package]] name = "gobject-sys" -version = "0.18.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0850127b514d1c4a4654ead6dedadb18198999985908e6ffe4436f53c785ce44" +checksum = "c85e2b1080b9418dd0c58b498da3a5c826030343e0ef07bde6a955d28de54979" dependencies = [ "glib-sys", "libc", @@ -482,9 +544,9 @@ dependencies = [ [[package]] name = "graphene-rs" -version = "0.18.1" +version = "0.19.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b2228cda1505613a7a956cca69076892cfbda84fc2b7a62b94a41a272c0c401" +checksum = "99e4d388e96c5f29e2b2f67045d229ddf826d0a8d6d282f94ed3b34452222c91" dependencies = [ "glib", "graphene-sys", @@ -493,9 +555,9 @@ dependencies = [ [[package]] name = "graphene-sys" -version = "0.18.1" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc4144cee8fc8788f2a9b73dc5f1d4e1189d1f95305c4cb7bd9c1af1cfa31f59" +checksum = "236ed66cc9b18d8adf233716f75de803d0bf6fc806f60d14d948974a12e240d0" dependencies = [ "glib-sys", "libc", @@ -505,9 +567,9 @@ dependencies = [ [[package]] name = "gsk4" -version = "0.7.3" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d958e351d2f210309b32d081c832d7de0aca0b077aa10d88336c6379bd01f7e" +checksum = "c65036fc8f99579e8cb37b12487969b707ab23ec8ab953682ff347cbd15d396e" dependencies = [ "cairo-rs", "gdk4", @@ -520,9 +582,9 @@ dependencies = [ [[package]] name = "gsk4-sys" -version = "0.7.3" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12bd9e3effea989f020e8f1ff3fa3b8c63ba93d43b899c11a118868853a56d55" +checksum = "bd24c814379f9c3199dc53e52253ee8d0f657eae389ab282c330505289d24738" dependencies = [ "cairo-sys-rs", "gdk4-sys", @@ -536,9 +598,9 @@ dependencies = [ [[package]] name = "gtk4" -version = "0.7.3" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aeb51aa3e9728575a053e1f43543cd9992ac2477e1b186ad824fd4adfb70842" +checksum = "aa82753b8c26277e4af1446c70e35b19aad4fb794a7b143859e7eeb9a4025d83" dependencies = [ "cairo-rs", "field-offset", @@ -557,12 +619,12 @@ dependencies = [ [[package]] name = "gtk4-macros" -version = "0.7.2" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d57ec49cf9b657f69a05bca8027cff0a8dfd0c49e812be026fc7311f2163832f" +checksum = "40300bf071d2fcd4c94eacc09e84ec6fe73129d2ceb635cf7e55b026b5443567" dependencies = [ "anyhow", - "proc-macro-crate 1.3.1", + "proc-macro-crate", "proc-macro-error", "proc-macro2", "quote", @@ -571,9 +633,9 @@ dependencies = [ [[package]] name = "gtk4-sys" -version = "0.7.3" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54d8c4aa23638ce9faa2caf7e2a27d4a1295af2155c8e8d28c4d4eeca7a65eb8" +checksum = "0db1b104138f087ccdc81d2c332de5dd049b89de3d384437cc1093b17cd2da18" dependencies = [ "cairo-sys-rs", "gdk-pixbuf-sys", @@ -590,9 +652,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.14.2" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f93e7192158dbcda357bdec5fb5788eebf8bbac027f3f33e719d29135ae84156" +checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" [[package]] name = "heck" @@ -600,19 +662,13 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" -[[package]] -name = "hermit-abi" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7" - [[package]] name = "home" -version = "0.5.5" +version = "0.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5444c27eef6923071f7ebcc33e3444508466a76f7a2b93da00ed6e19f30c1ddb" +checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" dependencies = [ - "windows-sys 0.48.0", + "windows-sys", ] [[package]] @@ -623,9 +679,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "iana-time-zone" -version = "0.1.58" +version = "0.1.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8326b86b6cff230b97d0d312a6c40a60726df3332e721f72a1b035f451663b20" +checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" dependencies = [ "android_system_properties", "core-foundation-sys", @@ -646,9 +702,9 @@ dependencies = [ [[package]] name = "idna" -version = "0.4.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" +checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" dependencies = [ "unicode-bidi", "unicode-normalization", @@ -656,36 +712,25 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.1.0" +version = "2.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" +checksum = "7b0b929d511467233429c45a44ac1dcaa21ba0f5ba11e4879e6ed28ddb4f9df4" dependencies = [ "equivalent", "hashbrown", ] -[[package]] -name = "is-terminal" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" -dependencies = [ - "hermit-abi", - "rustix", - "windows-sys 0.48.0", -] - [[package]] name = "itoa" -version = "1.0.9" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" +checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" [[package]] name = "js-sys" -version = "0.3.65" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54c0c35952f67de54bb584e9fd912b3023117cbafc0a77d8f3dee1fb5f572fe8" +checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" dependencies = [ "wasm-bindgen", ] @@ -698,27 +743,27 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.149" +version = "0.2.153" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a08173bc88b7955d1b3145aa561539096c421ac8debde8cbc3612ec635fee29b" +checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" [[package]] name = "linux-raw-sys" -version = "0.4.10" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da2479e8c062e40bf0066ffa0bc823de0a9368974af99c9f6df941d2c231e03f" +checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" [[package]] name = "log" -version = "0.4.20" +version = "0.4.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" +checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" [[package]] name = "memchr" -version = "2.6.4" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" +checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" [[package]] name = "memoffset" @@ -731,9 +776,9 @@ dependencies = [ [[package]] name = "miniz_oxide" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" +checksum = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7" dependencies = [ "adler", ] @@ -749,39 +794,50 @@ dependencies = [ "libc", ] +[[package]] +name = "nix" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab2156c4fce2f8df6c499cc1c763e4394b7482525bf2a9701c9d79d215f519e4" +dependencies = [ + "bitflags", + "cfg-if", + "cfg_aliases", + "libc", +] + [[package]] name = "num-traits" -version = "0.2.17" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" +checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a" dependencies = [ "autocfg", ] [[package]] name = "once_cell" -version = "1.18.0" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] name = "pango" -version = "0.18.3" +version = "0.19.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ca27ec1eb0457ab26f3036ea52229edbdb74dee1edd29063f5b9b010e7ebee4" +checksum = "7809e8af4df8d024a066106b72ca6bc7253a484ae3867041a96103ef8a13188d" dependencies = [ "gio", "glib", "libc", - "once_cell", "pango-sys", ] [[package]] name = "pango-sys" -version = "0.18.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "436737e391a843e5933d6d9aa102cb126d501e815b83601365a948a518555dc5" +checksum = "f52ef6a881c19fbfe3b1484df5cad411acaaba29dbec843941c3110d19f340ea" dependencies = [ "glib-sys", "gobject-sys", @@ -791,9 +847,9 @@ dependencies = [ [[package]] name = "percent-encoding" -version = "2.3.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pin-project-lite" @@ -809,27 +865,17 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "pkg-config" -version = "0.3.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" - -[[package]] -name = "proc-macro-crate" -version = "1.3.1" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" -dependencies = [ - "once_cell", - "toml_edit 0.19.15", -] +checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" [[package]] name = "proc-macro-crate" -version = "2.0.0" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e8366a6159044a37876a2b9817124296703c586a5c92e2c53751fa06d8d43e8" +checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" dependencies = [ - "toml_edit 0.20.7", + "toml_edit 0.21.1", ] [[package]] @@ -858,9 +904,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.74" +version = "1.0.78" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2de98502f212cfcea8d0bb305bd0f49d7ebdd75b64ba0a68f937d888f4e0d6db" +checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" dependencies = [ "unicode-ident", ] @@ -876,9 +922,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.10.2" +version = "1.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" +checksum = "b62dbe01f0b06f9d8dc7d49e05a0785f153b00b2c227856282f671e0318c9b15" dependencies = [ "aho-corasick", "memchr", @@ -888,9 +934,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.3" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" +checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" dependencies = [ "aho-corasick", "memchr", @@ -905,16 +951,17 @@ checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" [[package]] name = "ring" -version = "0.17.5" +version = "0.17.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb0205304757e5d899b9c2e448b867ffd03ae7f988002e47cd24954391394d0b" +checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" dependencies = [ "cc", + "cfg-if", "getrandom", "libc", "spin", "untrusted", - "windows-sys 0.48.0", + "windows-sys", ] [[package]] @@ -928,86 +975,85 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.21" +version = "0.38.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b426b0506e5d50a7d8dafcf2e81471400deb602392c7dd110815afb4eaf02a3" +checksum = "6ea3e1a662af26cd7a3ba09c0297a31af215563ecf42817c98df621387f4e949" dependencies = [ "bitflags", "errno", "libc", "linux-raw-sys", - "windows-sys 0.48.0", + "windows-sys", ] [[package]] name = "rustls" -version = "0.21.8" +version = "0.22.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "446e14c5cda4f3f30fe71863c34ec70f5ac79d6087097ad0bb433e1be5edf04c" +checksum = "e87c9956bd9807afa1f77e0f7594af32566e830e088a5576d27c5b6f30f49d41" dependencies = [ "log", "ring", + "rustls-pki-types", "rustls-webpki", - "sct", + "subtle", + "zeroize", ] +[[package]] +name = "rustls-pki-types" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ede67b28608b4c60685c7d54122d4400d90f62b40caee7700e700380a390fa8" + [[package]] name = "rustls-webpki" -version = "0.101.7" +version = "0.102.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" +checksum = "faaa0a62740bedb9b2ef5afa303da42764c012f743917351dc9a237ea1663610" dependencies = [ "ring", + "rustls-pki-types", "untrusted", ] [[package]] name = "ryu" -version = "1.0.15" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" - -[[package]] -name = "sct" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" -dependencies = [ - "ring", - "untrusted", -] +checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1" [[package]] name = "semver" -version = "1.0.20" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "836fa6a3e1e547f9a2c4040802ec865b5d85f4014efe00555d7090a3dcaa1090" +checksum = "92d43fe69e652f3df9bdc2b85b2854a0825b86e4fb76bc44d945137d053639ca" [[package]] name = "serde" -version = "1.0.195" +version = "1.0.197" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63261df402c67811e9ac6def069e4786148c4563f4b50fd4bf30aa370d626b02" +checksum = "3fb1c873e1b9b056a4dc4c0c198b24c3ffa059243875552b2bd0933b1aee4ce2" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.195" +version = "1.0.197" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46fe8f8603d81ba86327b23a2e9cdf49e1255fb94a4c5f297f6ee0547178ea2c" +checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.46", + "syn 2.0.52", ] [[package]] name = "serde_json" -version = "1.0.111" +version = "1.0.114" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "176e46fa42316f18edd598015a5166857fc835ec732f5215eac6b7bdbf0a84f4" +checksum = "c5f09b1bd632ef549eaa9f60a1f8de742bdbc698e6cee2095fc84dde5f549ae0" dependencies = [ "itoa", "ryu", @@ -1016,9 +1062,9 @@ dependencies = [ [[package]] name = "serde_spanned" -version = "0.6.4" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12022b835073e5b11e90a14f86838ceb1c8fb0325b72416845c487ac0fa95e80" +checksum = "eb3622f419d1296904700073ea6cc23ad690adbd66f13ea683df73298736f0c1" dependencies = [ "serde", ] @@ -1034,9 +1080,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.11.1" +version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "942b4a808e05215192e39f4ab80813e599068285906cc91aa64f923db842bd5a" +checksum = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7" [[package]] name = "spin" @@ -1044,6 +1090,12 @@ version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" +[[package]] +name = "subtle" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" + [[package]] name = "sudo" version = "0.6.0" @@ -1067,9 +1119,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.46" +version = "2.0.52" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89456b690ff72fddcecf231caedbe615c59480c93358a93dfae7fc29e3ebbf0e" +checksum = "b699d15b36d1f02c3e7c69f8ffef53de37aefae075d8488d4ba1a7788d574a07" dependencies = [ "proc-macro2", "quote", @@ -1091,37 +1143,28 @@ dependencies = [ [[package]] name = "target-lexicon" -version = "0.12.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14c39fd04924ca3a864207c66fc2cd7d22d7c016007f9ce846cbb9326331930a" - -[[package]] -name = "termcolor" -version = "1.3.0" +version = "0.12.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6093bad37da69aab9d123a8091e4be0aa4a03e4d601ec641c327398315f62b64" -dependencies = [ - "winapi-util", -] +checksum = "e1fc403891a21bcfb7c37834ba66a547a8f402146eba7265b5a6d88059c9ff2f" [[package]] name = "thiserror" -version = "1.0.50" +version = "1.0.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9a7210f5c9a7156bb50aa36aed4c95afb51df0df00713949448cf9e97d382d2" +checksum = "1e45bcbe8ed29775f228095caf2cd67af7a4ccf756ebff23a306bf3e8b47b24b" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.50" +version = "1.0.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8" +checksum = "a953cb265bef375dae3de6663da4d3804eee9682ea80d8e2542529b73c531c81" dependencies = [ "proc-macro2", "quote", - "syn 2.0.46", + "syn 2.0.52", ] [[package]] @@ -1141,14 +1184,14 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "toml" -version = "0.8.8" +version = "0.8.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1a195ec8c9da26928f773888e0742ca3ca1040c6cd859c919c9f59c1954ab35" +checksum = "9a9aad4a3066010876e8dcf5a8a06e70a558751117a145c6ce2b82c2e2054290" dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit 0.21.0", + "toml_edit 0.22.6", ] [[package]] @@ -1162,44 +1205,33 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.19.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" -dependencies = [ - "indexmap", - "toml_datetime", - "winnow", -] - -[[package]] -name = "toml_edit" -version = "0.20.7" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70f427fce4d84c72b5b732388bf4a9f4531b53f74e2887e3ecb2481f68f66d81" +checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" dependencies = [ "indexmap", "toml_datetime", - "winnow", + "winnow 0.5.40", ] [[package]] name = "toml_edit" -version = "0.21.0" +version = "0.22.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d34d383cd00a163b4a5b85053df514d45bc330f6de7737edfe0a93311d1eaa03" +checksum = "2c1b5fd4128cc8d3e0cb74d4ed9a9cc7c7284becd4df68f5f940e1ad123606f6" dependencies = [ "indexmap", "serde", "serde_spanned", "toml_datetime", - "winnow", + "winnow 0.6.5", ] [[package]] name = "unicode-bidi" -version = "0.3.13" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" +checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" [[package]] name = "unicode-ident" @@ -1209,9 +1241,9 @@ checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] name = "unicode-normalization" -version = "0.1.22" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" +checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" dependencies = [ "tinyvec", ] @@ -1224,15 +1256,16 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "ureq" -version = "2.9.1" +version = "2.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8cdd25c339e200129fe4de81451814e5228c9b771d57378817d6117cc2b3f97" +checksum = "11f214ce18d8b2cbe84ed3aa6486ed3f5b285cf8d8fbdbce9f3f767a724adc35" dependencies = [ "base64", "flate2", "log", "once_cell", "rustls", + "rustls-pki-types", "rustls-webpki", "serde", "serde_json", @@ -1242,15 +1275,21 @@ dependencies = [ [[package]] name = "url" -version = "2.4.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "143b538f18257fac9cad154828a57c6bf5157e1aa604d4816b5995bf6de87ae5" +checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" dependencies = [ "form_urlencoded", "idna", "percent-encoding", ] +[[package]] +name = "utf8parse" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" + [[package]] name = "version-compare" version = "0.1.1" @@ -1271,9 +1310,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.88" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7daec296f25a1bae309c0cd5c29c4b260e510e6d813c286b19eaadf409d40fce" +checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -1281,24 +1320,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.88" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e397f4664c0e4e428e8313a469aaa58310d302159845980fd23b0f22a847f217" +checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.46", + "syn 2.0.52", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.88" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5961017b3b08ad5f3fe39f1e79877f8ee7c23c5e5fd5eb80de95abc41f1f16b2" +checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -1306,89 +1345,52 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.88" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5353b8dab669f5e10f5bd76df26a9360c748f054f862ff5f3f8aae0c7fb3907" +checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.46", + "syn 2.0.52", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.88" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d046c5d029ba91a1ed14da14dca44b68bf2f124cfbaf741c54151fdb3e0750b" +checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" [[package]] name = "webpki-roots" -version = "0.25.2" +version = "0.26.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14247bb57be4f377dfb94c72830b8ce8fc6beac03cf4bf7b9732eadd414123fc" +checksum = "b3de34ae270483955a94f4b21bdaaeb83d508bb84a01435f393818edb0012009" +dependencies = [ + "rustls-pki-types", +] [[package]] name = "which" -version = "5.0.0" +version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bf3ea8596f3a0dd5980b46430f2058dfe2c36a27ccfbb1845d6fbfcd9ba6e14" +checksum = "7fa5e0c10bf77f44aac573e498d1a82d5fbd5e91f6fc0a99e7be4b38e85e101c" dependencies = [ "either", "home", "once_cell", "rustix", - "windows-sys 0.48.0", + "windows-sys", ] -[[package]] -name = "winapi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - -[[package]] -name = "winapi-util" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" -dependencies = [ - "winapi", -] - -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" - [[package]] name = "windows-core" -version = "0.51.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1f8cf84f35d2db49a46868f947758c7a1138116f7fac3bc844f43ade1292e64" -dependencies = [ - "windows-targets 0.48.5", -] - -[[package]] -name = "windows-sys" -version = "0.48.0" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-targets 0.48.5", + "windows-targets", ] [[package]] @@ -1397,128 +1399,86 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.0", -] - -[[package]] -name = "windows-targets" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" -dependencies = [ - "windows_aarch64_gnullvm 0.48.5", - "windows_aarch64_msvc 0.48.5", - "windows_i686_gnu 0.48.5", - "windows_i686_msvc 0.48.5", - "windows_x86_64_gnu 0.48.5", - "windows_x86_64_gnullvm 0.48.5", - "windows_x86_64_msvc 0.48.5", + "windows-targets", ] [[package]] name = "windows-targets" -version = "0.52.0" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" +checksum = "7dd37b7e5ab9018759f893a1952c9420d060016fc19a472b4bb20d1bdd694d1b" dependencies = [ - "windows_aarch64_gnullvm 0.52.0", - "windows_aarch64_msvc 0.52.0", - "windows_i686_gnu 0.52.0", - "windows_i686_msvc 0.52.0", - "windows_x86_64_gnu 0.52.0", - "windows_x86_64_gnullvm 0.52.0", - "windows_x86_64_msvc 0.52.0", + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", ] [[package]] name = "windows_aarch64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.48.5" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" +checksum = "bcf46cf4c365c6f2d1cc93ce535f2c8b244591df96ceee75d8e83deb70a9cac9" [[package]] name = "windows_aarch64_msvc" -version = "0.52.0" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" +checksum = "da9f259dd3bcf6990b55bffd094c4f7235817ba4ceebde8e6d11cd0c5633b675" [[package]] name = "windows_i686_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" - -[[package]] -name = "windows_i686_gnu" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" - -[[package]] -name = "windows_i686_msvc" -version = "0.48.5" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" +checksum = "b474d8268f99e0995f25b9f095bc7434632601028cf86590aea5c8a5cb7801d3" [[package]] name = "windows_i686_msvc" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.48.5" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" +checksum = "1515e9a29e5bed743cb4415a9ecf5dfca648ce85ee42e15873c3cd8610ff8e02" [[package]] name = "windows_x86_64_gnu" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.48.5" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" +checksum = "5eee091590e89cc02ad514ffe3ead9eb6b660aedca2183455434b93546371a03" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.0" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" +checksum = "77ca79f2451b49fa9e2af39f0747fe999fcda4f5e241b2898624dca97a1f2177" [[package]] name = "windows_x86_64_msvc" -version = "0.48.5" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" +checksum = "32b752e52a2da0ddfbdbcc6fceadfeede4c939ed16d13e648833a61dfb611ed8" [[package]] -name = "windows_x86_64_msvc" -version = "0.52.0" +name = "winnow" +version = "0.5.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" +checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" +dependencies = [ + "memchr", +] [[package]] name = "winnow" -version = "0.5.18" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "176b6138793677221d420fd2f0aeeced263f197688b36484660da767bca2fa32" +checksum = "dffa400e67ed5a4dd237983829e66475f0a4a26938c4b04c21baede6262215b8" dependencies = [ "memchr", ] + +[[package]] +name = "zeroize" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" diff --git a/Cargo.toml b/Cargo.toml index f0a09f4..f10d8eb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "airgorah" -version = "0.7.0" +version = "0.7.1" edition = "2021" license = "MIT" description = "A WiFi auditing software that can perform deauth attacks and passwords cracking" @@ -10,26 +10,26 @@ repository = "https://github.com/martin-olivier/airgorah" documentation = "https://github.com/martin-olivier/airgorah/wiki" keywords = ["networking", "pentest", "aircrack-ng", "gui", "linux"] readme = "README.md" -exclude = ["/.github", "/docker"] +exclude = ["/.github", "/.fpm", "/Dockerfile"] [dependencies] -gtk4 = { version = "0.7.3", features = ["v4_6"] } -glib = "0.18.5" -serde = { version = "1.0.195", features = ["derive"] } -serde_json = "1.0.111" -toml = "0.8.8" -csv = "1.3.0" -sudo = "0.6.0" -ctrlc = "3.4.2" -regex = "1.10.2" -chrono = "0.4.31" -lazy_static = "1.4.0" -ureq = { version = "2.9.1", features = ["json"] } -which = "5.0.0" -log = "0.4.20" -env_logger = "0.10.1" -nix = "0.27.1" +gtk4 = { version = "0.8", features = ["v4_6"] } +glib = "0.19" +serde = { version = "1", features = ["derive"] } +serde_json = "1" +toml = "0.8" +csv = "1.3" +which = "6" +sudo = "0.6" +ctrlc = "3.4" +regex = "1.10" +chrono = "0.4" +lazy_static = "1" +nix = { version = "0.28", features = ["signal"] } +ureq = { version = "2.9", features = ["json"] } +log = "0.4" +env_logger = "0.11" [build-dependencies] -serde = { version = "1.0.195", features = ["derive"] } -csv = "1.3.0" +serde = { version = "1", features = ["derive"] } +csv = "1" diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..edaec99 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,31 @@ +FROM rust:1.75.0-slim-bookworm + +# Fetch package list +RUN apt update + +# Install build dependencies +RUN apt install -y build-essential libgtk-4-dev libglib2.0-dev + +# Install packaging tools +RUN apt install -y ruby ruby-dev rubygems rpm zstd libarchive-tools + +# Install fpm +RUN gem install fpm + +# Install rustup components +RUN rustup component add clippy +RUN rustup component add rustfmt + +##### Commands ##### + +WORKDIR /workspace + +ENV DEBIAN_DEPS="--depends policykit-1 --depends libgtk-4-1 --depends dbus-x11 --depends wireshark-common --depends iproute2 --depends mdk4 --depends crunch" +ENV REDHAT_DEPS="--depends polkit --depends gtk4-devel --depends dbus-x11 --depends wireshark-cli --depends iproute" +ENV ARCHLINUX_DEPS="--depends polkit --depends gtk4 --depends dbus --depends wireshark-cli --depends iproute2 --depends mdk4" + +# Build and package the project +CMD cargo build --release && \ + fpm -f -t deb -p airgorah_`arch`.deb -a native $DEBIAN_DEPS && \ + fpm -f -t rpm -p airgorah_`arch`.rpm -a native $REDHAT_DEPS && \ + fpm -f -t pacman -p airgorah_`arch`.pkg.tar.zst -a native $ARCHLINUX_DEPS diff --git a/LICENSE b/LICENSE index 6000446..bc849df 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2023 Martin Olivier +Copyright (c) 2024 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 @@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +SOFTWARE. \ No newline at end of file diff --git a/docker/amd64_builder.Dockerfile b/docker/amd64_builder.Dockerfile deleted file mode 100644 index 43cbf86..0000000 --- a/docker/amd64_builder.Dockerfile +++ /dev/null @@ -1,5 +0,0 @@ -FROM amd64/rust:slim-bookworm - -WORKDIR /workspace - -RUN apt update && apt install -y build-essential libgtk-4-dev libglib2.0-dev diff --git a/docker/arm64_builder.Dockerfile b/docker/arm64_builder.Dockerfile deleted file mode 100644 index 4ee440d..0000000 --- a/docker/arm64_builder.Dockerfile +++ /dev/null @@ -1,5 +0,0 @@ -FROM arm64v8/rust:slim-bookworm - -WORKDIR /workspace - -RUN apt update && apt install -y build-essential libgtk-4-dev libglib2.0-dev diff --git a/src/backend/app.rs b/src/backend/app.rs index 1ada350..ed2b6ef 100755 --- a/src/backend/app.rs +++ b/src/backend/app.rs @@ -20,7 +20,6 @@ pub fn app_setup() -> Result<(), Error> { check_required_dependencies(&[ "sh", - "systemctl", "ip", "iw", "awk", diff --git a/src/backend/decrypt.rs b/src/backend/decrypt.rs index d0db4e6..2b8502b 100755 --- a/src/backend/decrypt.rs +++ b/src/backend/decrypt.rs @@ -22,7 +22,7 @@ pub fn build_terminal(title: String, command: String) -> Result "-T", &title, "-e", - &command, + &format!("sh -c \"{}\"", command), ]); Ok(process) } else if has_dependency("gnome-terminal") { @@ -35,7 +35,7 @@ pub fn build_terminal(title: String, command: String) -> Result "--", "sh", "-c", - &(command + " ; exec sh"), + &format!("{} ; exec sh", command), ]); Ok(process) } else if has_dependency("konsole") { @@ -46,7 +46,7 @@ pub fn build_terminal(title: String, command: String) -> Result "--hide-tabbar", "--hold", "-p", - &("title=".to_owned() + &title), + &format!("title={}", title), "-e", "sh", "-c", @@ -111,7 +111,7 @@ pub fn run_decrypt_bruteforce_process( ); let title = format!("Handshake Decryption ({})", essid); let cmd = format!( - "sh -c \"crunch 8 64 '{}' | aircrack-ng -w - -b '{}' '{}'\"", + "crunch 8 64 '{}' | aircrack-ng -w - -b '{}' '{}'", charset, bssid, handshake ); diff --git a/src/backend/interface.rs b/src/backend/interface.rs index 770fec7..9750d2e 100644 --- a/src/backend/interface.rs +++ b/src/backend/interface.rs @@ -1,7 +1,7 @@ use super::*; use crate::error::Error; use crate::globals::*; -use std::process::Command; +use std::process::{Command, Stdio}; /// Get the available interfaces pub fn get_interfaces() -> Result, Error> { @@ -124,12 +124,19 @@ pub fn enable_monitor_mode(iface: &str) -> Result { } let old_interface_list = get_interfaces()?; - let enable_monitor_cmd = Command::new("airmon-ng").args(["start", iface]).output()?; + + let yes_pipe = Command::new("yes").stdout(Stdio::piped()).spawn()?; + let enable_monitor_cmd = Command::new("airmon-ng") + .args(["start", iface]) + .stdin(yes_pipe.stdout.unwrap()) + .output()?; if !enable_monitor_cmd.status.success() { return Err(Error::new(&format!( - "Could not enable monitor mode on \"{}\"", - iface + "Could not enable monitor mode on '{}':\n{}", + iface, + String::from_utf8(enable_monitor_cmd.stdout) + .unwrap_or("Invalid output returned by airmon-ng".to_string()) ))); } @@ -142,7 +149,12 @@ pub fn enable_monitor_mode(iface: &str) -> Result { match is_monitor_mode(&(iface.to_string() + "mon")) { Ok(res) => match res { true => Ok(iface.to_string() + "mon"), - false => Err(Error::new("Interface is still in managed mode")), + false => Err(Error::new(&format!( + "Could not enable monitor mode on '{}':\n{}", + iface, + String::from_utf8(enable_monitor_cmd.stdout) + .unwrap_or("Invalid output returned by airmon-ng".to_string()) + ))), }, Err(_) => { let new_interface_list = get_interfaces()?; @@ -153,9 +165,12 @@ pub fn enable_monitor_mode(iface: &str) -> Result { } } - Err(Error::new( - &format!("Monitor mode has been enabled on \"{}\", but the new interface name could not been found", iface) - )) + Err(Error::new(&format!( + "Could not enable monitor mode on '{}':\n{}", + iface, + String::from_utf8(enable_monitor_cmd.stdout) + .unwrap_or("Invalid output returned by airmon-ng".to_string()) + ))) } } } @@ -196,12 +211,52 @@ pub fn set_iface(iface: String) { IFACE.lock().unwrap().replace(iface); } +/// List of services that can interfere with the app on the management of wireless cards +const INTERFERENCE_SERVICES: [&str; 19] = [ + "wpa_action", + "wpa_supplicant", + "wpa_cli", + "dhclient", + "ifplugd", + "dhcdbd", + "dhcpcd", + "udhcpc", + "NetworkManager", + "knetworkmanager", + "avahi-autoipd", + "avahi-daemon", + "wlassistant", + "wifibox", + "net_applet", + "wicd-daemon", + "wicd-client", + "iwd", + "hostapd", +]; + /// Kill the network manager to avoid channel hopping conflicts pub fn kill_network_manager() -> Result<(), Error> { if get_settings().kill_network_manager { - Command::new("airmon-ng").args(["check", "kill"]).output()?; + if !has_dependency("systemctl") { + return Err(Error::new("systemctl is required to kill network managers")); + } + + for service in INTERFERENCE_SERVICES { + let is_service_running = Command::new("systemctl") + .args(["is-active", service]) + .output()?; - log::warn!("network manager killed"); + if is_service_running.status.success() { + Command::new("systemctl").args(["stop", service]).output()?; + + SERVICES_TO_RESTORE + .lock() + .unwrap() + .push(service.to_string()); + + log::warn!("killed '{}'", service); + } + } } Ok(()) @@ -213,17 +268,21 @@ pub fn restore_network_manager() -> Result<(), Error> { return Ok(()); } - Command::new("systemctl") - .args(["restart", "NetworkManager"]) - .output()?; - Command::new("systemctl") - .args(["restart", "network-manager"]) - .output()?; - Command::new("systemctl") - .args(["restart", "wpa-supplicant"]) - .output()?; + if !has_dependency("systemctl") { + return Err(Error::new( + "systemctl is required to restore network managers", + )); + }; + + let services_to_restore: Vec<_> = SERVICES_TO_RESTORE.lock().unwrap().drain(..).collect(); - log::warn!("network manager restored"); + for service in services_to_restore { + Command::new("systemctl") + .args(["start", &service]) + .output()?; + + log::warn!("restored '{}'", service); + } Ok(()) } diff --git a/src/backend/mod.rs b/src/backend/mod.rs index 9f9efeb..e733b90 100755 --- a/src/backend/mod.rs +++ b/src/backend/mod.rs @@ -5,6 +5,7 @@ pub mod decrypt; pub mod interface; pub mod scan; pub mod settings; +pub mod vendors; pub use app::*; pub use capture::*; @@ -13,3 +14,4 @@ pub use decrypt::*; pub use interface::*; pub use scan::*; pub use settings::*; +pub use vendors::*; diff --git a/src/backend/scan.rs b/src/backend/scan.rs index d5476b7..d87fd3b 100644 --- a/src/backend/scan.rs +++ b/src/backend/scan.rs @@ -13,8 +13,6 @@ use serde::Deserialize; use nix::sys::signal::{kill, Signal}; use nix::unistd::Pid; -include!(concat!(env!("OUT_DIR"), "/vendors.rs")); - /// Represents the AP section of the csv file generated by airodump #[derive(Debug, Deserialize)] struct RawAP { @@ -327,25 +325,7 @@ pub fn get_airodump_data() -> HashMap { for result in cli_reader.deserialize::().flatten() { if let Some(ap) = aps.get_mut(result.bssid.trim_start()) { let mac = result.station_mac.trim_start().to_string(); - let client_vendor = match ap.clients.get(&mac) { - Some(cli) => cli.vendor.clone(), - None => { - let mut mac_to_find = mac[..13].to_string(); - let mut vendor = String::from("Unknown"); - - while !mac_to_find.is_empty() { - if let Some(item) = VENDORS.get(mac_to_find.as_str()) { - vendor = item.to_string(); - - break; - } - - mac_to_find.pop(); - } - - vendor - } - }; + let client_vendor = super::find_vendor(&mac); ap.clients.insert( mac.clone(), diff --git a/src/backend/settings.rs b/src/backend/settings.rs index e71f072..7359f20 100644 --- a/src/backend/settings.rs +++ b/src/backend/settings.rs @@ -7,21 +7,29 @@ use std::path::Path; pub fn load_settings() { if Path::new(CONFIG_PATH).exists() { let config = std::fs::read_to_string(CONFIG_PATH).unwrap_or_default(); - let settings: Settings = toml::from_str(&config).unwrap_or_default(); + let mut settings: Settings = toml::from_str(&config).unwrap_or_default(); - log::debug!("settings loaded from \"{}\"", CONFIG_PATH); + if settings.kill_network_manager && !super::has_dependency("systemctl") { + settings.kill_network_manager = false; + } + + log::debug!("settings loaded from '{}'", CONFIG_PATH); *SETTINGS.lock().unwrap() = settings; } } /// Save settings to the config file -pub fn save_settings(settings: Settings) { +pub fn save_settings(mut settings: Settings) { + if settings.kill_network_manager && !super::has_dependency("systemctl") { + settings.kill_network_manager = false; + } + if Path::new(CONFIG_PATH).exists() { if let Ok(toml_settings) = toml::to_string(&settings) { std::fs::write(CONFIG_PATH, toml_settings).ok(); - log::debug!("settings saved into \"{}\"", CONFIG_PATH); + log::debug!("settings saved into '{}'", CONFIG_PATH); } } *SETTINGS.lock().unwrap() = settings; diff --git a/src/backend/vendors.rs b/src/backend/vendors.rs new file mode 100644 index 0000000..927e50a --- /dev/null +++ b/src/backend/vendors.rs @@ -0,0 +1,38 @@ +use crate::globals::*; + +use std::collections::HashMap; + +include!(concat!(env!("OUT_DIR"), "/vendors.rs")); + +pub fn find_vendor(mac: &str) -> String { + let mut vendors = VENDORS_CACHE.lock().unwrap(); + + match vendors.get(mac) { + Some(vendor) => vendor.clone(), + None => { + vendors.insert(mac.to_string(), String::new()); + + String::new() + } + } +} + +pub fn update_vendors() { + let vendors_cache_copy = VENDORS_CACHE.lock().unwrap().clone(); + + for (mac, vendor) in vendors_cache_copy { + if vendor.is_empty() { + let mut mac_to_find = mac[..13].to_string(); + let mut vendor_name = String::from("Unknown"); + + while !mac_to_find.is_empty() { + if let Some(item) = VENDORS.get(mac_to_find.as_str()) { + vendor_name = item.to_string(); + break; + } + mac_to_find.pop(); + } + VENDORS_CACHE.lock().unwrap().insert(mac, vendor_name); + } + } +} diff --git a/src/frontend/connections/app.rs b/src/frontend/connections/app.rs index 2075e9f..0a44123 100755 --- a/src/frontend/connections/app.rs +++ b/src/frontend/connections/app.rs @@ -435,10 +435,19 @@ fn start_app_refresh(app_data: Rc) { fn start_handshake_refresh() { std::thread::spawn(|| loop { backend::update_handshakes().ok(); + std::thread::sleep(Duration::from_millis(1500)); }); } +fn start_vendor_refresh() { + std::thread::spawn(|| loop { + backend::update_vendors(); + + std::thread::sleep(Duration::from_millis(500)); + }); +} + fn start_update_checker() { globals::UPDATE_PROC .lock() @@ -564,7 +573,9 @@ pub fn connect(app_data: Rc) { connect_bottom_button(app_data.clone()); start_app_refresh(app_data.clone()); + start_handshake_refresh(); + start_vendor_refresh(); start_update_checker(); connect_hopping_button(app_data.clone()); diff --git a/src/frontend/connections/interface.rs b/src/frontend/connections/interface.rs index 585e163..f945d86 100644 --- a/src/frontend/connections/interface.rs +++ b/src/frontend/connections/interface.rs @@ -77,6 +77,19 @@ fn connect_interface_select(app_data: Rc) { backend::set_iface(res.clone()); app_data.app_gui.iface_label.set_text(&res); + app_data.app_gui.channel_filter_entry.set_sensitive(true); + + match backend::is_5ghz_supported(&iface).unwrap_or(false) { + true => { + app_data.app_gui.ghz_2_4_but.set_sensitive(true); + app_data.app_gui.ghz_5_but.set_sensitive(true); + app_data.app_gui.ghz_5_but.set_active(true); + } + false => app_data.app_gui.ghz_5_but.set_tooltip_text(Some( + "Your network card doesn't support 5 GHz" + )) + } + app_data.interface_gui.window.hide(); app_data.app_gui.scan_but.emit_clicked(); } diff --git a/src/frontend/connections/scan.rs b/src/frontend/connections/scan.rs index 19843a0..faa781b 100644 --- a/src/frontend/connections/scan.rs +++ b/src/frontend/connections/scan.rs @@ -215,7 +215,7 @@ pub fn connect_ghz_5_button(app_data: Rc) { ErrorDialog::spawn( &app_data.app_gui.window, "Error", - "Your network card doesn't support 5GHz", + "Your network card doesn't support 5 GHz", ); return this.set_active(false); } diff --git a/src/frontend/connections/settings.rs b/src/frontend/connections/settings.rs index 44e93d2..0eaf635 100644 --- a/src/frontend/connections/settings.rs +++ b/src/frontend/connections/settings.rs @@ -97,6 +97,17 @@ fn connect_save_but(app_data: Rc) { } pub fn connect(app_data: Rc) { + if !backend::has_dependency("systemctl") { + app_data + .settings_gui + .kill_network_manager + .set_sensitive(false); + app_data + .settings_gui + .kill_network_manager + .set_tooltip_text(Some("'systemd' is required to enable this option")); + } + connect_controller(app_data.clone()); connect_random_mac_button(app_data.clone()); diff --git a/src/frontend/interfaces/app.rs b/src/frontend/interfaces/app.rs index 04d259c..b08ad20 100755 --- a/src/frontend/interfaces/app.rs +++ b/src/frontend/interfaces/app.rs @@ -335,14 +335,23 @@ impl AppGui { // Scan filters - let ghz_2_4_but = CheckButton::builder().active(true).label("2.4 GHz").build(); - let ghz_5_but = CheckButton::builder().active(false).label("5 GHz").build(); + let ghz_2_4_but = CheckButton::builder() + .active(true) + .sensitive(false) + .label("2.4 GHz") + .build(); + let ghz_5_but = CheckButton::builder() + .active(false) + .sensitive(false) + .label("5 GHz") + .build(); // Channel let channel_filter_entry = Entry::builder() .placeholder_text("Channel (ex: 1,6,11)") .hexpand(true) + .sensitive(false) .build(); let css_provider = CssProvider::new(); diff --git a/src/frontend/interfaces/settings.rs b/src/frontend/interfaces/settings.rs index fd48d24..b542fcf 100644 --- a/src/frontend/interfaces/settings.rs +++ b/src/frontend/interfaces/settings.rs @@ -58,7 +58,7 @@ impl SettingsGui { let display_frame = Frame::new(Some("Display")); display_frame.set_child(Some(&display_hidden_ap)); - let kill_network_manager = CheckButton::with_label("Kill NetworkManager"); + let kill_network_manager = CheckButton::with_label("Kill network managers"); kill_network_manager.set_active(true); let process_frame = Frame::new(Some("Process")); diff --git a/src/frontend/widgets/icon_text_button.rs b/src/frontend/widgets/icon_text_button.rs deleted file mode 100644 index 3a1982c..0000000 --- a/src/frontend/widgets/icon_text_button.rs +++ /dev/null @@ -1,71 +0,0 @@ -#![allow(unused)] - -use gtk4::gdk_pixbuf::Pixbuf; -use gtk4::prelude::*; -use gtk4::*; -use std::io::BufReader; - -pub struct IconTextButton { - pub handle: Button, - image: Image, - label: Label, -} - -impl IconTextButton { - pub fn new(icon: &'static [u8], text: &str) -> Self { - let but_box = Box::new(Orientation::Horizontal, 6); - but_box.set_halign(Align::Center); - - let pixbuf = Pixbuf::from_read(BufReader::new(icon)).unwrap(); - let image = Image::from_pixbuf(Some(&pixbuf)); - let label = Label::with_mnemonic(text); - - but_box.append(&image); - but_box.append(&label); - - let handle = Button::builder().child(&but_box).build(); - - Self { - handle, - image, - label, - } - } - - pub fn set_tooltip_text(&self, text: Option<&str>) { - self.handle.set_tooltip_text(text) - } - - pub fn set_sensitive(&self, sensitive: bool) { - self.handle.set_sensitive(sensitive) - } - - pub fn set_label(&self, label: &str) { - self.label.set_label(label) - } - - pub fn set_icon(&self, icon: &'static [u8]) { - let pixbuf = Pixbuf::from_read(BufReader::new(icon)).unwrap(); - self.image.set_from_pixbuf(Some(&pixbuf)) - } - - pub fn connect_clicked(&self, f: F) -> glib::SignalHandlerId { - self.handle.connect_clicked(f) - } - - pub fn set_margin_bottom(&self, margin_bottom: i32) { - self.handle.set_margin_bottom(margin_bottom) - } - - pub fn set_margin_end(&self, margin_end: i32) { - self.handle.set_margin_end(margin_end) - } - - pub fn set_margin_start(&self, margin_start: i32) { - self.handle.set_margin_start(margin_start) - } - - pub fn set_margin_top(&self, margin_top: i32) { - self.handle.set_margin_top(margin_top) - } -} diff --git a/src/frontend/widgets/mod.rs b/src/frontend/widgets/mod.rs index f4797b3..a3fb728 100644 --- a/src/frontend/widgets/mod.rs +++ b/src/frontend/widgets/mod.rs @@ -1,7 +1,5 @@ mod dialog; mod icon_button; -mod icon_text_button; pub use dialog::*; pub use icon_button::IconButton; -pub use icon_text_button::IconTextButton; diff --git a/src/globals.rs b/src/globals.rs index 5df1e58..c83f4c2 100644 --- a/src/globals.rs +++ b/src/globals.rs @@ -7,7 +7,7 @@ use std::sync::Mutex; use std::thread::JoinHandle; pub static APP_ID: &str = "com.molivier.airgorah"; -pub static VERSION: &str = "v0.7.0"; +pub static VERSION: &str = "v0.7.1"; pub static LIVE_SCAN_PATH: &str = "/tmp/airgorah_live_scan"; pub static OLD_SCAN_PATH: &str = "/tmp/airgorah_old_scan"; @@ -28,6 +28,8 @@ lazy_static! { pub static ref SCAN_PROC: Mutex> = Mutex::new(None); pub static ref APS: Mutex> = Mutex::new(HashMap::new()); pub static ref ATTACK_POOL: Mutex = Mutex::new(HashMap::new()); + pub static ref VENDORS_CACHE: Mutex> = Mutex::new(HashMap::new()); pub static ref SETTINGS: Mutex = Mutex::new(Settings::default()); pub static ref NEW_VERSION: Mutex> = Mutex::new(None); + pub static ref SERVICES_TO_RESTORE: Mutex> = Mutex::new(vec![]); } diff --git a/src/main.rs b/src/main.rs index 308f0af..198a293 100644 --- a/src/main.rs +++ b/src/main.rs @@ -8,7 +8,7 @@ mod globals; mod types; fn main() { - env_logger::init(); + env_logger::Builder::from_env(env_logger::Env::default().default_filter_or("info")).init(); gtk4::init().expect("Could not initialize gtk4");