I wanted to share my Extension Attribute that queries the serial from OmniGraffle Version 6 (Purchased directly, not through AppStore). I couldn't find one here, so might someone is interested:
#!/bin/bash
user=$(ls -l /dev/console | cut -d " " -f 4)
location=$(sudo -u $user echo $HOME)
if [ -d "$location/Library/Containers/com.omnigroup.OmniGraffle6" ]; then
sudo -u $user cp ~/Library/Containers/com.omnigroup.OmniGraffle6/Data/Library/Application Support/Omni Group/Software Licenses/OmniGraffle*.omnilicense /private/tmp/
result=`cat /private/tmp/OmniGraffle*.omnilicense | grep -A 1 Key | grep string | sed 's/<string>//g' | sed 's/</string>//g' | awk '{print $1}'`
rm -rf /private/tmp/OmniGraffle*.omnilicense
fi
echo "<result>$result</result>"