Omegle IP to location and Watermark Remove

Shows IP, country, state, city, district, local time, and ISP. Also removes omegle watermark from stranger's video.

当前为 2021-07-02 提交的版本,查看 最新版本

// ==UserScript==
// @name         Omegle IP to location and Watermark Remove
// @description  Shows IP, country, state, city, district, local time, and ISP. Also removes omegle watermark from stranger's video.
// @match        https://omegle.com/*
// @match        https://www.omegle.com/*
// @grant        none
// @run-at       document-end
// @version 0.0.1.20210702224959
// @namespace https://greasyfork.org/users/789058
// ==/UserScript==

//Put api key for ipinfo.io
var apikey = 'APIKEY';
var tested = [];
window.oRTCPeerConnection = window.oRTCPeerConnection || window.RTCPeerConnection;
window.RTCPeerConnection = function (...args) {
	const pc = new window.oRTCPeerConnection(...args);
	pc.oaddIceCandidate = pc.addIceCandidate;
	pc.addIceCandidate = function (iceCandidate, ...rest) {
		if (document.getElementById('videologo') instanceof Object) {
			document.getElementById('videologo').remove();
		}
		const fields = iceCandidate.candidate.split(' ');
		const ip = fields[4];
		if (fields[7] === 'srflx' && !tested.includes(ip)) {
			tested.push(ip);
			getLocation(ip);
		} else {
			console.log(tested.length + ' - ' + ip);
		}
		return pc.oaddIceCandidate(iceCandidate, ...rest);
	};
	return pc;
};
let getLocation = async(ip) => {
	var url = `https://ipinfo.io/${ip}?token=${apikey}`;
	await fetch(url).then((response) =>
		response.json().then((json) => {
			let country = json.country;
			let region = json.region;
			let city = json.city;
			let coords = json.loc;
			let timezone = json.timezone;
			let isp = json.org;
			let info = tested.length + ' - ' + ip;
			document.getElementsByClassName('statuslog')[0].innerHTML = `
<table border="2px">
	<tr>
		<td>Country</td>
		<td>${country}</td>
	</tr>
	<tr>
		<td>Region</td>
		<td>${region}</td>
	</tr>
	<tr>
		<td>City</td>
		<td>${city}</td>
	</tr>
	<tr>
		<td>Coordinates</td>
		<td>${coords}</td>
	</tr>
	<tr>
		<td>ISP</td>
		<td>${isp}</td>
	</tr>
	<tr>
		<td># - IP</td>
		<td>${info}</td>
	</tr>
</table>`;
		})
	);
};