31b4 / Leetcode-Premium-Bypass

Leetcode Premium Unlocker 2024
MIT License
3.34k stars 305 forks source link

Can someone explain me this? #51

Closed kishan2k2 closed 10 months ago

kishan2k2 commented 10 months ago

Can some one explain to me how did they build this extension i.e. providing premium content for free, Iam very much interested in learning this. Can someone please?

31b4 commented 10 months ago

Hey @kishan2k2,

1. Database Setup:

See the compiled code here: https://github.com/31b4/Leetcode-Premium-Bypass/blob/main/dist/main.js

man0xff commented 10 months ago

How is it possible? Doesn't LeetCode site check premium subscription on the backend?

31b4 commented 10 months ago

Its not unlocking the premium features, as i said its getting the datas from a exported database and only injecting it to the buttons, so when you click on a question, the extension disabled it, and made a new onClick() for the button.

kishan2k2 commented 10 months ago

And how does leetcode accept the solution, correct me if I am wrong, and sorry in advance for my naivety.

I believe that HTML injection should be a static thing like how we can change the HTML content using the inspect element, but once we refresh the page everything is gone.

I agree that we can inject the question into the webpage but how are we able to submit the question, I mean only premium users should be able to answer the premium questions right?

31b4 commented 10 months ago

You are not able to submit, that would be way too complicated to make.

kishan2k2 commented 10 months ago

Understandable, And thanks for replying so fast. That was unexpected.