Comments (4)
- worker canvas and hardwareConcurrency are distrusted in brave
- 4359327 canvas tampering detect via nested iframe test
- only the system is counted in worker userAgent (full userAgent with noise is counted in the loose fingerprint)
from creepjs.
EDIT: Fixed in desktop versions.
From #53, this catches hardwareConcurrency
in 86 Stable. Issue is resolved in 87 Nightly
(function() {
'use strict';
const getNestedIframes = (n, context = window) => {
n = +n
let parent, total = n
return (function getIframeWindow(win, {
previous = context
} = {}) {
if (!win) {
console.log('stopped at ', total - n) // Firefox has a limit
return previous
}
const numberIframes = win.length
const div = win.document.createElement('div')
win.document.body.appendChild(div)
div.innerHTML = '<iframe></iframe>'
const iframeWindow = win[numberIframes]
if (total == n) {
parent = div
parent.setAttribute('style', 'display:none')
}
n--
if (!n) {
parent.parentNode.removeChild(parent) //
return iframeWindow
}
return getIframeWindow(iframeWindow, {
previous: win
})
})(context)
}
const nestedWindow = getNestedIframes(20)
console.log('top: ', window.navigator.hardwareConcurrency)
console.log('nested: ', nestedWindow.navigator.hardwareConcurrency)
})()
from creepjs.
function getBraveMode() {
try {
// strict mode returns null supported extensions
const canvas = document.createElement('canvas')
const gl = canvas.getContext('webgl')
if (!gl.getSupportedExtensions()) {
return 'strict'
}
// standard and strict mode do not have chrome plugins
const chromePlugins = /(Chrom(e|ium)|Microsoft Edge) PDF (Plugin|Viewer)/
const pluginsList = [...navigator.plugins]
const hasChromePlugins = pluginsList
.filter(plugin => chromePlugins.test(plugin.name)).length == 2
if (!hasChromePlugins) {
return 'standard'
}
return 'allow'
} catch (e) {
return 'unknown'
}
}
// if 'brave' in navigator...
getBraveMode()
from creepjs.
const detectBrave = async () => {
const windowKeys = Object.keys(Object.getOwnPropertyDescriptors(window))
const fileSystemKeys = /FileSystem((|Directory|File)Handle|WritableFileStream)|show((Directory|((Open|Save)File))Picker)/
// each can be spoofed or blocked
return {
// moving to flags
fileSystemAccessDisabled: !windowKeys.filter(key => fileSystemKeys.test(key)).length,
webSerialDisabled: !('Serial' in window || 'SerialPort' in window),
reportingDisabled: !('ReportingObserver' in window),
// not strictly brave
gpcInNavigator: 'globalPrivacyControl' in navigator,
// primary method
braveInNavigator: (
'brave' in navigator &&
Object.getPrototypeOf(navigator.brave).constructor.name == 'Brave' &&
navigator.brave.isBrave.toString() == 'function isBrave() { [native code] }'
),
// rule out other brands
brandIsNotGoogleMicrosoftOrOpera: (
!navigator.userAgentData ? 'unknown' :
!navigator.userAgentData.brands
.filter(item => /Google Chrome|Microsoft Edge|Opera/.test(item.brand)).length
),
// blink w/2147483648 is brave (spoofable and blockable)
storageQuotaIs2Gb: 2147483648 == (await navigator.storage.estimate()).quota,
}
}
;(async () => {
const x = await detectBrave()
console.log(x)
})()
from creepjs.
Related Issues (20)
- api how to use?? help!!! 😫 HOT 14
- TB errors out before display HOT 4
- Bug in creep.ts HOT 1
- Where is the known data to determine LowerEntropy? HOT 3
- 400::API access denied if i use --disable-web-security switch for chromium HOT 5
- does anybody know whether it's possible to see lies under localhost? HOT 6
- Improve font lists HOT 14
- Windows 11 - Recognised as Windows 10 ? HOT 10
- iOS 17 Safari Anti-Fingerprinting HOT 6
- Add stronger Proxy detection HOT 5
- Make CreepJS accessible as an NPM library HOT 4
- Doesn't work HOT 5
- Doubts about the erro infos
- Doubts about the erro infos HOT 9
- MIT or ISC license? HOT 1
- Doubst about the WorkerNavigator HOT 3
- Idea: Detect frame rate HOT 1
- How to use? HOT 6
- what is ```- failed prototype test execution``` HOT 9
- lazy loading iframes HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from creepjs.