Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fingerprint-generator

Package Overview
Dependencies
Maintainers
9
Versions
98
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fingerprint-generator - npm Package Compare versions

Comparing version 2.1.4-dev.0 to 2.1.4

8

package.json
{
"name": "fingerprint-generator",
"version": "2.1.4-dev.0",
"version": "2.1.4",
"description": "NodeJS package for generating realistic browser fingerprints.",

@@ -36,7 +36,7 @@ "homepage": "https://github.com/apify/fingerprint-suite",

"dependencies": {
"generative-bayesian-network": "^2.1.4-dev.0",
"header-generator": "^2.1.4-dev.1",
"generative-bayesian-network": "^2.1.4",
"header-generator": "^2.1.4",
"tslib": "^2.4.0"
},
"gitHead": "2ec381bab955fd48b60f63df478af89e97fa31e7"
"gitHead": "cad86389acb7cfd756ee116cc20629ef08048eef"
}

@@ -39,27 +39,36 @@ <h1 align="center">

```javascript
const { chromium } = require('playwright');
```typescript
const { firefox } = require('playwright');
const { FingerprintGenerator } = require('fingerprint-generator');
const { FingerprintInjector } = require('fingerprint-injector');
const { FingerprintInjector } = require('fingerprint-injector');
(async () => {
const b = await chromium.launch({headless: false});
const ctx = await b.newContext();
const fingerprintGenerator = new FingerprintGenerator();
const fingerprintGenerator = new FingerprintGenerator();
const browserFingerprintWithHeaders = fingerprintGenerator.getFingerprint({
devices: ['desktop'],
browsers: ['chrome'],
});
const fingerprintInjector = new FingerprintInjector();
const { fingerprint } = browserFingerprintWithHeaders;
const fingerprint = fingerprintGenerator.getFingerprint({
'locales': ['cs-CZ'], // setup your desired fingerprint features
'operatingSystems': ['linux'],
const browser = await firefox.launch({ headless: false });
// With certain properties, we need to inject the props into the context initialization
const context = await browser.newContext({
userAgent: fingerprint.userAgent,
locale: fingerprint.navigator.language,
viewport: fingerprint.screen,
});
await fingerprintInjector.attachFingerprintToPlaywright(ctx, fingerprint);
// Attach the rest of the fingerprint
await fingerprintInjector.attachFingerprintToPlaywright(context, browserFingerprintWithHeaders);
// ...and enjoy your undercover browser while using the browser context as usual!
const page = await ctx.newPage();
await page.goto("https://apify.com");
const page = await context.newPage();
// ... your code using `page` here
})();
```
## Performance
<!-- ## Performance
With ever-improving performance of antibot fingerprinting services, we use some of the industry-leading services to benchmark our performance.

@@ -72,3 +81,3 @@ The following table shows how is the latest build of `fingerprint-suite` doing in tests provided by various open-source fingerprinting services.

|BotD |![](https://byob.yarr.is/apify/fingerprint-suite/BotD) |
|CreepJS |![](https://byob.yarr.is/apify/fingerprint-suite/CreepJS)|
|CreepJS |![](https://byob.yarr.is/apify/fingerprint-suite/CreepJS)| -->

@@ -82,3 +91,3 @@ ## Support

Your code contributions are welcome and you'll be praised to eternity!
Your code contributions are welcome and you'll be praised for eternity!
If you have any ideas for improvements, either submit an issue or create a pull request.

@@ -85,0 +94,0 @@ For contribution guidelines and the code of conduct,

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