diff --git a/flake.lock b/flake.lock index 8c1762f..b400f0a 100644 --- a/flake.lock +++ b/flake.lock @@ -157,17 +157,17 @@ }, "nixpkgs-signal": { "locked": { - "lastModified": 1748124733, - "narHash": "sha256-y7OLqUkEb0Leg/eZCO5/AQh1u5byAnMEj13OMIJ6Uqo=", + "lastModified": 1760284886, + "narHash": "sha256-TK9Kr0BYBQ/1P5kAsnNQhmWWKgmZXwUQr4ZMjCzWf2c=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "4684fd6b0c01e4b7d99027a34c93c2e09ecafee2", + "rev": "cf3f5c4def3c7b5f1fc012b3d839575dbe552d43", "type": "github" }, "original": { "owner": "NixOS", "repo": "nixpkgs", - "rev": "4684fd6b0c01e4b7d99027a34c93c2e09ecafee2", + "rev": "cf3f5c4def3c7b5f1fc012b3d839575dbe552d43", "type": "github" } }, diff --git a/flake.nix b/flake.nix index 32df48f..2382dad 100644 --- a/flake.nix +++ b/flake.nix @@ -16,7 +16,10 @@ }; nixpkgs-clisp.url = "github:NixOS/nixpkgs/da320e5472f021b96a883f71fc525ca0e4815273"; - nixpkgs-signal.url = "github:NixOS/nixpkgs/4684fd6b0c01e4b7d99027a34c93c2e09ecafee2"; + + # pin only signal versions jake likes + # this ver includes triple ratchet + nixpkgs-signal.url = "github:NixOS/nixpkgs/cf3f5c4def3c7b5f1fc012b3d839575dbe552d43"; verus-flake.url = "github:JakeGinesin/verus-flake"; }; diff --git a/home/home.nix b/home/home.nix index 69634cb..53359b8 100644 --- a/home/home.nix +++ b/home/home.nix @@ -142,6 +142,7 @@ in { postman nuclei subfinder + hcxtools ] ++ ( with lib; let diff --git a/home/scripts/security/wpcap.sh b/home/scripts/security/wpcap.sh new file mode 100644 index 0000000..71247ba --- /dev/null +++ b/home/scripts/security/wpcap.sh @@ -0,0 +1,59 @@ +#!/bin/bash + +if [[ $EUID -ne 0 ]]; then + echo "This script must be run as root." + exit 1 +fi + +echo """ +██╗ ██╗██████╗ ██████╗ █████╗ ██████╗ +██║ ██║██╔══██╗██╔════╝██╔══██╗██╔══██╗ +██║ █╗ ██║██████╔╝██║ ███████║██████╔╝ +██║███╗██║██╔═══╝ ██║ ██╔══██║██╔═══╝ +╚███╔███╔╝██║ ╚██████╗██║ ██║██║ + ╚══╝╚══╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚═╝ +""" + +# if [ -z "$1" ]; then + # echo "Usage: sudo $0 " + # exit 1 +# fi + +INTERFACE=${1:-wlan0} +MON_INTERFACE="${INTERFACE}mon" +CAPTURE_PREFIX="caps" +HASH_FILE="hash.hc22000" + +trap 'echo -e "\nStopping monitor mode on ${MON_INTERFACE}..."; airmon-ng stop ${MON_INTERFACE} > /dev/null 2>&1;' EXIT + +echo "Starting monitor mode on ${INTERFACE}..." +airmon-ng start ${INTERFACE} > /dev/null 2>&1 + +echo -e "\nCapturing handshakes... Press Ctrl+C when you're done.\n" +airodump-ng --write ${CAPTURE_PREFIX} ${MON_INTERFACE} + +echo -e "\nLooking for the latest capture file..." +LATEST_CAP=$(ls -t ${CAPTURE_PREFIX}*.cap 2>/dev/null | head -n 1) + +if [ -z "${LATEST_CAP}" ]; then + echo "Error: No .cap file found. Exiting." + exit 1 +fi + +echo "Converting ${LATEST_CAP} to hash format..." +hcxpcapngtool -o ${HASH_FILE} ${LATEST_CAP} + +echo -e "\nConversion complete. Hash saved to ${HASH_FILE}." +echo "You can now run hashcat, e.g.: hashcat -m 22000 ${HASH_FILE} /path/to/wordlist.txt" + +read -p "Remove capture files (caps-*)? [y/N] " confirm + +if [[ "${confirm,,}" == "y" ]]; then + echo "Cleaning up files..." + rm -f caps-* + echo "Files removed." +else + echo "Keeping capture files." +fi + +echo "Script finished." diff --git a/system/services/printing.nix b/system/services/printing.nix new file mode 100644 index 0000000..80e56e8 --- /dev/null +++ b/system/services/printing.nix @@ -0,0 +1,22 @@ +{ + config, + pkgs, + ... +}: let + printer = "SCS-public"; +in { + services.printing.drivers = with pkgs; [foomatic-db-ppds]; + hardware.printers = { + ensureDefaultPrinter = printer; + # https://computing.cs.cmu.edu/desktop/printing-linux-private + ensurePrinters = [ + { + name = printer; + deviceUri = "lpd://jginesin@scs-print.srv.cs.cmu.edu/${printer}"; + model = + pkgs.foomatic-db-ppds.pname + + "/KONICA_MINOLTA-bizhub_360-Postscript-KONICA_MINOLTA.ppd.gz"; + } + ]; + }; +} diff --git a/system/services/services.nix b/system/services/services.nix index d103904..545329d 100644 --- a/system/services/services.nix +++ b/system/services/services.nix @@ -9,5 +9,6 @@ ./syncthing/default.nix # ./resolved/default.nix (not enabled, in favor of dnsmasq) ./dnsmasq/default.nix + ./printing.nix ]; }