CIDADAXSEC CTF
← Back to CTF
Reverse EngineeringMedium250 points

JavaScript licence checker

A licence page checks the token in the browser and builds the flag from XORed char codes.

The Nordvik licence page runs entirely in the browser. No request reaches the server when Validate is pressed. All the logic, the token, and the flag are in readable JavaScript.

Objective

Read the page JavaScript, find the correct token, then let the <code>unlock()</code> function assemble the flag.

Useful tools
Browser DevToolsView SourceConsoleCyberChef
Files
license.html
Download
Hints
Hint 1
Download license.html and open it in a browser. View the source or DevTools → Sources. Look for the unlock function and the _t and _p variables.
Hint 2
The token is stored as base64 in _t. Decode it with atob(_t) in the Console. The flag is built from the _p array: each number is XORed with 0x5a then turned into a character.
Hint 3
Paste the decoded token into the input and press Validate. The flag appears in the output box. Alternative: run String.fromCharCode(..._p.map(c => c ^ 0x5a)) directly in the Console.