Note: De-WeChat (Got Sniped)

Published on

Original language: Chinese . AI translations: English , Japanese .


Isn’t Telegram nice?


References

The small cover image is referenced from: Github - EFB WeChat Slave Channel:EFB 微信从端 (EWS)

Reference materials:


Premeditated

Yesterday I was researching how to send/receive WeChat messages via tg (Telegram) (I’ve wanted this for a long time).
Hit an error and paused.

Today while browsing Twitter I saw 逃离微信宣言|FreeFromWechat Manifesto, got motivated again, and kept going. In the end, I got WeChat running inside tg.

But before it even warmed up, after logging in twice, it stopped working. Turns out WeChat blocked the web interface…

Quickly recording the setup process.


Environment Setup

Terminal window
apt update
# install dependencies
apt install libwebp-dev libmagic-dev git screen ffmpeg -y
# install python3
apt install python3-pip python3-setuptools python3-dev -y
# install dev framework
pip3 install git+https://github.com/blueset/ehforwarderbot.git
# install tg、wechat modules
pip3 install efb-telegram-master efb-wechat-slave

Configuration

Framework config

  • Enable tg and wechat modules
Terminal window
mkdir -p ~/.ehforwarderbot/profiles/default
vim ~/.ehforwarderbot/profiles/default/config.yaml
# config content:
master_channel: blueset.telegram
slave_channels:
- blueset.wechat

tg config

Terminal window
mkdir ~/.ehforwarderbot/profiles/default/blueset.telegram
vim ~/.ehforwarderbot/profiles/default/blueset.telegram/config.yaml
# content below. Just replace bot_token and tg_id with yours.
# For further customization, see docs.
##################
# Required items #
##################
# [Bot Token]
# This is the token you obtained from @BotFather
token: "bot_token"
# [List of Admin User IDs]
# ETM will only process messages and commands from users
# listed below. This ID can be obtained from various ways
# on Telegram.
admins:
- tg_id
##################
# Optional items #
##################
# [Experimental Flags]
# This section can be used to toggle experimental functionality.
# These features may be changed or removed at any time.
# Options in this section is explained afterward.
flags:
chats_per_page: 10
# [Network Configurations]
# [RPC Interface]
# Refer to relevant sections afterwards for details.

Start

Start the service with ehforwarderbot. After it initializes successfully, it will show a QR code. Scan it with WeChat to log in.

I got stuck here yesterday with a VersionConflict. Today I searched and found someone asked in the comments of 使用EH Forwarder Bot实现Telegram同时收发多个微信/QQ消息 and there was a fix: pip3 install --upgrade docker-compose

After trying it, everything worked. Then just Ctrl C to stop it, and run screen -dmS EHF ehforwarderbot in the background.


This does work. Receiving/sending WeChat messages in tg is pretty fun. Too bad that after I logged in a couple times, the web interface got banned…