Last active
August 9, 2017 17:57
-
-
Save vpzomtrrfrt/771df91c0a8f64626fc40ca7492f0b61 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
data=$(iconv -f UTF16LE $1 | tr -d '\r') | |
echo "LongTermKey" | |
echo "$data" | grep LTK | cut -d: -f 2 | tr -d ',' | tr '[:lower:]' '[:upper:]' | |
echo | |
echo "Rand" | |
printf 'ibase=16; %s\n' $(echo "$data" | grep ERand | cut -d: -f 2 | tac -s, | tr -d ',' | tr -d '[:space:]' | tr '[:lower:]' '[:upper:]') | bc | |
echo | |
echo "EDiv" | |
printf 'ibase=16; %s\n' $(echo "$data" | grep EDIV | cut -d: -f 2 | tr '[:lower:]' '[:upper:]') | bc | |
echo | |
echo "LocalSignatureKey" | |
echo "$data" | grep CSRK | cut -d: -f 2 | tr -d ',' | tr '[:lower:]' '[:upper:]' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment