wawhal

a personal blog

Track disabled last seen on WhatsApp

2019-04-07 tech

This is a simple trick where you just replace a human eye with 12 lines of code. It looks for the “online” status of your victim on WhatsApp web and logs whenever they come online and go offline. You can write this code yourself if you want. If not, read on.

Using this trick, you can track the last-seen of a person even if it is disabled/hidden.

Requirements

You will need:

  • A laptop/desktop with an internet connection and an internet browser such as Chrome, Firefox or Safari

Instructions

  1. Go to WhatsApp Web on your computer from your browser. If you have never used WhatsApp web, just follow the instructions on the screen to set it up.

  2. Open the chat window of the person that you want to track

  3. Open browser’s developer tools. If you are using Chrome or Firefox, you can do this by simply pressing F12. If you are using Safari, press Option + Command + i.

  4. Once you have opened it, go to the tab called ‘Console’ and paste this:

    let _isOnline = false;
    function _logStatus() {
      let curPageHtml = document.documentElement.innerHTML;
      if(curPageHtml.includes('<span title="online"') || curPageHtml.includes('<span title="typing"')) {
        !_isOnline && console.log(`Came online at ${(new Date()).toLocaleTimeString()}`);
        _isOnline = true;
      } else {
        _isOnline && console.log(`Went offline at ${(new Date()).toLocaleTimeString()}`);
        _isOnline = false;
      }
    }
    setInterval(_logStatus, 1000);
  5. That’s it. Keep this window open and go do something else. You can come back and check logs of when your victim came online and went offline.

    Came online at 09:14:29
    Went offline at 09:14:38

Limitations

  1. This is just a replacement for a human eye
  2. You can track only one person at a time
  3. You will appear online all the time to your victim (so they might actully suspect that you are tracking them)
  4. If the website web.whatsapp.com updates in future, this might not work. I will try to keep this updated whenever I notice a change in WhatsApp web (no promises)