Skip to content

Instantly share code, notes, and snippets.

@SmugZombie
Created June 2, 2021 20:43
Show Gist options
  • Save SmugZombie/50bc0926646492c3bbb6ae624f6f5490 to your computer and use it in GitHub Desktop.
Save SmugZombie/50bc0926646492c3bbb6ae624f6f5490 to your computer and use it in GitHub Desktop.
Hacky way that Allows checking validity of USM licences
licenseKey=$1
string="not validate your key"
response=$(curl --location --request POST -s 'https://offlineupdate.alienvault.com/cgi-bin/auth' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'next=/files/md5.txt' \
--data-urlencode 'key='$licenseKey)
#echo $response
#echo $string
if [[ "$response" == *"$string"* ]]; then
echo "INVALID"
else
echo "VALID"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment