Git Product home page Git Product logo

fingerprints's Introduction

fingerprints

spring-boot 2.0 fingerprints demo

使用浏览器硬件信息实现移动设备唯一标识(WIFI 环境下 相同型号设备有重复率)

名称 方法
屏幕宽度 window.screen.width
屏幕高度 window.screen.height
设备像素比 window.devicePixelRatio
颜色深度 window.screen.colorDepth
    var canvas = document.createElement("canvas");
    var gl = canvas.getContext("experimental-webgl");
    var debugInfo = gl.getExtension("WEBGL_debug_renderer_info");
名称 方法
OpenGL 版本 gl.getParameter(gl.VERSION)
显卡渲染器 gl.getParameter(debugInfo.UNMASKED_RENDERER_WEBGL)
厂商 gl.getParameter(gl.VENDOR)
OpenGL shading language版本 gl.getParameter(gl.SHADING_LANGUAGE_VERSION)
最大字体限制 gl.getParameter(gl.MAX_TEXTURE_SIZE)
显卡供应商 gl.getParameter(debugInfo.UNMASKED_VENDOR_WEBGL)
用户代理 navigator.userAgent

iOS Android 可用 webview 调用 js 获取相关信息

<!DOCTYPE html>
<html>
    <body>
        <script type="text/javascript">
           function postStr() {
               var canvas = document.createElement("canvas");
               var gl = canvas.getContext("experimental-webgl");
               var debugInfo = gl.getExtension("WEBGL_debug_renderer_info");
               n = {
                   sw: "" + ( window.screen.width || 0),
                   sh: "" + (window.screen.height || 0),
                   sp: window.devicePixelRatio,
                   gv: gl.getParameter(gl.VERSION) || "",
                   gr: gl.getParameter(debugInfo.UNMASKED_RENDERER_WEBGL) || "",
                   time: new Date().getTime()
               };
               return JSON.stringify(n);
           }
        </script>
    </body>
</html>

上传测试地址

http://127.0.0.1:8080/?k1=v1&k2=v2

获取数据地址

http://127.0.0.1:8080/test.html

fingerprints's People

Contributors

codeyung avatar

Stargazers

ArjunwadkarAjay avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.