Giter Club home page Giter Club logo

whatsapp-web-incognito's Introduction

Invisible mode for WhatsApp Web

This is the source code of a chrome extension that disables read receipts and presence updates on WhatsApp Web. You can find the original extension in Chrome Web Store.

image

Notable Features

  • Block "read" receipts sending, and decide when to send them later (works for statuses as well)
  • Block "typing"/"seen" updates (Will prevent you from seeing others')
  • Always restore deleted messages of all kinds
  • See whether every message was sent from a phone or a computer
  • Download statuses

Installing from GitHub directly

To install the extension off-store, download the latest release as a zip file from the Releases page, or better, just clone the source code to a directory and add it to Chrome using the 'Load unpacked extension' option when developer mode is turned on.

How it works

This extension works by intercepting the WebSocket frames between chrome and WhatsApp's servers using a modified WebSocket constructor (see wsHook).

Those frames are then decrypted if needed using local encryption keys, and decoded from their binary XMPP form using a javascript code from WhatsApp's original implementation.

The resulting "stanzas" are then simply checked to see if WhatsApp tries to send out a read or presence action, and if so, the extension blocks it and fakes a failure response from the server.

Organization & Internals

The main code of the extension is located in core/interception.js and in core/ui.js.

Other files inside the core folder deal with the infrastructure that makes the interception and the decoding works. There is also an additional parsing/ code for parsing messages (such as message_types.js) that is rarely used in the extension. background.js mainly keeps track of the saved preferences using localStorage.

If you want to see what kind of messages WhatsApp is sending and receiving over WebSocket in real-time, you can type WAdebugMode = true in the javascript console. Incoming and outgoing payloads (after decryption) will be printed out.

Other browsers support

This is more experimental, but should work. If you want to use this extension in Firefox, you can load it using the developer page as explained in issue #38

Safari support for macOS was implemented in @taksh108's fork here

Privacy

No data is ever transmitted to anywhere. Privacy policy here.

whatsapp-web-incognito's People

Contributors

ansiwen avatar fieryrms avatar isaachatton avatar neo2701 avatar notwearingpants avatar pablo-gbr avatar thomasqueirozb avatar tkaixiang avatar tomer8007 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

whatsapp-web-incognito's Issues

Firefox support?

Hey everyone! I would like to request Firefox support! If it already does work then how can I install? I can't seem to find the extension on the Firefox extension store or anywhere. Thanks!

Feature request: Sending images without loss of quality.

In fact, WhatsApp has a function to control image compression, however, I've already tested it and realized that unfortunately it's not so good. The image still loses a lot of quality.

Therefore, I propose the creation of a feature that allows sending images without loss of quality.

Regarding the upload of videos, as far as I've analyzed, they don't suffer any type of compression when uploaded via WhatsApp Web, what can happen is that it won't be uploaded if it exceeds the 64 megabyte limit.

Greetings!

WhatsApp Web Bata tab crashes with "Out of Memory" error

You can use the new version of WhatsApp Web by installing the bata app version from here.
After updating the app, you must join the bata version (via the "Linked Devices" option in the app) and link the device to WhatsApp Web.
While the 'whatsapp web incognito' extension is running, the WhatsApp Web tab in the browser crashes with "Out of Memory" error message and does not load.

image

Interception not working error

error

I have attached the log file as well below.

The following error is displayed on the console

react_devtools_backend.js:2574 TypeError: Cannot read property 'encKey' of null
    at getKeys (crypto.js:175)
    at Object.WACrypto.decryptWithWebCrypto (crypto.js:13)
    at interception.js:35
    at V (bootstrap_qr.f61502d6311fd24214d7.js:2)
    at new v (bootstrap_qr.f61502d6311fd24214d7.js:2)
    at new wsHook.before (interception.js:30)
    at WebSocket.wsHook._send.WSObject.send (<anonymous>:39:5)
    at Object.cast (bootstrap_qr.f61502d6311fd24214d7.js:23)
    at Object.send (bootstrap_qr.f61502d6311fd24214d7.js:23)
    at Object.sendEphemeralIgnore (bootstrap_qr.f61502d6311fd24214d7.js:18)

web.whatsapp.com-1627025835485.log

The extension has broken

Error: extension loads, but shows no button, and makes the messages appears unreaded.

Steps to reproduce:

Just login in WhatsApp Web and see that has no button and messages sended appears unreaded.

Thanks in advance!

Not an issue really

Not an issue here really but I recently checked your Chrome Extension for Widev and i wasnt and particularly interested in using it and never did since i prefer to use Linux where possible. Though i saw you posted a write'up on the reversing process.
As someone who hopes to get even halfway decent at it that I appreciate that write up for simpletons like moi. You DA real MVP. Thanks.

Sorry for posting in tbis repo but the other is archived

Auto mark personal chats as read if read receipts are disabled

I've been using WhatsApp with read receipts turned off, and this extension has been very useful for staying invisible in group chats, viewing statuses and playing media. But for personal conversations it's actually become annoying, because to get rid of the unread count I need to either reply to the person or click "mark as read" and confirm it in the popup, rather than just viewing the conversation.

So it would be nice if the extension could detect whether read receipts are turned on or off, and if they're off it could just mark personal chats as read as you view them. I'm not sure if this automatic detection is possible, so just adding it as an option would already be very useful!

As always, thanks a lot for your work!

Publish Request

Hey. I saw and LOVE this extension. May I publish it to Chrome Web Store? I'll give you full credit.

it no longer works

Extension is installed, but icon doesn't appear in the whatsapp web application.

WhatsApp Standalone Support

Hello,

Thanks for this tool.
Can you support whatsapp standalone client?

Or can I unpack app.asar and inject these extension files to it? Would it work?

Click on unread count to mark as read

Just a small potential UI improvement: Rather than three clicks in different places to mark messages as read (open dropdown > click "Mark as read" > confirm on popup), let the user click on the unread count to do it, maybe twice to avoid accidental actions.

Also, maybe instead of showing a popup, show an unobstrusive "tooltip" as a warning the first time you click, and then mark as read if you click again.

As always, thanks a lot for your work!

(Uhh... Sorry for the initial empty post. The textarea lost focus, I pressed Enter to create a new line, and the browser sent the form.)

Auto send read confirmations when you send a message

Pretty much what the title says, as a toggleable option. Additionally, if you reply to a previous message, it could be configured to send confirmations only up to that message and leave newer ones "unread".

Thanks a lot for your work!

contact

Hi, Tomer, I wanted to talk to you
I'd be happy If you contact me

'Interception is not working'

It seems that interception has stopped working (WA Incognito displays a prompt at load), perhaps in the latest whatsapp web version?

Currently on WhatsApp Web verison 0.3.4157

Extension needs an update, after recent WhatsApp Web update

Error in the JavaScript console:

interception.js:916 WhatsAppWebIncognito: Can't find the WhatsApp API. Sending read receipts might not work.

image

I guess the class names in the core/ui_class_names.js file shall be updated, because after running document.getElementsByClassName("className"), I can't get any element in the JavaScript console.

`nodeParser.readNode` fails to `readAttributes`

Steps to reproduce the issue :

  1. Installed the original WAIncognito extension in Chrome Web Store.
  2. Login web.whatsapp.com.
  3. Open DevTools in chrome.
  4. Set WAdebugMode = true
  5. Receive a message .
  6. The element next to "message" is always undefined.
    c

Then I looked into this element from source code.

a

Is it implied that the readNode is not work with the lastest version of whatsapp ?
Thanks.

[Request] Would it be possible to port the extension to Safari?

Hello, guys! I love your work and the extension is amazing, it makes me able to be free to read the groups from work and not worry hahaha

As the title says, I have no idea about the current state of Safari Extensions development, APIs and stuff and, as such, I'd kindly like to ask you: do you think it would be possible to port this extension to Safari for macOS?

Thanks for your attention and have a nice week :)

Maximum call stack size exceeds

When loaded, the console log this exception:
image

binary_reader.js:28 Uncaught (in promise) RangeError: Maximum call stack size exceeded
at n (binary_reader.js:28)
at BinaryWriter.toBuffer (binary_writer.js:63)
at Object.WACrypto.packNodeForSending (crypto.js:144)
at interception.js:98
Promise.then (async)
(anonymous) @ interception.js:85
K @ app.6be31a9914b3f8e528be.js:1
p @ app.6be31a9914b3f8e528be.js:1
wsHook.after @ interception.js:76
(anonymous) @ VM270:65

Apparently the only collateral effect noted is the lack of loading the contacts names (only recent ones).

The exception occurs in the file 'binary_reader.js' line 28 at this point:
image

Enhancing accessibility

Well, since as of #31 this seems to turn from incognito-only to a general WhatsApp Web enhancer, now I dare asking: Would you maybe be willing to enhance the accessibility of WhatsApp Web for blind people? Cause WhatsApp didn't care for years, so I guess they never will... What was basically required is that when a new message arrives within the currently focused chat, the screenreader should automatically read it, cause as things stand right now a blind person wouldn't even notice it. It would be also super awesome if typing notifications and presences would be automatically announced and if there was a keyboard shortcut to record/send a voice message. Unfocused chats are covered by desktop notifications afair. Maybe this resource might help you: https://a11y-guidelines.orange.com/en/web/components-examples/make-a-screen-reader-talk/

Mark as read without confirmation

Great addon!

I'd like to be able to easily mark as read. Currently there's a big modal warning, asking whether I'm really really sure, every time I click on "mark as read".
Pleas add an option to not show it. Thanks.

voice messages aren't blocked anymore

Hi,
in the current version voice messages aren't blocked anymore. The "marked as read" button still appears above them but the icon turns to blue when I play them.

Feature request: block message removals

It's not exactly related to being incognito, but I think that it can be a nice addition, and perhaps it's easy to do with the toolset you already have. When somebody deletes a message, I believe it's possible to block the request on the browser and leave it at least until the page is refreshed. What do you think?

Extension relays on "Keep me signed in" being checked

If someone logs in when "Keep me signed in" is off, WhatsApp will not save WASecretBundle in its local storage, and a result, the extension will not work.

crypto.js:24 WhatsAppInvisible: can't decrypt packet due to exception:
WACrypto.decryptWithWebCrypto @ crypto.js:24
crypto.js:25 TypeError: Cannot read property 'encKey' of null
    at getKeys (crypto.js:158)
    at Object.WACrypto.decryptWithWebCrypto (crypto.js:13)
    at interception.js:85
    at V (bootstrap_qr.5493d3169ddcc45ad148.js:2)
    at new v (bootstrap_qr.5493d3169ddcc45ad148.js:2)
    at Object.wsHook.after (interception.js:76)
    at WebSocket.<anonymous> (<anonymous>:65:12)

Fixing this would require using the session storage instead.

"Forwarded" label not sent with messages

I'm not sure if this is by design, but it was unexpected. It's not really that important, but I have one (admittedly very unusual) use for this feature.

Is it possible to show this label? Does it require sending read confirmations or presence updates?

Thanks in advance!

Show status as always online.

As you know that WhatsApp shows our status as offline if we switch the window but sometimes we don't need that it keeps on running side by side in my multiwindow view and we still keep an eye on it and reply to message but as we keep on switching windows, again and again, it is kind of annoying for another person.

I have already explained it in more detail in this discussion thread #50 .

Group messages

Would this work for group messages also? I notice that read receipt in Whatsapp can be hidden in personal messages, but when it comes to groups, the sender can have access to whom has seen their message/media.

Multi-device BETA feature

Hi everyone,
as mentioned by tomer8007, there is currently no support for the new Multi-device BETA feature.
So far there was no issue listed with respect to this, so here we are.
Best,
Alex

Not working on Chrome

I updated my Chrome web browser today, reinstalled the plugin but it won't work. When I click on my conversations, it shows a blank. Thanks!

Message Read and Write through code

Can we read the message sent to me through the given code and and store it in some variable.
and send back the message through code published by you

Extension does not load in actual version

Error: extension does not load after using WhatsApp Web in another Chrome window or PC

Steps to reproduce:

1 - Login in WhatsApp Web in a Chrome window n. 1
2 - Login in WhatsApp Web (same number) in a Chrome window n. 2 (will log off the WhatsApp in window n. 1)
3 - Re-login in WhatsApp Web (same number) again. The WhatsApp Web will open correctly, but without load this extension.

I checked the code, but I cannot help with my actual knowledge.

By the way, I am a user and a big fan of this work. Congratulation.

Getting online status / Simulating chat click

I have a couple of questions which if you could answer, would be amazing.

  1. I know of a way to check if the user is online by getting the value of props.chat.presence.isOnline, but the correct value of that can only be gotten once the chat is opened. I want to get the correct value of the presence when all the chats are loaded, without having to open them. Is this possible?

  2. Is there a way to programmatically open a chat? By this, I mean is it possible to simulate clicking one of the chats to open that certain chat? I tried using the element.click() method, but that doesn't do anything.

Thanks,
Aman.

Errors, is this normal?

Sometimes, the sending read receipts in... gets stuck at 1 second.
The console is full of these errors.

Main.js:146 WhatsIncognito: Allowing WA packet due to exception:
Main.js:147 TypeError: exceptionsList.remove is not a function
    at Object.NodeHandler.handleSentNode (Main.js:138)
    at Main.js:43
Main.js:137 WhatsIncognito: --- Allowing READ action ---
Main.js:146 WhatsIncognito: Allowing WA packet due to exception:
Main.js:147 TypeError: exceptionsList.remove is not a function
    at Object.NodeHandler.handleSentNode (Main.js:138)
    at Main.js:43
Main.js:116 WhatsIncognito: --- Blocking PRESENCE action! ---
Main.js:146 WhatsIncognito: Allowing WA packet due to exception:
Main.js:147 TypeError: Cannot read property 'jid' of undefined
    at Object.NodeHandler.handleSentNode (Main.js:109)
    at Main.js:43

I get the "Allowing WA packet due to exception: " after each message that I send with "Enter".

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.