Skip to content

Instantly share code, notes, and snippets.

[Base]
Version = 0.45
File Refresh Time = 15
Large Buffer Size = 4096
Additional Path =
Hosts File Name = Hosts.ini
IPFilter File Name = IPFilter.ini|Routing.txt
[Log]
Print Log Level = 3
2017-05-15 02:33:42,250: telegram.ext.dispatcher [ERROR]
An uncaught error was raised while processing the update
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/telegram/ext/dispatcher.py", line 270, in process_update
handler.handle_update(update, self)
File "/usr/lib/python3.6/site-packages/telegram/ext/messagehandler.py", line 123, in handle_update
return self.callback(dispatcher.bot, update, **optional_args)
File "/root/ehForwarderBot/plugins/eh_telegram_master/__init__.py", line 1130, in msg
return self.process_telegram_message(bot, update)
File "/root/ehForwarderBot/plugins/eh_telegram_master/__init__.py", line 1308, in process_telegram_message
@RoyXiang
RoyXiang / README.md
Last active July 26, 2017 06:38
a sample docker compose file for https://github.com/RoyXiang/docker-EFB

使用说明

  1. 安装好 docker-compose
  2. docker-compose.yml 文件和 config.py 以及 tgdata.db 放在同一个文件夹
  3. 在该目录下执行 docker-compose up -d
  4. 通过 docker-compose logs -f 可以查看日志里输出的二维码之类的信息(CTRL + C 退出)
  5. 更新的话修改 docker-compose.yml 文件里第二行的版本号为新的版本号重新执行 docker-compose up -d 即可

须知:

  1. EFB 微信端使用的是 itchat 这个第三方库,所有的行为目前与微信网页版一致。
  2. 若需长期维持在线,需保持微信移动端在线,卸载或者彻底关闭后台将会导致掉线。

掉线常见情况:

  • 正常掉线(已达到微信网页版的最长挂机时长)

即 Telegram 上会收到掉线提醒,且可以直接在 Telegram 上进行重新登录的操作

diff --git a/plugins/eh_wechat_slave.py b/plugins/eh_wechat_slave.py
index 032608b..8318dd7 100644
--- a/plugins/eh_wechat_slave.py
+++ b/plugins/eh_wechat_slave.py
@@ -687,8 +687,12 @@ class WeChatChannel(EFBChannel):
else:
raise EFBMessageTypeNotSupported()
- if isinstance(r, dict) and r.get('BaseResponse', dict()).get('Ret', -1) != 0:
- raise EFBMessageError(str(r))
@RoyXiang
RoyXiang / firewall.sh
Created December 12, 2013 02:11 — forked from x1a0/firewall.sh
#! /bin/bash
# Set the default policies to allow everything while we set up new rules.
# Prevents cutting yourself off when running from remote SSH.
iptables -P INPUT ACCEPT
iptables -P FORWARD ACCEPT
iptables -P OUTPUT ACCEPT
# Flush any existing rules, leaving just the defaults
iptables -F
@RoyXiang
RoyXiang / updateGit.py
Created November 4, 2012 10:58
python script to update forked repository or submodules
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import re
import subprocess
def updateGit():
cwd = os.getcwd()
git = os.path.abspath(os.path.join(cwd, '.git'))