Skip to content

Instantly share code, notes, and snippets.

@moddedBear
moddedBear / osx_extract_hash.py
Last active August 8, 2025 01:23 — forked from teddziuba/osx_extract_hash.py
Extract a Mac OSX Catalina user's password hash as a hashcat-compatible string
#!/usr/bin/env python3
"""
Mac OSX 10.7 Lion User Password Hash Extractor
Modified from https://gist.github.com/teddziuba/3ff08bdda120d1f7822f3baf52e606c2
Extracts a user's password hash from a plist file as a hashcat-compatible string.
Plist files can be found at `/var/db/dslocal/nodes/Default/users/{username}.plist`.
10.7 Lion stores passwords in SALTED-SHA512 format (hashcat type 1722).
@moddedBear
moddedBear / tofi-hyprland-window-switcher.sh
Created April 19, 2023 00:39
A small bash script to switch between open windows in Hyprland using the tofi menu.
#!/usr/bin/env bash
hyprctl clients -j | jq -r '.[] | [ .title, .class, .pid ] | join(" | ")' |
tofi --prompt-text="window: " |
awk '{print $NF}' | {
read -r id
hyprctl dispatch focuswindow pid:$id;
}