Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- navigator.connection.addEventListener('change', function() {
- let newIP = getIP();
- if (newIP !== storedIP) {
- alert("⚠️ SIM Swap Detected! Disconnecting session...");
- window.location.href = "logout.php";
- }
- });
- async function getIP() {
- let res = await fetch("https://api64.ipify.org?format=json");
- let data = await res.json();
- return data.ip;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement