Skip to content

Instantly share code, notes, and snippets.

@ret2src
Created February 9, 2023 12:46
Show Gist options
  • Save ret2src/b5d95637a711f93a3c47535977a65eae to your computer and use it in GitHub Desktop.
Save ret2src/b5d95637a711f93a3c47535977a65eae to your computer and use it in GitHub Desktop.
script to decode hashcat HEX[...] results
#!/usr/bin/env bash
# quick and dirty script to decode hashcat's "HEX[...]" results
# tested with German passwords, YMMV
# knowledge stolen from <https://sensepost.com/blog/2020/nthashes-and-encodings/>
if [ $# -eq 0 ]
then
echo "usage: ./dehex.sh FILE"
exit
fi
for x in $( cut -d\[ -f2 "${1}" | tr -d ] ); do
echo -n $x \
| xxd -ps -r \
| iconv -f cp1252 -t utf8
echo
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment