Skip to content

Commit

Permalink
Update pcap2.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
DaCHack authored Nov 15, 2024
1 parent a6f1118 commit dcce3b7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pcap2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,11 @@ if [[ "$resp" =~ \<SID\>(0+)\</SID\> ]]; then
FRITZ_PASSWORD=$(export LC_CTYPE=UTF-8 ; echo "${FRITZ_PASSWORD}" | tr $'\u0100-\U0010ffff' '.')

if which >/dev/null 2>&1 md5; then
MD5=$(echo -n "${CHALLENGE}-${FRITZBOX_PASSWORD}" | iconv --from-code=UTF-8 --to-code=UTF-16LE | md5)
# MD5=$(echo -n "${CHALLENGE}-${FRITZBOX_PASSWORD}" | iconv -f UTF-8 -t UTF-16LE | md5)
# MD5=$(echo -n "${CHALLENGE}-${FRITZBOX_PASSWORD}" | iconv --from-code=UTF-8 --to-code=UTF-16LE | md5)
MD5=$(echo -n "${CHALLENGE}-${FRITZBOX_PASSWORD}" | iconv -f UTF-8 -t UTF-16LE | md5)
elif which >/dev/null 2>&1 md5sum; then
MD5=$(echo -n "${CHALLENGE}-${FRITZBOX_PASSWORD}" | iconv --from-code=UTF-8 --to-code=UTF-16LE | md5sum | cut -f1 -d ' ')
# MD5=$(echo -n "${CHALLENGE}-${FRITZBOX_PASSWORD}" | iconv -f UTF-8 -t UTF-16LE | md5sum | cut -f1 -d ' ')
# MD5=$(echo -n "${CHALLENGE}-${FRITZBOX_PASSWORD}" | iconv --from-code=UTF-8 --to-code=UTF-16LE | md5sum | cut -f1 -d ' ')
MD5=$(echo -n "${CHALLENGE}-${FRITZBOX_PASSWORD}" | iconv -f UTF-8 -t UTF-16LE | md5sum | cut -f1 -d ' ')
else
echo 1>&2 "Error: neither 'md5' nor 'md5sum' are installed"
exit 1
Expand Down

0 comments on commit dcce3b7

Please sign in to comment.