
So let’s open our browser’s developer tools, which you can do in most browsers on a Windows PC by hitting F12. However, every major desktop browser has extensions you can install to beautify JSON-files, so you can simply visit your browser’s extension/app store and search for JSON to find one.Īnyway, let’s keep these codes in mind, but let’s also check out that other variable we found before: “promoCodeList.” We already know its contents from looking at in the source, but we can view it more easily in our browser’s console.

Some browsers have a built-in JSON-viewer, but most don’t. If you visit the URL in your browser, the data might not look as structured as it does for me.


Īt the time of writing, upon visiting that URL, I am greeted with four different promo codes:ĭata found on Great Wolf. If we take the URL found in the aforementioned variable and add “” to the beginning of it, we’ll end up with this URL. The second variable is an array (a collection) of promo codes. Right-click just about anywhere on the website and select “View source.” Hit CTRL+F (or CMD+F) to search the code and type “promocode.” We will find two variables in particular that interest me: “dealPromoCodeApiUrl” and “promoCodeList.” The first variable contains a partial URL to a JSON-file (a file with some structured data) that sounds like it would contain promo codes. Let’s start by navigating over to our subject: Great Wolf. Spoiler: in the end, we do find a promo code that works. We will try one of the promo codes on the website and snatch a URL to a web server. We will take a look at the source code for Great Wolf, where we will find references to promo codes which we will check out. And, trust me, you can find all sorts of interesting tidbits in source codes. I’ll explain every step along the way, so you can follow along and use the methods I mention in this article to explore the source codes for other websites. We’ll be looking at a chain of indoor water parks called Great Wolf Lodge today, though I want you to know that it’s actually quite common that websites expose what would be internal information publicly through poor code.

The website that I’ll be showing you today simply exposed hidden promo codes in their public code. Well, we are once again exploring the source code of a website, but this time there’s nothing crooked involved. This Website Turns Your Javascript to Magic Hidden Code (Must Use For Safety) #shorts
