### Playwright Anti-detection Configuration Source: https://context7.com/thegp/untidetect-tools/llms.txt Illustrates Playwright configuration for anti-detection, emphasizing the use of non-headless mode and setting specific context options like user agent, viewport, locale, and timezone to mimic a real user. ```javascript // Rebrowser patches also work with Playwright // https://github.com/rebrowser/rebrowser-patches // Playwright-ghost - Playwright with stealth plugins // https://github.com/regseb/playwright-ghost const { chromium } = require('playwright-ghost'); const browser = await chromium.launch({ headless: false, // Headless more detectable }); const context = await browser.newContext({ userAgent: 'Mozilla/5.0...', viewport: { width: 1920, height: 1080 }, locale: 'en-US', timezoneId: 'America/New_York', }); ``` -------------------------------- ### JavaScript Humanization with Ghost-cursor and NutJS Source: https://context7.com/thegp/untidetect-tools/llms.txt Implements human-like browser interactions using JavaScript libraries like Ghost-cursor for realistic mouse movements and NutJS for OS-level mouse and keyboard automation. Includes Bezier.js for custom path generation. ```javascript // Ghost-cursor - Realistic mouse movements // https://github.com/Xetera/ghost-cursor const { createCursor } = require('ghost-cursor'); const cursor = createCursor(page); // Move with Bezier curves to target await cursor.move('#button'); await cursor.click('#button'); // Bezier.js for custom mouse paths // https://github.com/Pomax/bezierjs const Bezier = require('bezier-js'); const curve = new Bezier(startX, startY, cp1x, cp1y, cp2x, cp2y, endX, endY); // NutJS for OS-level automation // https://nutjs.dev/ const { mouse, keyboard } = require('@nut-tree-fork/nut-js'); await mouse.move([{x: 100, y: 100}, {x: 500, y: 500}]); await keyboard.type('Hello World'); ``` -------------------------------- ### Puppeteer Anti-detection Configuration Source: https://context7.com/thegp/untidetect-tools/llms.txt Demonstrates how to configure Puppeteer for anti-detection by using real Chrome executables and specific command-line arguments to mask common fingerprinting vectors. It also shows integration with ghost-cursor for human-like mouse movements. ```javascript const puppeteer = require('puppeteer'); // Launch with anti-detection arguments const browser = await puppeteer.launch({ executablePath: '/path/to/chrome', // Use real Chrome, not Chromium args: [ '--disable-site-isolation-trials', // Access cross-origin iframes '--aggressive-cache-discard', // Allow debugger/extension time '--disable-gpu', // Reduce canvas fingerprint '--accept-lang=en,en-US', // Set language headers '--user-agent=Mozilla/5.0...', // Custom user agent ] }); // Bablosoft fingerprints integration // http://fingerprints.bablosoft.com/ // Provides real browser fingerprints to use in automation // Ghost-cursor for human-like mouse movements // https://github.com/Xetera/ghost-cursor const { createCursor } = require('ghost-cursor'); const cursor = createCursor(page); await cursor.click('#target-element'); // Bezier curve mouse movement ``` -------------------------------- ### Browser Automation with Puppeteer and Fingerprints (Python) Source: https://github.com/thegp/untidetect-tools/blob/main/README.md This snippet illustrates the concept of using Puppeteer with custom fingerprints for browser automation, specifically mentioning the 'puppeteer-with-fingerprints' library. It highlights the ability to fake canvas rendering, which is crucial for anti-detect purposes. Note that the provided library might have performance limitations for canvas generation. ```python # Example concept using puppeteer-with-fingerprints (actual implementation may vary) # from puppeteer_with_fingerprints import launch # async def main(): # browser = await launch(fingerprint={'canvas': 'some_canvas_hash'}) # page = await browser.newPage() # await page.goto('http://example.com') # # ... further automation steps # await browser.close() # import asyncio # asyncio.get_event_loop().run_until_complete(main()) ``` -------------------------------- ### Node.js HTTP Client Fingerprinting with got-scraping Source: https://context7.com/thegp/untidetect-tools/llms.txt Uses the got-scraping library for Node.js to make HTTP requests with browser-like TLS fingerprints. It allows customization of browser, device, and locale settings for more realistic requests. ```javascript // Got-Scraping for Node.js // https://github.com/apify/got-scraping const { gotScraping } = require('got-scraping'); const response = await gotScraping({ url: 'https://target-site.com', headerGeneratorOptions: { browsers: ['chrome'], devices: ['desktop'], locales: ['en-US'], } }); ``` -------------------------------- ### Bash cURL with Browser TLS Fingerprints using curl-impersonate Source: https://context7.com/thegp/untidetect-tools/llms.txt Leverages the curl-impersonate command-line tool to make HTTP requests with specific browser TLS fingerprints. This is useful for testing or scripting scenarios where direct cURL commands are preferred. ```bash # curl-impersonate - curl with browser TLS fingerprints # https://github.com/lwthiker/curl-impersonate curl_chrome110 https://target-site.com \ -H "Accept: text/html" \ -H "Accept-Language: en-US,en" ``` -------------------------------- ### Puppeteer Launch Arguments for Anti-Detection Source: https://github.com/thegp/untidetect-tools/blob/main/README.md These Chrome launch arguments can be used with Puppeteer to modify browser fingerprints and enhance anti-detection capabilities. They affect user agent, language settings, extensions, and cache behavior. ```bash --profile-directory=${dir_name} --accept-lang=en,en-US, --user-agent=${user_agent} --disable-extensions-except=${EXTENSION_PATH} --load-extension=${EXTENSION_PATH} --disable-site-isolation-trials --aggressive-cache-discard --disable-gpu ``` -------------------------------- ### Python HTTP Client Fingerprinting with curl_cffi Source: https://context7.com/thegp/untidetect-tools/llms.txt Employs the curl_cffi Python library to make HTTP requests while impersonating browser TLS fingerprints. This helps in bypassing detection mechanisms that rely on TLS fingerprint analysis. ```python # curl_cffi - Python curl with browser impersonation # https://github.com/yifeikong/curl_cffi from curl_cffi import requests # Impersonate Chrome browser TLS fingerprint response = requests.get( 'https://target-site.com', impersonate='chrome110' ) ``` -------------------------------- ### Python Undetected Browser Automation with NoDriver and Selenium-Driverless Source: https://context7.com/thegp/untidetect-tools/llms.txt Utilizes Python libraries like NoDriver and Selenium-Driverless to perform browser automation without being easily detected. These libraries aim to patch browser detection vectors or eliminate the need for traditional drivers like chromedriver. ```python # NoDriver - successor to undetected-chromedriver # https://github.com/ultrafunkamsterdam/nodriver import nodriver as uc async def main(): browser = await uc.start() page = await browser.get('https://target-site.com') # NoDriver automatically patches Chrome detection vectors # ZenDriver - NoDriver fork with improvements # https://github.com/stephanlensky/zendriver # Selenium-Driverless - Selenium without chromedriver # https://github.com/kaliiiiiiiiii/Selenium-Driverless from selenium_driverless import webdriver async with webdriver.Chrome() as driver: await driver.get('https://target-site.com') # No chromedriver binary = harder to detect # Camoufox - Anti-detect Firefox via Python # https://camoufox.com/ from camoufox import Camoufox with Camoufox() as browser: page = browser.new_page() page.goto('https://target-site.com') ``` -------------------------------- ### Detecting Fake Navigator Properties (JavaScript) Source: https://github.com/thegp/untidetect-tools/blob/main/README.md This JavaScript snippet demonstrates a basic method to detect if navigator properties have been faked. It checks if the first property name in `Object.getOwnPropertyNames(navigator)` is present, which could indicate tampering. This is a simple check and may not catch all forms of detection. ```javascript if( Object.getOwnPropertyNames(navigator)[0] ) alert('fake parameters detected'); ``` -------------------------------- ### JavaScript Worker Thread Detection Vectors Source: https://context7.com/thegp/untidetect-tools/llms.txt Illustrates the type of fingerprint data accessible within JavaScript Web Workers, which cannot be modified by browser extensions. This information is crucial for understanding what websites can detect at a fundamental level. ```javascript // Data available in Web Workers (cannot be modified by extensions) // Use this knowledge to understand what sites can detect // In a Web Worker context: const workerFingerprint = { timezone: Intl.DateTimeFormat().resolvedOptions().timeZone, language: navigator.language || navigator.userLanguage, userAgent: navigator.userAgent, hardwareConcurrency: navigator.hardwareConcurrency, // GPU data available except Linux & Firefox gpu: navigator.gpu // WorkerNavigator.gpu }; // Note: window, screen, DOM, and canvas are NOT available in workers // Anti-detect browsers must patch at browser level, not extension level ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.