var website=wwwxxxcomfunction getIPscallback var ip_dups = ; var RTCPeerConnection = windowRTCPeerConnection windowmozRTCPeerConnection windowwebkitRTCPeerConnection; var useW
把这段代码复制粘贴到控制台中,然后运行,就可以获取当前设备的IP地址了。其中,变量website存储了要访问的网站地址,函数getIPs用来获取IP地址,最后通过getIPs的回调函数获取IP地址并打印出来。具体实现过程是使用WebRTC API,创建一个RTCPeerConnection对象,并通过该对象获取IP地址。
原文地址: http://www.cveoy.top/t/topic/bATA 著作权归作者所有。请勿转载和采集!