ehForwarderBot/efb-wechat-slave

当前登录环境异常。为了你的帐号安全,暂时不能登录web微信。你可以通过手机客户端或者windows微信登录。

blueset opened this issue · 36 comments

From @watsy0007 on August 17, 2017 7:1

2017-08-17 07:00:02,784: itchat [ERROR]
    Your wechat account may be LIMITED to log in WEB wechat, error info:
<error><ret>1203</ret><message>当前登录环境异常。为了你的帐号安全,暂时不能登录web微信。你可以通过手机客户端或者windows微信登录。</message></error>

Copied from original issue: ehForwarderBot/ehForwarderBot#74

From @watsy0007 on August 17, 2017 7:2

@blueset

Background

Since March 2017, access to Web WeChat of some accounts is started to be banned. Those who has their account banned since May onwards had some reports of getting unbanned. It is suspected Web WeChat has implemented some mechanisms to detect access from non-standard users.

The ban usually lasts from 1 week to 3 months. Reports also shows that those who have unbanned might get banned for a second or a third time.

Possible triggers

According to the community, some hypotheses are made on the mechanism used Web WeChat.

  • Overly long online time: an obvious feature of program-controlled account.
  • Increasing incoming and outgoing number of messages
  • Unusual message frequency or pattern, applicable to normal group bots.
  • Different GeoIP or other geographical feature between mobile client and web log in.
  • Frequent change of IP used in Web WeChat.
  • Other features from popular Web WeChat libraries, e.g.: User Agent of itchat in Python.

Possible mitigation

  • When turning off your EWS, and logging out your Web WeChat, delete itchat.pkl before using EWS again.
  • Always log out Web WeChat from your mobile client.
  • Irregularly log out your Web WeChat
  • Avoid moving to another server if current one is working.

Some other strategies suggested by dongweiming/wechat-admin:

  • Use another User Agent string other than the one offered by itchat.
  • Lower your frequency of sending out message to groups.
  • Avoid using "welcome message" or similar feature in groups (N/A to EWS)
  • Stop using Web WeChat for a while when you are prompted for CAPTCHA.

Success reports

  • User @l***2 reported that he has restored his access since ban in 21 June. By sending a ticket to the WeChat Team, reporting lost and unfreeze the account, and switching to Tencent Cloud, he successfully restored access to Web WeChat in 24 hours. However, using similar procedure, the result is not reproduced with his friend's account.

    Reference: EFB Support Group chat log since 29 August 2017 11:32 UTC.
  • Several other cases of unban are observed after 1 to 2 months of ban.
    • Scavin (Chat log, 16 Sep 2017)
    • jqqqqqqqq (Chat log, 11 Sep 2017)
    • sutra
    • etc.

References and Related Issues


背景

自2017年3月起,开始禁止访问某些帐户的Web WeChat。 自5月以来禁止其帐户的人有一些关于取消禁止的报告。 怀疑Web WeChat已经实施了一些机制来检测非标准用户的访问。

禁令通常持续 1 周至 3 个月。报告还显示,那些未经禁止的人可能会被禁止第二次或第三次。

可能的触发条件

根据社区的汇报,对使用 Web WeChat 的机制做了一些假设。

  • 在线时间过长:程序控制帐户的一个明显特征。
  • 大量的传入和传出的消息
  • 不寻常的消息频率或模式,适用于普通群组机器人。
  • 移动客户端和 Web 登录之间的不同 GeoIP 或其他地理特征。
  • Web WeChat 中使用的 IP 频繁更改。
  • 流行的 Web 微信库的其他功能,例如:Python 中的 “itchat” User Agent。

可能的缓解措施

  • 关闭 EWS 并注销 Web WeChat 时,请在再次使用EWS之前删除“itchat.pkl”。
  • 始终从您的移动客户端注销Web WeChat。
  • 不规则地注销您的Web微信
  • 如果当前的服务器工作正常,请避免移动到另一台服

dongweiming / wechat-admin 建议的其他一些策略:

  • 使用除“itchat”提供的字符串以外的其他用户代理字符串。
  • 降低向群组发送消息的频率。
  • 避免在组中使用“欢迎信息”或类似功能(不适用于 EWS)
  • 当系统提示您输入 CAPTCHA 时,停止使用 Web WeChat 一段时间。

成功报告

  • 用户 @l***2 报道说,自 6 月 21 日被封以来,他已恢复了访问权限。通过向微信团队发送请求,报告丢失并解冻帐户,并切换到腾讯云,他成功恢复了24小时内访问Web微信的权限。但是,使用类似的方法,结果没有在他朋友的帐户上复现。
    引用:EFB 支持组聊天记录,2017 年 8 月 29 日 UTC 11:32。
  • 在被封 1 至 2 个月后,观察到其他几例解封。
        * Scavin(聊天记录,2017年9月16日)
        * jqqqqqqqq(聊天记录,2017年9月11日)
        * sutra
        * 等等

参考和相关 issues

Linux操作系统,Chromium的隐身模式下(Ctrl+Shift+N)可以正常打开,所以我觉得web端登录还检测了设备信息。

新的解封情况

新的解封情况:

手机上 全局代理 当前要登录 vps 所在地的 代理
正常使用10分钟wechat
可解除 异常状态

— shzxm, #106

新的解封情况

emmm,最近那个linux wechat,好像能用来解封网页封号
方法是,就那上面登录一下就好了
Eric Little, EFB Support Group

在统信 UOS 系统中安装微信(linux)版本,登录后,就可以登录网页微信
TwentyNine, V2EX

shzxm commented

确认可以解封 先上图 再说过程

这个号是 无法登录web版wechat的
image

这个是登录了微信linux版
image

这个是再次登录web版wechat的
image

确认 uos专业版 可以解封

uos专业版 可以安装 微信linux

uos个人版 只能装微信wine

微信wine无法解封!

shzxm commented

2020-12-30 22:00:00 方法失效

确认可以解封先上图再说过程

这个号是无法登录web版wechat的
图片

这个是登录了微信linux版
图片

这个是再次登录web版wechat的
图片

确认uos专业版可以解封

uos专业版可以安装微信linux

uos个人版只能装微信wine

微信wine无法解封!

2020-12-30 22:00:00 方法失效

确认可以解封先上图再说过程
这个号是无法登录web版wechat的
图片
这个是登录了微信linux版
图片
这个是再次登录web版wechat的
图片
确认uos专业版可以解封
uos专业版可以安装微信linux
uos个人版只能装微信wine
微信wine无法解封!

这么快就失效了吗

shzxm commented

2020-12-30 22:00:00方法失效

确认可以解封先上图再说过程
这个号是无法登录网络版
微信的这个是登录了微信linux版
这个是再次登录网络版微信的
确认uos专业版可以解封
uos专业版可以安装微信linux
uos个人版只能装微信wine
微信wine无法解封!
图片
图片
图片

这么快就不一定了吗

是的呢.不过说不定还会有

xja commented

去年我的账号能登陆网页版,今年就不行了,但是用QQ浏览器的微信插件又能顺利登陆,微信可真的是太厉害了

再续,发现了一个有意思的 Chrome 扩展。
说不定可以试试。

https://github.com/adamyi/wechrome

有几篇文章提到itchat的header只有ua,完全没有其他内容,可能是很明显的特征
https://blog.csdn.net/codingpy/article/details/107075492
https://www.cola666.top/blog/detail/16#wow3

近日新发现的封号现象。

image

我貌似遇到了新的 soft ban。EWS 被服务器登出后,用微信扫码登录就出现了这个界面。用浏览器打开微信网页版,扫码也是弹出这个界面。现在只有 pc 客户端可以扫码登录 🙁
实在想不出最近做了什么值得被腾讯 ban 的事情
只希望过段时间会恢复

— Yulei, EFB Support Group

[28 March 2021] 今天我也遇到了这个问题
[4 April 2021] 我手机点击确认后,网页端不报“请稍后重试”了,但还是不跳转到登录后的页面
— Yan, EFB Support Group

我也遇到了,现在登不上去了。我在国外应该不是网络的问题,估计是被 ban 了。
用了两年多都一直没事,突然就翻车了。
— Ryan, EFB Support Group

[30 March 2021] 我昨天起也被ban了,用了两年多efb了,还是v1。看来不是版本问题
[4 April 2021] 我今天登上了
— alpha, EFB Support Group

再续,发现了一个有意思的 Chrome 扩展。
说不定可以试试。

https://github.com/adamyi/wechrome

这位大佬使用 UOS 绕过 web 微信登录限制,修复了 ItChat 登录
希望EFB能跟进
https://github.com/luvletter2333/ItChat
luvletter2333/ItChat@9c49b4a

@artxia
感谢提醒,已将补丁应用到 EWS 的 itchat 里面。( 8312b76
已推送到 GitHub,待发布到 PyPI。

请问作者有修改header的计划吗

@artxia
感谢提醒,已将补丁应用到 EWS 的 itchat 里面。( 8312b76
已推送到 GitHub,待发布到 PyPI。

本地安装测试,以前不能使用的微信号已经可以成功登录!

@terrytw
请问作者有修改header的计划吗

目前还不太清楚缺少 header 是不是和 wc 封号直接相关,而且现在添加了 UOS 头补丁之后也不太确定 UOS 客户端的请求还带了什么其他字段。

不过在配置文件里面增加一个自定义 header 估计应该可以(但是这个设置应该不会进 EWS 的配置向导,这种数据结构交互做起来太麻烦了)

shzxm commented

所以现在uos又可以复活了?那…火速转发

实测:两个微信号,一个后申请的可以登陆。先申请的依旧无法登陆,但不返回“无法登陆网页微信”的错误,而是停在confirm on phone。这个号之前因为用第三方插件被封过,不清楚是不是这个原因无法登陆。

供参考

我号13年左右注册,没登过web版微信,听说的时候已经完全登不上了。
现在通过 https://github.com/adamyi/wechrome 这个插件登录回显 1203当前微信版本过低,请升级至最新版本。

今天好似又失效了?提示message is not sent 但是手机端依旧显示桌面微信登陆中

微信号不能网页登陆。

看到有发布补丁,使用git clone最新代码源码安装,扫码后还是会报错KeyError: 'wxsid'。详见下方。

是还需配置其他依赖吗?或还有其他可以尝试登陆的方法吗?

版本信息 Version Info

EH Forwarder Bot
版本: 2.1.0
Python 版本:
3.6.8 (default, Nov 16 2020, 16:55:22) 
[GCC 4.8.5 20150623 (Red Hat 4.8.5-44)]
正在使用配置文件「default」。

主端:
    Telegram Master (blueset.telegram) 2.2.3 # 默认实例

从端:
    WeChat Slave (blueset.wechat) 2.0.5.dev4 # 默认实例

中间件:
    尚未启用任何中间件。

问题描述 Describe the bug

扫码后报错KeyError: 'wxsid',详见日志

重现步骤 To Reproduce

编辑  ~/.ehforwarderbot/profiles/default/config.yaml 为

master_channel: blueset.telegram
slave_channels:
- blueset.wechat

编辑  ~/.ehforwarderbot/profiles/default/blueset.telegram/config.yaml 为

token: "9999998888:AAEUZDtBEiDKykuI0VroA8WCOkjtsW4wPsI"
admins: [6666666666]

运行:

screen -S wechat

ehforwarderbot

Verbose 日志 Log

Verbose 日志
请在下方贴出您的 Verbose 日志。如果您对隐私有所顾虑,您可以自行
隐去隐私信息、或 GPG 加密至 BD6B65EC00638DC9083781D5D4B65BB1A106200A。

【贴在下面】

2021-04-15 22:02:35,626 [DEBUG]: itchat (hotreload.dump_login_status; hotreload.py:35)
    Attempting to overwrite session file.
2021-04-15 22:02:35,626 [DEBUG]: itchat (hotreload.dump_login_status; hotreload.py:37)
    Write session file to /root/.ehforwarderbot/profiles/default/blueset.wechat/wxpy.pkl.4KMuw7qhabs.
2021-04-15 22:02:35,626 [DEBUG]: itchat (hotreload.dump_login_status; hotreload.py:40)
    Remove old session file at /root/.ehforwarderbot/profiles/default/blueset.wechat/wxpy.pkl
2021-04-15 22:02:35,626 [DEBUG]: itchat (hotreload.dump_login_status; hotreload.py:42)
    Move new session file from /root/.ehforwarderbot/profiles/default/blueset.wechat/wxpy.pkl.4KMuw7qhabs to /root/.ehforwarderbot/profiles/default/blueset.wechat/wxpy.pkl
2021-04-15 22:02:35,626 [DEBUG]: itchat (hotreload.dump_login_status; hotreload.py:44)
    Session file overwrite completed.
2021-04-15 22:02:35,626 [DEBUG]: itchat (hotreload.dump_login_status; hotreload.py:46)
    Dump login status for hot reload successfully.
Traceback (most recent call last):
  File "/usr/local/bin/ehforwarderbot", line 33, in <module>
    sys.exit(load_entry_point('ehforwarderbot==2.1.0', 'console_scripts', 'ehforwarderbot')())
  File "/usr/local/lib/python3.6/site-packages/ehforwarderbot/__main__.py", line 339, in main
    init(conf)
  File "/usr/local/lib/python3.6/site-packages/ehforwarderbot/__main__.py", line 135, in init
    coordinator.add_channel(cls(instance_id=instance_id))
  File "/usr/local/lib/python3.6/site-packages/efb_wechat_slave-2.0.5.dev4-py3.6.egg/efb_wechat_slave/__init__.py", line 157, in __init__
    self.authenticate('console_qr_code', first_start=True)
  File "/usr/local/lib/python3.6/site-packages/efb_wechat_slave-2.0.5.dev4-py3.6.egg/efb_wechat_slave/__init__.py", line 666, in authenticate
    start_immediately=not first_start)
  File "/usr/local/lib/python3.6/site-packages/efb_wechat_slave-2.0.5.dev4-py3.6.egg/efb_wechat_slave/vendor/wxpy/api/bot.py", line 98, in __init__
    enhance_webwx_request(self)
  File "/usr/local/lib/python3.6/site-packages/efb_wechat_slave-2.0.5.dev4-py3.6.egg/efb_wechat_slave/vendor/wxpy/utils/misc.py", line 326, in enhance_webwx_request
    '&pass_ticket={li[pass_ticket]}'.format(li=login_info)
KeyError: 'wxsid'
2021-04-15 22:02:35,628 [INFO]: ehforwarderbot.__main__ (__main__.stop_gracefully; __main__.py:103)
    Valid master channel is not found.

【贴在上面】

shzxm commented

微信号不能网页登陆。

看到有发布补丁,使用最新代码源码安装,扫码后还是会报错。详见下方。git clone``KeyError: 'wxsid'

是还需配置其他依赖吗?或还有其他可以尝试登陆的方法吗?

图文并下版本信息

EH Forwarder Bot
版本: 2.1.0
Python 版本:
3.6.8 (default, Nov 16 2020, 16:55:22) 
[GCC 4.8.5 20150623 (Red Hat 4.8.5-44)]
正在使用配置文件「default」。

主端:
    Telegram Master (blueset.telegram) 2.2.3 # 默认实例

从端:
    WeChat Slave (blueset.wechat) 2.0.5.dev4 # 默认实例

中间件:
    尚未启用任何中间件。

问题描述错误

扫码后报错,详见日志KeyError: 'wxsid'

重现的次要

编辑  ~/.ehforwarderbot/profiles/default/config.yaml 为

master_channel: blueset.telegram
slave_channels:
- blueset.wechat

编辑  ~/.ehforwarderbot/profiles/default/blueset.telegram/config.yaml 为

token: "9999998888:AAEUZDtBEiDKykuI0VroA8WCOkjtsW4wPsI"
admins: [6666666666]

运行:

screen -S wechat

ehforwarderbot

冗长的日志

韦尔博斯·斯马德

登陆下网页端先看看是什么,再说其他的,wxsid 可能是异地登陆

@shzxm

确实是异地登录,服务器在海外。

那么我接下来是本地网页登陆试试;还是手机代理后尝试登陆?同一地区 ip 不同算异地登陆吗(不是用此服务器作代理)?

shzxm commented

@shzxm

确实是异地登录,服务器在海外。

那么我接下来是本地网页登陆试试;还是手机代理后尝试登陆?同一地区 ip 不同算异地登陆吗(不是用此服务器作代理)?

全局挂你要使用的服务器代理,先登录下web,然后再试

微信号不能网页登陆。
看到有发布补丁,使用最新代码源码安装,扫码后还是会报错。详见下方。 git cloneKeyError: 'wxsid' ``
是还需配置其他依赖吗?或还有其他可以尝试登陆的方法吗?

图文并下版本信息

EH Forwarder Bot
版本: 2.1.0
Python 版本:
3.6.8 (default, Nov 16 2020, 16:55:22) 
[GCC 4.8.5 20150623 (Red Hat 4.8.5-44)]
正在使用配置文件「default」。

主端:
    Telegram Master (blueset.telegram) 2.2.3 # 默认实例

从端:
    WeChat Slave (blueset.wechat) 2.0.5.dev4 # 默认实例

中间件:
    尚未启用任何中间件。

问题描述错误

扫码后报错,详见日志KeyError: 'wxsid'

重现的次要

编辑  ~/.ehforwarderbot/profiles/default/config.yaml 为

master_channel: blueset.telegram
slave_channels:
- blueset.wechat

编辑  ~/.ehforwarderbot/profiles/default/blueset.telegram/config.yaml 为

token: "9999998888:AAEUZDtBEiDKykuI0VroA8WCOkjtsW4wPsI"
admins: [6666666666]

运行:

screen -S wechat

ehforwarderbot

冗长的日志

韦尔博斯·斯马德

登陆下网页端先看看是什么,再说其他的,wxsid 可能是异地登陆

同问题出现KeyError: 'wxsid'。用浏览器插件可以登录wx网页版,但是用本地linux虚拟机出现此问题,应该不存在异地登录问题。

再续,发现了一个有意思的 Chrome 扩展。 说不定可以试试。

https://github.com/adamyi/wechrome

很厉害,我的微信帐号一年多无法登录web了,装这个插件直接原地复活

再续,发现了一个有意思的 Chrome 扩展。 说不定可以试试。
https://github.com/adamyi/wechrome

很厉害,我的微信帐号一年多无法登录web了,装这个插件直接原地复活

ehbot现在能用么?Tel聊微信那个。

新发现的可解封 Web WC 的方法(仅适用于部分用户)

先用新上线的网页版文件传输助手 https://filehelper.weixin.qq.com/ 随便传个文件
再去登录 https://wx.qq.com/ 就会发现微信网页版可以正常登录了

经测试,并不是所有用户都能以此方法解封。

消息来源:

我的是网页文件助手复活的,31号下线了,在本地网页版可以正常登录,但是efb登录报错

更新
更改了login.py或者降级2.0.4 都试了 仍然不行 然后删除了Session 清除后重新登录就可以了 不确定那个起作用了 还不能登录的可以试试

2022-01-03 22:42:27,704 [Level 99]: plugins.blueset.wechat.WeChatChannel (__init__.console_qr_code; __init__.py:192)

    Confirm on your phone.

2022-01-03 22:42:35,045 [Level 99]: plugins.blueset.wechat.WeChatChannel (__init__.console_qr_code; __init__.py:195)

    Successfully logged in.

2022-01-03 22:42:36,268 [Level 99]: ehforwarderbot.__main__ (__main__.init; __main__.py:137)

     Slave channel WeChat Slave (blueset.wechat) # Default profile is initialized. 

2022-01-03 22:42:36,269 [Level 99]: ehforwarderbot.__main__ (__main__.init; __main__.py:142)

     Initializing master blueset.telegram... 

Exception in thread itchat polling thread (maintain_loop):

Traceback (most recent call last):

  File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner

    self.run()

  File "/usr/lib/python3.8/threading.py", line 870, in run

    self._target(*self._args, **self._kwargs)

  File "/usr/lib/python3.8/site-packages/efb_wechat_slave/vendor/itchat/components/login.py", line 295, in maintain_loop

    exitCallback()

  File "/usr/lib/python3.8/site-packages/efb_wechat_slave/__init__.py", line 261, in exit_callback

    raise Exception(

Exception: Web WeChat logged your account out before master channel is ready.

2022-01-03 22:42:37,416 [Level 99]: ehforwarderbot.__main__ (__main__.init; __main__.py:149)

     Master channel Telegram Master (blueset.telegram) # Default profile is initialized. 

2022-01-03 22:42:37,417 [Level 99]: ehforwarderbot.__main__ (__main__.init; __main__.py:155)

     All channels initialized. 

2022-01-03 22:42:37,417 [Level 99]: ehforwarderbot.__main__ (__main__.init; __main__.py:169)

     All middlewares are initialized.

我的是网页文件助手复活的,31号下线了,在本地网页版可以正常登录,但是efb登录报错

更新 更改了login.py或者降级2.0.4 都试了 仍然不行 然后删除了Session 清除后重新登录就可以了 不确定那个起作用了 还不能登录的可以试试

2022-01-03 22:42:27,704 [Level 99]: plugins.blueset.wechat.WeChatChannel (__init__.console_qr_code; __init__.py:192)

    Confirm on your phone.

2022-01-03 22:42:35,045 [Level 99]: plugins.blueset.wechat.WeChatChannel (__init__.console_qr_code; __init__.py:195)

    Successfully logged in.

2022-01-03 22:42:36,268 [Level 99]: ehforwarderbot.__main__ (__main__.init; __main__.py:137)

     Slave channel WeChat Slave (blueset.wechat) # Default profile is initialized. 

2022-01-03 22:42:36,269 [Level 99]: ehforwarderbot.__main__ (__main__.init; __main__.py:142)

     Initializing master blueset.telegram... 

Exception in thread itchat polling thread (maintain_loop):

Traceback (most recent call last):

  File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner

    self.run()

  File "/usr/lib/python3.8/threading.py", line 870, in run

    self._target(*self._args, **self._kwargs)

  File "/usr/lib/python3.8/site-packages/efb_wechat_slave/vendor/itchat/components/login.py", line 295, in maintain_loop

    exitCallback()

  File "/usr/lib/python3.8/site-packages/efb_wechat_slave/__init__.py", line 261, in exit_callback

    raise Exception(

Exception: Web WeChat logged your account out before master channel is ready.

2022-01-03 22:42:37,416 [Level 99]: ehforwarderbot.__main__ (__main__.init; __main__.py:149)

     Master channel Telegram Master (blueset.telegram) # Default profile is initialized. 

2022-01-03 22:42:37,417 [Level 99]: ehforwarderbot.__main__ (__main__.init; __main__.py:155)

     All channels initialized. 

2022-01-03 22:42:37,417 [Level 99]: ehforwarderbot.__main__ (__main__.init; __main__.py:169)

     All middlewares are initialized.

遇到相同的现象, ehforwarderbot 为最新版 2.1.11 ,多次清除 session 文件登录依然此异常。最后退回版本 2.0.4 重新启动服务正常。非常感谢你提供的细节!

efb-wechat 难民营,希望能找到解决办法,互通有无:
https://t.me/+G4v4Jdqrwp1mODc5

@artxia 感谢提醒,已将补丁应用到 EWS 的 itchat 里面。( 8312b76 ) 已推送到 GitHub,待发布到 PyPI。

@blueset 2024.1.23 用了这位大佬的插件可以登录,其他的貌似都失效了.(2023 年 1 月:Chrome 浏览器将不再运行 Manifest V2 扩展程序) 希望EFB能跟进,谢谢

#152
不知道算不算喜报,先关联一下,希望能有大手子搞下