webrtc指纹检测
具体网站:
扣下来的部分需求代码:
<html> <head> <script type="text/javascript" src=./jquery.js></script> <link href="./style.css" type="text/css" rel="stylesheet"> <title>IP Info</title> <script> function findIP(onNewIP) { var myPeerConnection = window.RTCPeerConnection || window.mozRTCPeerConnection || window.webkitRTCPeerConnection; var pc = new myPeerConnection({iceServers: [{urls: "stun:stun.l.google.com:19302"}]}), noop = function() {}, localIPs = {}, ipRegex = /([0-9]{1,3}(\.[0-9]{1,3}){3}|[a-f0-9]{1,4}(:[a-f0-9]{1,4}){7})/g, key; function ipIterate(ip) { if (!localIPs[ip]) onNewIP(ip); localIPs[ip] = true; } pc.createDataChannel(""); pc.createOffer(function(sdp) { sdp.sdp.split('\n').forEach(function(line) { if (line.indexOf('candidate') < 0) return; line.match(ipRegex).forEach(ipIterate); }); pc.setLocalDescription(sdp, noop, noop); }, noop); pc.onicecandidate = function(ice) { if (!ice || !ice.candidate || !ice.candidate.candidate || !ice.candidate.candidate.match(ipRegex)) return; ice.candidate.candidate.match(ipRegex).forEach(ipIterate); }; } function addIP(ip) { console.log('got ip: ', ip); var li = document.createElement('li'); li.textContent = ip; document.getElementById("IPLeak").appendChild(li); } findIP(addIP); </script> </head> <body> <br> <div> <div><a href="https://voidsec.com" style="border-bottom:0px"><img alt="VoidSec" src="https://voidsec.com/wp-content/uploads/2013/08/textLogoScaled.png"></a></div> <div style="float:right;"> </div> </div> <br><br> <article class="fpArticle"> <header> <h1>IP Info:</h1> </header> <strong>Web RTC:</strong> <ul id="IPLeak"></ul> </p> <p>If you are connected to a VPN and in the above section you see your ISP IP, then your system is <b>leaking WebRTC</b> requests<br>If any IPs match with one of your <b>LAN Private IPs</b> you will have a <b>partial Leak</b></p> </article> </body> </html>
css
html,body,div,span,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,address,cite,code,del,dfn,em,font,img,ins,kbd,q,samp,small,strong,sub,sup,var,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,header,nav,article,aside,footer,hgroup,section { border: 0; font-family: inherit; font-size: 100%; font-style: inherit; font-weight: inherit; margin: 0; outline: 0; padding: 0; text-decoration: none } :focus,*:active { outline: 0 } ol,ul { list-style: none outside none } header,nav,article,aside,footer,hgroup,section { display: block } .clearfix:after { clear: both; content: " "; display: block; font-size: 0; height: 0; visibility: hidden } * html .clearfix { } :first-child+html .clearfix { } html { background-color: #ccc; background-image: -moz-linear-gradient(center top,#CCCCCC 0%,#E8E8E8 40%); background-repeat: no-repeat; height: 100% } body { color: #333; font: 12px/18px Corbel,Arial,Helvetica,sans-serif; margin: 0 auto; text-align: justify; width: 630px } p { margin-bottom: 18px } strong { font-weight: 700 } a { color: #940033 } a:hover { border-bottom: 1px solid #940033 } a:active { border-bottom: 2px solid #940033 } h1 { font: 24px/36px "Trebuchet MS",Arial,Helvetica,sans-serif } hgroup { margin: 15px 0 } hgroup h1 { color: #000; font: 40px/54px "Lucida Sans Unicode","Lucida Grande",sans-serif } hgroup h2 { color: #0081ac; font: 14px/20px "Lucida Sans Unicode","Lucida Grande",sans-serif } nav#global { background-color: #007095; background-image: -moz-linear-gradient(center top,#0081AC,#005B79); border-radius: 8px 8px 8px 8px; margin: 30px 0 40px; width: 100% } nav#global ul { display: table; height: 40px; margin-left: 10px; text-align: center } nav#global ul li { display: inline; position: relative } nav#global ul li a { color: #fff; display: block; float: left; font-size: 14px; line-height: 40px; padding: 0 25px; text-transform: uppercase } nav#global ul li a:hover { background-image: -moz-linear-gradient(center bottom,#0081AC,#005B79); border: medium } #content { float: left; margin-right: 30px; width: 630px } article { background: none repeat scroll 0 0 #ebe8d9; border-radius: 15px 15px 15px 15px; box-shadow: 0 0 10px #6e7e93; margin: 0 0 30px; padding: 20px } .fpArticle header h1 { padding-left: 10px } .fpArticle { font: 14px/20px Arial,Helvetica,sans-serif } aside section p { font: 14px/20px Arial,Helvetica,sans-serif } article header { background-color: #0081ac; background-image: -moz-linear-gradient(center top,#0081AC,#005B79); border-radius: 10px 10px 10px 10px; box-shadow: 0 -35px 35px -18px #005b79 inset; color: #eee; height: 40px; margin-bottom: 15px; width: 590px } article header h1 { float: left; line-height: 40px } footer p { margin: 0 } aside { background: none repeat scroll 0 0 #ebe8d9; border-radius: 15px 15px 15px 15px; box-shadow: 0 0 10px #629996; float: right; margin-bottom: 30px; padding: 20px; position: relative; width: 260px; z-index: 1 } aside h1 { background-color: #0081ac; background-image: -moz-linear-gradient(center top,#0081AC,#005B79); border: 1px solid #6e7e93; border-radius: 10px 10px 10px 10px; box-shadow: 0 -28px 35px -18px #005b79 inset; color: #fff; font-size: 18px; height: 28px; line-height: 28px; margin-bottom: 10px; padding: 0 10px } aside nav,aside section { background: none repeat scroll 0 0 transparent; margin: 0 0 25px; padding: 0 } aside section:last-child { margin-bottom: 0 } .links li { border-bottom: 1px solid #81aeab; font-size: 16px; line-height: 20px; margin-bottom: 5px; text-align: left; transition: all .5s ease-out 0s } .links li:hover { margin-left: 5px } .links li a:hover { border: medium } .copyright { clear: both; margin: 10px 0 30px; text-align: center } #ad { text-align: center }

浙公网安备 33010602011771号