New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

puppeteer-real-browser

Package Overview
Dependencies
Maintainers
0
Versions
76
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

puppeteer-real-browser - npm Package Compare versions

Comparing version 1.3.9 to 1.3.12

.github/ISSUE_TEMPLATE/bug_report.md

2

lib/cjs/index.js

@@ -64,3 +64,3 @@ var puppeteer = require('puppeteer-core-patch')

page = await pageController(pageControllerConfig);
page = await pageController({ ...pageControllerConfig, killProcess: true, chrome });

@@ -67,0 +67,0 @@ browser.on('targetcreated', async target => {

@@ -11,10 +11,4 @@ const { createCursor } = require('ghost-cursor');

async function pageController({ browser, page, proxy, turnstile, xvfbsession, pid, plugins }) {
async function pageController({ browser, page, proxy, turnstile, xvfbsession, pid, plugins, killProcess = false, chrome }) {
if (plugins.length > 0) {
for (const plugin of plugins) {
plugin.onPageCreated(page)
}
}
let solveStatus = turnstile

@@ -29,4 +23,7 @@

solveStatus = false
if (xvfbsession) try { xvfbsession.stopSync() } catch (err) { }
if (pid) try { kill(pid, 'SIGKILL') } catch (err) { }
if (killProcess === true) {
if (xvfbsession) try { xvfbsession.stopSync() } catch (err) { }
if (chrome) try { chrome.kill() } catch (err) { console.log(err); }
if (pid) try { kill(pid, 'SIGKILL') } catch (err) { }
}
});

@@ -46,2 +43,8 @@

if (plugins.length > 0) {
for (const plugin of plugins) {
plugin.onPageCreated(page)
}
}
await page.evaluateOnNewDocument(() => {

@@ -63,3 +66,2 @@ Object.defineProperty(MouseEvent.prototype, 'screenX', {

const cursor = createCursor(page);
await cursor.moveTo({ x: getRandomInt(0, 800), y: getRandomInt(0, 600) });
page.realCursor = cursor

@@ -66,0 +68,0 @@ page.realClick = cursor.click

{
"name": "puppeteer-real-browser",
"version": "1.3.9",
"version": "1.3.12",
"description": "This package is designed to bypass puppeteer's bot-detecting captchas such as Cloudflare. It acts like a real browser and can be managed with puppeteer.",

@@ -5,0 +5,0 @@ "main": "lib/cjs/index.js",

@@ -87,3 +87,24 @@ const test = require('node:test');

test('Fingerprint JS Bot Detector', async () => {
const { page, browser } = await connect(realBrowserOption)
await page.goto("https://fingerprint.com/products/bot-detection/");
await new Promise(r => setTimeout(r, 5000));
const detect = await page.evaluate(() => {
return document.querySelector('.HeroSection-module--botSubTitle--2711e').textContent.includes("not") ? true : false
})
await browser.close()
assert.strictEqual(detect, true, "Fingerprint JS Bot Detector test failed!")
})
// If you fail this test, your ip address probably has a high spam score. Please use a mobile or clean ip address.
test('Datadome Bot Detector', async (t) => {
const { page, browser } = await connect(realBrowserOption)
await page.goto("https://antoinevastel.com/bots/datadome");
const check = await page.waitForSelector('nav #navbarCollapse').catch(() => null)
await browser.close()
assert.strictEqual(check ? true : false, true, "Datadome Bot Detector test failed! [This may also be because your ip address has a high spam score. Please try with a clean ip address.]")
})
// If this test fails, please first check if you can access https://antcpt.com/score_detector/
test('Recaptcha V3 Score (hard)', async () => {

@@ -99,14 +120,3 @@ const { page, browser } = await connect(realBrowserOption)

// if (Number(score) >= 0.7) console.log('Recaptcha V3 Score: ' + score);
assert.strictEqual(Number(score) >= 0.7, true, "Recaptcha V3 Score (hard) should be >=0.7. Score Result: " + score)
})
test('Fingerprint JS Bot Detector', async () => {
const { page, browser } = await connect(realBrowserOption)
await page.goto("https://fingerprint.com/products/bot-detection/");
await new Promise(r => setTimeout(r, 5000));
const detect = await page.evaluate(() => {
return document.querySelector('.HeroSection-module--botSubTitle--2711e').textContent.includes("not") ? true : false
})
await browser.close()
assert.strictEqual(detect, true, "Fingerprint JS Bot Detector test failed!")
assert.strictEqual(Number(score) >= 0.7, true, "(please first check if you can access https://antcpt.com/score_detector/.) Recaptcha V3 Score (hard) should be >=0.7. Score Result: " + score)
})

@@ -90,2 +90,24 @@ import test from 'node:test';

test('Fingerprint JS Bot Detector', async () => {
const { page, browser } = await connect(realBrowserOption)
await page.goto("https://fingerprint.com/products/bot-detection/");
await new Promise(r => setTimeout(r, 5000));
const detect = await page.evaluate(() => {
return document.querySelector('.HeroSection-module--botSubTitle--2711e').textContent.includes("not") ? true : false
})
await browser.close()
assert.strictEqual(detect, true, "Fingerprint JS Bot Detector test failed!")
})
// If you fail this test, your ip address probably has a high spam score. Please use a mobile or clean ip address.
test('Datadome Bot Detector', async (t) => {
const { page, browser } = await connect(realBrowserOption)
await page.goto("https://antoinevastel.com/bots/datadome");
const check = await page.waitForSelector('nav #navbarCollapse').catch(() => null)
await browser.close()
assert.strictEqual(check ? true : false, true, "Datadome Bot Detector test failed! [This may also be because your ip address has a high spam score. Please try with a clean ip address.]")
})
// If this test fails, please first check if you can access https://antcpt.com/score_detector/
test('Recaptcha V3 Score (hard)', async () => {

@@ -101,14 +123,3 @@ const { page, browser } = await connect(realBrowserOption)

// if (Number(score) >= 0.7) console.log('Recaptcha V3 Score: ' + score);
assert.strictEqual(Number(score) >= 0.7, true, "Recaptcha V3 Score (hard) should be >=0.7. Score Result: " + score)
})
test('Fingerprint JS Bot Detector', async () => {
const { page, browser } = await connect(realBrowserOption)
await page.goto("https://fingerprint.com/products/bot-detection/");
await new Promise(r => setTimeout(r, 5000));
const detect = await page.evaluate(() => {
return document.querySelector('.HeroSection-module--botSubTitle--2711e').textContent.includes("not") ? true : false
})
await browser.close()
assert.strictEqual(detect, true, "Fingerprint JS Bot Detector test failed!")
assert.strictEqual(Number(score) >= 0.7, true, "(please first check if you can access https://antcpt.com/score_detector/.) Recaptcha V3 Score (hard) should be >=0.7. Score Result: " + score)
})

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc