Python licence checker
A Python script hides the flag in base64 pieces and a hash check.
A Nordvik vendor sent a “licence” as a Python script. They said it cannot be read because it is “compressed”. In reality there is only base64 and one SHA-256 hash.
ObjectiveRead the script, find the flag pieces, and reconstruct the value.
Useful tools
PythonText editorbase64uncompyle6 (optional)
Files
license.py
DownloadHints
Hint 1
Download
license.py and open it in a text editor. Look at the _PART_A and _PART_B variables. Both are base64 strings.Hint 2
Run the script with
python3 license.py to see “Access denied”. The unlock() function only returns the flag after the token hash matches, but the flag pieces are already in the source.Hint 3
Decode both strings and concatenate:
python3 -c "import base64;print(base64.b64decode('A...').decode()+base64.b64decode('B...').decode())". The result is the flag.