Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linkvertise Downloader #51

Closed
1 task done
Nerixyz opened this issue Sep 19, 2021 · 10 comments
Closed
1 task done

Linkvertise Downloader #51

Nerixyz opened this issue Sep 19, 2021 · 10 comments
Labels
New-bypass A site is not bieng bypassed stale

Comments

@Nerixyz
Copy link
Contributor

Nerixyz commented Sep 19, 2021

Domain

https://linkvertise.download

Link

Any link on https://linkvertise.com (there are trending links). Make sure to disable the addon, so you will be redirected to linkvertise.download.

Version

0.0.0

What browsers are you seeing the problem on?

Firefox

What OS are you seeing the problem on?

Windows

(Optional) Anything else?

This isn't really needed as linkvertise is already bypassed. But if you're on linkvertise.download, there's no bypass.

Just throwing it out here if anyone needs it. Note: It's really easy to detect and prevent by checking the UA or updating the downloader.

This is roughly how it works:

// Step 1: get the downloader URL
// Step 2: get the final name of the downloader-file
// Step 3: emulate the requests done by the downloader

// example implementation

// the string from the url
const LINK_STUFF = '12345/Name';
const downloaderInfo = await fetch(
  `https://publisher.linkvertise.com/api/v1/redirect/link/${LINK_STUFF}/download-info`,
  {
    method: 'POST',
    body: JSON.stringify({
      // this is the last part in the url,
      // that comes after LINK_STUFF
      key: 'c3R1ZmYgZnJvbSB0aGUgdXJsIC0gYSBrZXk',
    }),
    headers: {
      'Content-Type': 'application/json',
    },
  },
).then(x => x.json());

const downloaderUrl = downloaderInfo.data?.downloadUrl;
// if (!downloaderUrl) return;

handleDownload(downloaderUrl);

/**
 * @param {string} url
 * @returns {Promise<void>}
 */
async function handleDownload(url) {
  // only get the headers
  const response = await fetch(url);
  // Example value: attachment; filename="Channel%20-%20Linkvertise%20Downloader_exS-5as.exe"; ...
  // This might be a zip file with a file like this inside,
  // though it doesn't change the fact that the last part is matched.
  const name = response.headers.get('content-disposition')?.match(/Downloader_([^ .]+)/)?.[1];
  if (!name) return;

  // this is the stuff the downloader does
  // we can't emulate the UA (it's something with WinHttpClient)
  const oResponse = await fetch('https://d17kz3i6hbr7d3.cloudfront.net/o', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    body: JSON.stringify({
      prv: '0.1',
      // still works but might be updated
      plv: '1.34.2.8157',
      l: 'en',
      a: 'Linkvertise',
      i: 'Linkvertise_DLM',
      s: 'Linkvertise',
      u: name,
      o: '10', // os-version
    }),
  }).then(x => x.json());

  if (oResponse.i?.cu) {
    // this would be `safelyNavigate`
    await browser.tabs.update(tabId, {
      url: oResponse.i.cu,
    });
  }
}

Code of Conduct

  • I agree to follow this project's Code of Conduct
@Nerixyz Nerixyz added the New-bypass A site is not bieng bypassed label Sep 19, 2021
@lostdusty
Copy link
Contributor

lostdusty commented May 8, 2022

@UnJust1ce @BS-zombie @NotAProton looks like a fix for linkvertise

@Nerixyz
Copy link
Contributor Author

Nerixyz commented May 9, 2022

I've updated the version and host. It should still work. Though as I mentioned, you might get a zip file and need to extract the filename from it.

@lostdusty
Copy link
Contributor

@UnJust1ce @reashetyrr could you check this?

@reashetyrr
Copy link
Contributor

Yes, I will take a look tomorrow!

@reashetyrr
Copy link
Contributor

im pinning this for later, currently found differences in the chromium and spidermonkey browsers that will make this very browser specific

@github-actions
Copy link

This issue is stale because it has been open for 30 days with no activity. To undo this, make some activity on this issue or create a new one.

@github-actions github-actions bot added the stale label Jul 28, 2022
@Nerixyz
Copy link
Contributor Author

Nerixyz commented Jul 29, 2022

It's still an issue afaik.

@reashetyrr
Copy link
Contributor

it is yes, still have to work on a fix for this

@github-actions github-actions bot removed the stale label Jul 30, 2022
@github-actions
Copy link

This issue is stale because it has been open for 30 days with no activity. To undo this, make some activity on this issue or create a new one.

@github-actions github-actions bot added the stale label Aug 29, 2022
@github-actions
Copy link

github-actions bot commented Sep 4, 2023

This issue was automatically closed because it has been inactive for 14 days since being marked as stale. If you bypass/problem wasn't solved, please create a new issue.

@github-actions github-actions bot closed this as completed Sep 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
New-bypass A site is not bieng bypassed stale
Projects
None yet
Development

No branches or pull requests

3 participants