Skip to content

fingerprint injection makes browsers detectable as headless #178

@ishfx

Description

@ishfx

Describe the bug
Simply injecting fingerprint-suite (using newInjectedContext or newInjectedPage), with or without options, for headless or headfull browser, makes the browser detected as headless in : https://arh.antoinevastel.com/bots/areyouheadless.

  • headless = detected
  • headless + stealth = undetected
  • headless + fingerprint-suite = detected !!
  • headless + stealth + fingerprint-suite = detected !!
  • headfull = undetected
  • headfull + stealth = undetected
  • headfull + fingerprint-suite = detected !!
  • headfull + stealth + fingerprint-suite = detected !!

Every time fingerprint suite is used, even without any option, it makes the browser detectable.

To Reproduce

const { chromium: playwright } = require('playwright-extra')
const { newInjectedContext } = require('fingerprint-injector');

playwright.launch({ headless: false }).then(test)

async function test(browser) {
  const context = await newInjectedContext(browser, {}); // DETECTED
  // const context = await brower.newContext(); // UNDETECTED

  const page = await context.newPage();
  await page.goto('https://arh.antoinevastel.com/bots/areyouheadless');
  await page.screenshot({ path: 'detected.png', fullPage: true });
  await browser.close()
}

Expected behavior
Injecting the fingerprint-suite shouldn't make the browser be detected as headless.

System information:

  • OS: Arch Linux x86_64 - 6.3.2-arch1-1
  • Node.js version: v16.20.0

Metadata

Metadata

Assignees

Labels

bugSomething isn't working.t-toolingIssues with this label are in the ownership of the tooling team.

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions