Created
June 2, 2021 20:43
-
-
Save SmugZombie/50bc0926646492c3bbb6ae624f6f5490 to your computer and use it in GitHub Desktop.
Hacky way that Allows checking validity of USM licences
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
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