Skip to content
This repository has been archived by the owner on Jan 10, 2024. It is now read-only.

Bug #459

Open
0juni opened this issue Nov 9, 2023 · 2 comments
Open

Bug #459

0juni opened this issue Nov 9, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@0juni
Copy link

0juni commented Nov 9, 2023

Browser Version

Chrome

Exension Version

1.4.2

Actual behaviour

Sometimes the extention bugs out and it shows the paywall unless I reinstall the plugin. Still happens right now.

Also how does the extension work?

Reproduction steps

No response

Expected behaviour

No response

@0juni 0juni added the bug Something isn't working label Nov 9, 2023
@rospino74
Copy link
Owner

Hi, Do you see any error in the console (except something about browser_specific_settings)?

Issues apart, the extension works pretty much this way:

  1. The extension determines that you are on Quizlet
    "matches": [
    "*://*.quizlet.com/*"
    ],
  2. It makes a new account in the background simulating the user signing in
    const request = await fetch('https://quizlet.com/webapi/3.2/direct-signup', {
    credentials: 'include',
    headers: {
    'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:92.0) Gecko/20100101 Firefox/92.0',
    Accept: 'application/json',
    'Accept-Language': 'it-IT,it;q=0.8,en;q=0.3',
    'CS-Token': token,
    'X-Requested-With': 'XMLHttpRequest',
    'Content-Type': 'application/json',
    Pragma: 'no-cache',
    'Cache-Control': 'no-cache',
    },
    referrer: 'https://quizlet.com/login',
    body: `{"TOS":true,"birth_day":"${birthDay.getDate()}","birth_month":"${birthDay.getMonth()}","birth_year":"${birthDay.getFullYear()}","email":"${email}","is_free_teacher":"0","is_parent":false,"password1":"nrka6TWF86FPScH","redir":"https://quizlet.com/","signupOrigin":"signup-tab-on-login-modal","screenName":"Logout/logoutMobileSplash","username":"${randomizer.name().replaceAll(' ', '_').slice(0, 15)}_${birthDay.getFullYear()}","marketing_opt_out":true}`,
    method: 'POST',
    mode: 'cors',
    });
    return request.json();
  3. Then it logs in and gets new session cookies
  4. Finally, it replaces existing cookies with the new ones
    // Copy the account auth cookies
    chrome.runtime.sendMessage({
    action: 'copyCookies',
    value: document.cookie,
    });

This way you always have a new account to see textbook solutions (because that's the only thing unlocked by this extension).
Please note that we don't have to worry about IP blacklisting because account creation happens on the user's computer with his own IP address.

@yenuGH
Copy link

yenuGH commented Nov 13, 2023

From what I can see, v1.5.4 doesn't seem to be signing into a new account when it detects that a solution has been paywalled. It just sticks to the same account, making the loop infinite, triggering the CloudFlare security

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants