Advertisement
Sweetening

Untitled

Feb 12th, 2025
9
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. navigator.connection.addEventListener('change', function() {
  2. let newIP = getIP();
  3. if (newIP !== storedIP) {
  4. alert("⚠️ SIM Swap Detected! Disconnecting session...");
  5. window.location.href = "logout.php";
  6. }
  7. });
  8.  
  9. async function getIP() {
  10. let res = await fetch("https://api64.ipify.org?format=json");
  11. let data = await res.json();
  12. return data.ip;
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement