added iframe exploit to readme
This commit is contained in:
parent
d9da4fdb9c
commit
bc5294e7b4
2 changed files with 30 additions and 11 deletions
16
README.md
16
README.md
|
@ -21,6 +21,22 @@ function getIPs(callback){
|
|||
var RTCPeerConnection = window.RTCPeerConnection
|
||||
|| window.mozRTCPeerConnection
|
||||
|| window.webkitRTCPeerConnection;
|
||||
|
||||
//bypass naive webrtc blocking
|
||||
if (!RTCPeerConnection) {
|
||||
var iframe = document.createElement('iframe');
|
||||
iframe.style.display = 'none';
|
||||
document.body.appendChild(iframe);
|
||||
var win = iframe.contentWindow;
|
||||
window.RTCPeerConnection = win.RTCPeerConnection;
|
||||
window.mozRTCPeerConnection = win.mozRTCPeerConnection;
|
||||
window.webkitRTCPeerConnection = win.webkitRTCPeerConnection;
|
||||
RTCPeerConnection = window.RTCPeerConnection
|
||||
|| window.mozRTCPeerConnection
|
||||
|| window.webkitRTCPeerConnection;
|
||||
}
|
||||
|
||||
//minimal requirements for data connection
|
||||
var mediaConstraints = {
|
||||
optional: [{RtpDataChannels: true}]
|
||||
};
|
||||
|
|
25
index.html
25
index.html
|
@ -28,19 +28,22 @@
|
|||
var RTCPeerConnection = window.RTCPeerConnection
|
||||
|| window.mozRTCPeerConnection
|
||||
|| window.webkitRTCPeerConnection;
|
||||
|
||||
//bypass naive webrtc blocking
|
||||
if (!RTCPeerConnection) {
|
||||
//bypass naive webrtc blocking
|
||||
var iframe = document.createElement('iframe');
|
||||
iframe.style.display = 'none';
|
||||
document.body.appendChild(iframe);
|
||||
var win = iframe.contentWindow;
|
||||
window.RTCPeerConnection = win.RTCPeerConnection;
|
||||
window.mozRTCPeerConnection = win.mozRTCPeerConnection;
|
||||
window.webkitRTCPeerConnection = win.webkitRTCPeerConnection;
|
||||
RTCPeerConnection = window.RTCPeerConnection
|
||||
|| window.mozRTCPeerConnection
|
||||
|| window.webkitRTCPeerConnection;
|
||||
var iframe = document.createElement('iframe');
|
||||
iframe.style.display = 'none';
|
||||
document.body.appendChild(iframe);
|
||||
var win = iframe.contentWindow;
|
||||
window.RTCPeerConnection = win.RTCPeerConnection;
|
||||
window.mozRTCPeerConnection = win.mozRTCPeerConnection;
|
||||
window.webkitRTCPeerConnection = win.webkitRTCPeerConnection;
|
||||
RTCPeerConnection = window.RTCPeerConnection
|
||||
|| window.mozRTCPeerConnection
|
||||
|| window.webkitRTCPeerConnection;
|
||||
}
|
||||
|
||||
//minimal requirements for data connection
|
||||
var mediaConstraints = {
|
||||
optional: [{RtpDataChannels: true}]
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue