puppeteer-extra-plugin-stealth
Advanced tools
Comparing version 2.2.1 to 2.2.2
'use strict' | ||
const PuppeteerExtraPlugin = require('puppeteer-extra-plugin') | ||
const { PuppeteerExtraPlugin } = require('puppeteer-extra-plugin') | ||
@@ -11,5 +11,9 @@ /** | ||
class Plugin extends PuppeteerExtraPlugin { | ||
constructor (opts = { }) { super(opts) } | ||
constructor (opts = {}) { | ||
super(opts) | ||
} | ||
get name () { return 'stealth/evasions/_template' } | ||
get name () { | ||
return 'stealth/evasions/_template' | ||
} | ||
@@ -23,2 +27,4 @@ async onPageCreated (page) { | ||
module.exports = function (pluginConfig) { return new Plugin(pluginConfig) } | ||
module.exports = function (pluginConfig) { | ||
return new Plugin(pluginConfig) | ||
} |
'use strict' | ||
const PuppeteerExtraPlugin = require('puppeteer-extra-plugin') | ||
const { PuppeteerExtraPlugin } = require('puppeteer-extra-plugin') | ||
@@ -11,5 +11,9 @@ /** | ||
class Plugin extends PuppeteerExtraPlugin { | ||
constructor (opts = { }) { super(opts) } | ||
constructor (opts = {}) { | ||
super(opts) | ||
} | ||
get name () { return 'stealth/evasions/chrome.runtime' } | ||
get name () { | ||
return 'stealth/evasions/chrome.runtime' | ||
} | ||
@@ -25,2 +29,4 @@ async onPageCreated (page) { | ||
module.exports = function (pluginConfig) { return new Plugin(pluginConfig) } | ||
module.exports = function (pluginConfig) { | ||
return new Plugin(pluginConfig) | ||
} |
'use strict' | ||
const PuppeteerExtraPlugin = require('puppeteer-extra-plugin') | ||
const { PuppeteerExtraPlugin } = require('puppeteer-extra-plugin') | ||
@@ -9,9 +9,15 @@ /** | ||
class Plugin extends PuppeteerExtraPlugin { | ||
constructor (opts = { }) { super(opts) } | ||
constructor (opts = {}) { | ||
super(opts) | ||
} | ||
get name () { return 'stealth/evasions/console.debug' } | ||
get name () { | ||
return 'stealth/evasions/console.debug' | ||
} | ||
async onPageCreated (page) { | ||
await page.evaluateOnNewDocument(() => { | ||
window.console.debug = () => { return null } | ||
window.console.debug = () => { | ||
return null | ||
} | ||
}) | ||
@@ -21,2 +27,4 @@ } | ||
module.exports = function (pluginConfig) { return new Plugin(pluginConfig) } | ||
module.exports = function (pluginConfig) { | ||
return new Plugin(pluginConfig) | ||
} |
'use strict' | ||
const PuppeteerExtraPlugin = require('puppeteer-extra-plugin') | ||
const { PuppeteerExtraPlugin } = require('puppeteer-extra-plugin') | ||
@@ -9,5 +9,9 @@ /** | ||
class Plugin extends PuppeteerExtraPlugin { | ||
constructor (opts = { }) { super(opts) } | ||
constructor (opts = {}) { | ||
super(opts) | ||
} | ||
get name () { return 'stealth/evasions/navigator.languages' } | ||
get name () { | ||
return 'stealth/evasions/navigator.languages' | ||
} | ||
@@ -24,2 +28,4 @@ async onPageCreated (page) { | ||
module.exports = function (pluginConfig) { return new Plugin(pluginConfig) } | ||
module.exports = function (pluginConfig) { | ||
return new Plugin(pluginConfig) | ||
} |
'use strict' | ||
const PuppeteerExtraPlugin = require('puppeteer-extra-plugin') | ||
const { PuppeteerExtraPlugin } = require('puppeteer-extra-plugin') | ||
@@ -9,5 +9,9 @@ /** | ||
class Plugin extends PuppeteerExtraPlugin { | ||
constructor (opts = { }) { super(opts) } | ||
constructor (opts = {}) { | ||
super(opts) | ||
} | ||
get name () { return 'stealth/evasions/navigator.permissions' } | ||
get name () { | ||
return 'stealth/evasions/navigator.permissions' | ||
} | ||
@@ -20,3 +24,3 @@ async onPageCreated (page) { | ||
parameters.name === 'notifications' | ||
? Promise.resolve({state: Notification.permission}) //eslint-disable-line | ||
? Promise.resolve({ state: Notification.permission }) //eslint-disable-line | ||
: originalQuery(parameters) | ||
@@ -32,3 +36,6 @@ | ||
const nativeToStringFunctionString = Error.toString().replace(/Error/g, 'toString') | ||
const nativeToStringFunctionString = Error.toString().replace( | ||
/Error/g, | ||
'toString' | ||
) | ||
const oldToString = Function.prototype.toString | ||
@@ -51,2 +58,4 @@ | ||
module.exports = function (pluginConfig) { return new Plugin(pluginConfig) } | ||
module.exports = function (pluginConfig) { | ||
return new Plugin(pluginConfig) | ||
} |
'use strict' | ||
const PuppeteerExtraPlugin = require('puppeteer-extra-plugin') | ||
const { PuppeteerExtraPlugin } = require('puppeteer-extra-plugin') | ||
@@ -5,0 +5,0 @@ /** |
'use strict' | ||
const PuppeteerExtraPlugin = require('puppeteer-extra-plugin') | ||
const { PuppeteerExtraPlugin } = require('puppeteer-extra-plugin') | ||
@@ -5,0 +5,0 @@ /** |
'use strict' | ||
const PuppeteerExtraPlugin = require('puppeteer-extra-plugin') | ||
const { PuppeteerExtraPlugin } = require('puppeteer-extra-plugin') | ||
@@ -14,9 +14,17 @@ /** | ||
class Plugin extends PuppeteerExtraPlugin { | ||
constructor (opts = { }) { super(opts) } | ||
constructor (opts = {}) { | ||
super(opts) | ||
} | ||
get name () { return 'stealth/evasions/user-agent' } | ||
get name () { | ||
return 'stealth/evasions/user-agent' | ||
} | ||
get dependencies () { return new Set(['anonymize-ua']) } | ||
get dependencies () { | ||
return new Set(['anonymize-ua']) | ||
} | ||
} | ||
module.exports = function (pluginConfig) { return new Plugin(pluginConfig) } | ||
module.exports = function (pluginConfig) { | ||
return new Plugin(pluginConfig) | ||
} |
'use strict' | ||
const PuppeteerExtraPlugin = require('puppeteer-extra-plugin') | ||
const { PuppeteerExtraPlugin } = require('puppeteer-extra-plugin') | ||
@@ -5,0 +5,0 @@ /** |
'use strict' | ||
const PuppeteerExtraPlugin = require('puppeteer-extra-plugin') | ||
const { PuppeteerExtraPlugin } = require('puppeteer-extra-plugin') | ||
@@ -5,0 +5,0 @@ /** |
{ | ||
"name": "puppeteer-extra-plugin-stealth", | ||
"version": "2.2.1", | ||
"version": "2.2.2", | ||
"description": "Stealth mode: Applies various techniques to make detection of headless puppeteer harder.", | ||
@@ -13,3 +13,4 @@ "main": "index.js", | ||
"docs-for-evasions": "cd ./evasions && loop update-markdown-jsdoc", | ||
"test": "ava -v && standard" | ||
"test": "ava -v && standard", | ||
"test-ci": "yarn test" | ||
}, | ||
@@ -40,6 +41,6 @@ "engines": { | ||
"debug": "^3.1.0", | ||
"puppeteer-extra-plugin": "^3.0.3", | ||
"puppeteer-extra-plugin-anonymize-ua": "^2.1.3" | ||
"puppeteer-extra-plugin": "^3.0.4", | ||
"puppeteer-extra-plugin-anonymize-ua": "^2.1.4" | ||
}, | ||
"gitHead": "7e9c578ddb29526d46155bcb180036cc1f9bd0e3" | ||
"gitHead": "17e693ccab5acf68c5153924490c8730449bf998" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
52913
759