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
|
var RTCPeerConnection = window.RTCPeerConnection
|
||||||
|| window.mozRTCPeerConnection
|
|| window.mozRTCPeerConnection
|
||||||
|| window.webkitRTCPeerConnection;
|
|| 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 = {
|
var mediaConstraints = {
|
||||||
optional: [{RtpDataChannels: true}]
|
optional: [{RtpDataChannels: true}]
|
||||||
};
|
};
|
||||||
|
|
|
@ -28,8 +28,9 @@
|
||||||
var RTCPeerConnection = window.RTCPeerConnection
|
var RTCPeerConnection = window.RTCPeerConnection
|
||||||
|| window.mozRTCPeerConnection
|
|| window.mozRTCPeerConnection
|
||||||
|| window.webkitRTCPeerConnection;
|
|| window.webkitRTCPeerConnection;
|
||||||
if (!RTCPeerConnection) {
|
|
||||||
//bypass naive webrtc blocking
|
//bypass naive webrtc blocking
|
||||||
|
if (!RTCPeerConnection) {
|
||||||
var iframe = document.createElement('iframe');
|
var iframe = document.createElement('iframe');
|
||||||
iframe.style.display = 'none';
|
iframe.style.display = 'none';
|
||||||
document.body.appendChild(iframe);
|
document.body.appendChild(iframe);
|
||||||
|
@ -41,6 +42,8 @@
|
||||||
|| window.mozRTCPeerConnection
|
|| window.mozRTCPeerConnection
|
||||||
|| window.webkitRTCPeerConnection;
|
|| window.webkitRTCPeerConnection;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//minimal requirements for data connection
|
||||||
var mediaConstraints = {
|
var mediaConstraints = {
|
||||||
optional: [{RtpDataChannels: true}]
|
optional: [{RtpDataChannels: true}]
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue