浏览器指纹 fingerprintjs

使用示例:

<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <input value="" id="input" style="width: 300px;" />
  <div id="user"></div>
  <script>
    const fpPromise = import('https://openfpcdn.io/fingerprintjs/v3')
      .then(e => e.load())
    fpPromise
      .then(fp => fp.get())
      .then(result => {
        const visitorId = result.visitorId
        console.log(visitorId)
        document.getElementById('input').value = visitorId
        document.getElementById('user').innerHTML = window.navigator.userAgent.toLowerCase()
      })
  </script>
</body>

</html>

 

官方:

https://github.com/fingerprintjs/fingerprintjs

 

 

 

 

 

.

posted @ 2021-12-15 11:57  James2019  阅读(1275)  评论(0编辑  收藏  举报