How I bypassed Hulu's website geolocation error, so I could log in

DeChamp - Aug 23 '18 - - Dev Community

The issue

So I pay a monthly fee for Hulu, they rock and I love them. However, a recent change they did, made it so that in Safari it was giving me a geo location error and not letting me log in. It just sat at the welcome message.

Imgur

I have to use Safari, due to the reason that I use Pipifier to let me watch video, over the top of the rest of my screens (picture in picture).

The search

So here I am, clearing my cookies and double checking everything. I keep hitting "accept" on giving my location. Still nothing. So I do what any good developer does at this point. I open my developer console and get to digging.

First thing I see is error [geo lib] – 2... Well no wonder it's not doing anything then.

Imgur

So next, I open up the error and click to the code so that I can see whats going on. I kind of ignore the main error, and follow the trace stack. I see that it's happing during the function that sets the cookie!

Imgur

Boom! I know that this means that most likely I can just find the logic that sets the cookie, and set it myself. I can see where it's calling setCookie and it has clear as day, the logic they use to create the cookie string.

I'm going to leave out how they set the cookie far as inner workings, but the cookie name ended up being geo.

So I take that logic, and I use it to replicate the cookie as it would. I can see I need my location, so I go and look up my location on google maps, get my lat and lon, then back to the code.

I paste in the values real quick, and create the cookie via my console.

The solution

document.cookie = "geo=" + "".concat(xx.xxxxxx, "&").concat(-xxx.xxxxxx, "&").concat(Date.now())

Then I go back to Hulu, do a refresh and I'm in!!!

Imgur

NOTE!!!
This is NOT a hack, but a temporary fix. I pay full price monthly subscription and do not abuse my permissions. I do not promote misusing this in a malicious manor.

It's totally worth the money!

Feedback

Let me know your thoughts. Have you done similar things like this?


Varymade LLC.

Current projects are https://charactergenerator4000.com and https://coder.exchange. Please check them out and let us know your thoughts.

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Terabox Video Player