Git Product home page Git Product logo

autospy's Introduction

auto_spy

介绍

简单介绍一下SPY的功能: 监听(跟傻妞的SPY一样):自动监听设置好的频道或群,捕捉关键词,并转换成你脚本对应的环境变量,自动启动对应的任务

队列:当瞬间涌入多个同一脚本变量时,自动进入队列,当前面一个跑完,根据设置延时,自动跑下一个变量,有限抢占最新变量,并且不会遗漏线报做到捡漏;

多频道:每个频道线报优势均有所不同,SPY支持多频道监听,不同变量自动转换成脚本对应环境变量,实现多频道自动监听;

去重:多个频道线报有先后,内容有重复,SPY自动去重,防止跑无用线报内容,抢占第一手脚本运行;

多任务:每个脚本对应一个任务,均采用多线程管理,独立运行,互不干扰;

不易黑IP:因为是队列,每次跑的间隔自行设置,所以只要调整得当,不易黑IP,当然脚本造成的黑没有办法;

安装教程

参考教程1(faker写的):https://thin-hill-428.notion.site/Spy-abac16b82bec43c3845071b8fe81361f

参考教程2(小白照着faker教程写的):https://www.kejiwanjia.com/jiaocheng/115954.html

下面是我写的简要教程:

新装的自己按这个流程摸索吧:

准备好以下东西:

* 可以访问的青龙ip、id、密钥
* spy授权码,没有授权的申请试用,在群内发送[/spy 试用]和[/spy 授权]即可获取授权码,超级授权也用试用授权码
* 一个外国籍服务器,国内的自己想办法折腾
* 加入spy授权群,否则无法完成授权功能
https://t.me/spy_auth


开始:

1、一键,运行一次就行,那个登录的时候ctrl+c跳过:
wget -O autospy https://raw.githubusercontent.com/xieshang/AutoSpy/master/docker.sh && chmod +x autospy && ./autospy

进入容器:
docker exec -it auto_spy bash
 
强制升级:
bash <(curl -s -L https://raw.githubusercontent.com/xieshang/AutoSpy/master/spy_update.sh)


3、登录

1、把启动脚本换个名字
docker exec -it auto_spy bash
mv auto_spy_bot.py auto_spy_bot2.py
exit

2、重启容器,使之不自动启动
docker restart auto_spy

3、手动启动
docker exec -it auto_spy bash
pip uninstall telethon
pip install telethon==1.24.0
pip3 install --user snowland-smx

调试启动:
python3 auto_spy_bot2.py

登录,改配置测试,直到你满意为止

后台启动:
python3 auto_spy_bot2.py &

4、没问题了,换回自动启动
mv auto_spy_bot2.py auto_spy_bot.py
exit

docker restart auto_spy

SPY指令

1、spy ?:查看spy支持的指令列表

2、spy:查看队列情况,10秒后自动撤回; 3、spy 重启:重启SPY; 4、spy 升级:升级到最新的SPY;

........

问题排查

  • 登录TG的时候没跳出来要求输入电话?
请确认配置文件的API和hash是否填写正确;
  • 发spy没反应?
1、确认masterid是不是你自己的?
2、spy有没有在运行呢?如果是screen后台

autospy's People

Contributors

xieshang 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

autospy's Issues

更新之后无法正常启动

sys info:uname_result(system='Linux', node='auto_spy', release='5.15.91-flippy-81+o', version='#207 SMP PREEMPT Wed Feb 1 20:18:10 CST 2023', machine='aarch64', processor='')
系统为 arm
ERROR:root:code for hash blake2b was not found.
Traceback (most recent call last):
File "/usr/local/lib/python3.6/hashlib.py", line 244, in
globals()[__func_name] = __get_hash(__func_name)
File "/usr/local/lib/python3.6/hashlib.py", line 119, in __get_openssl_constructor
return __get_builtin_constructor(name)
File "/usr/local/lib/python3.6/hashlib.py", line 94, in __get_builtin_constructor
import _blake2
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf9 in position 4: invalid start byte
ERROR:root:code for hash blake2s was not found.
Traceback (most recent call last):
File "/usr/local/lib/python3.6/hashlib.py", line 244, in
globals()[__func_name] = __get_hash(__func_name)
File "/usr/local/lib/python3.6/hashlib.py", line 119, in __get_openssl_constructor
return __get_builtin_constructor(name)
File "/usr/local/lib/python3.6/hashlib.py", line 94, in __get_builtin_constructor
import _blake2
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf9 in position 4: invalid start byte
sys info:uname_result(system='Linux', node='auto_spy', release='5.15.91-flippy-81+o', version='#207 SMP PREEMPT Wed Feb 1 20:18:10 CST 2023', machine='aarch64', processor='')
系统为 arm
ERROR:root:code for hash blake2b was not found.
Traceback (most recent call last):
File "/usr/local/lib/python3.6/hashlib.py", line 244, in
globals()[__func_name] = __get_hash(__func_name)
File "/usr/local/lib/python3.6/hashlib.py", line 119, in __get_openssl_constructor
return __get_builtin_constructor(name)
File "/usr/local/lib/python3.6/hashlib.py", line 94, in __get_builtin_constructor
import _blake2
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf9 in position 4: invalid start byte
ERROR:root:code for hash blake2s was not found.
Traceback (most recent call last):
File "/usr/local/lib/python3.6/hashlib.py", line 244, in
globals()[__func_name] = __get_hash(__func_name)
File "/usr/local/lib/python3.6/hashlib.py", line 119, in __get_openssl_constructor
return __get_builtin_constructor(name)
File "/usr/local/lib/python3.6/hashlib.py", line 94, in __get_builtin_constructor
import _blake2
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf9 in position 4: invalid start byte
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] done.
[services.d] starting services
[services.d] done.
大佬看看,不知道为什么从某个时间开始就突然无法运行了

青龙报错

2022-10-04 20:56:49,500 - /usr/local/lib/python3.6/asyncio/events.py[line:145] - INFO: 青龙-1 登录失败
string indices must be integers

青龙版本:2.14.7

  • 问:如何解决该问题?(降青龙版本无法解决)
  • 答:已解决,青龙版本过高不兼容导致,换成 2.13.8 版本已解决

执行python3 auto_spy_bot2.py命令后报BUS ERROR

root@auto_spy:/autospy# python3 auto_spy_bot2.py
sys info:uname_result(system='Linux', node='auto_spy', release='5.4.179', version='#0 SMP Tue May 17 03:24:33 2022', machine='x86_64', processor='')
Bus error

运行平台:X86(AMD) OpenWrt 21.02.2 2022051808 / LuCI openwrt-21.02-cn branch git-22.135.19704-132fbcf

不知如何解决?

启动时一直去连代理导致报错

系统为 x86_tx
/autospy
/autospy
加载参数
参数加载完成
脚本信息加载成功
使用socket5代理::0
Attempt 1 at connecting failed: TimeoutError:

配置文件里有这几个 key:

  proxy_port: 0
  proxy_ip: ''
  proxy_http: ''
  proxy_password: ''
  proxy_type: ''
  proxy_username: ''

我把proxy_ip 和 proxy_port 删掉又不行,该怎么弄呢?

执行python3 auto_spy_bot2.py报 [Errno 2] No such file or directory: 'auto_spy.so_x86_64'

root@auto_spy:/autospy# python3 auto_spy_bot2.py
sys info:uname_result(system='Linux', node='auto_spy', release='3.10.0-1160.71.1.el7.x86_64', version='#1 SMP Tue Jun 28 15:37:28 UTC 2022', machine='x86_64', processor='')
Traceback (most recent call last):
File "auto_spy_bot2.py", line 18, in
shutil.copy("auto_spy.so_x86_64", "auto_spy.so")
File "/usr/local/lib/python3.6/shutil.py", line 245, in copy
copyfile(src, dst, follow_symlinks=follow_symlinks)
File "/usr/local/lib/python3.6/shutil.py", line 120, in copyfile
with open(src, 'rb') as fsrc:
FileNotFoundError: [Errno 2] No such file or directory: 'auto_spy.so_x86_64'

青龙链接不上,提示:连接青龙报错:unhashable type: 'slice'

准备登录青龙:
连接青龙报错:unhashable type: 'slice'
2023-05-27 14:32:20,601 - /usr/local/lib/python3.6/asyncio/events.py - INFO: Traceback (most recent call last):
File "auto_spy.py", line 3542, in auto_spy.AuthThread
File "auto_spy.py", line 4379, in connectQL
File "/root/.local/lib/python3.6/site-packages/ruamel/yaml/comments.py", line 852, in getitem
return ordereddict.getitem(self, key)
TypeError: unhashable type: 'slice'

后台一直报错,显示任务忙

后台一直报错,这个咋整。。

2022-10-31 12:45:34,250 - /usr/lib64/python3.6/asyncio/events.py[line:145] - INFO: 任务忙,等待5秒再检测
2022-10-31 12:45:39,252 - /usr/lib64/python3.6/asyncio/events.py[line:145] - INFO: 判断任务是否超时
查任务状态
任务状态:None
2022-10-31 12:45:39,281 - /usr/lib64/python3.6/asyncio/events.py[line:145] - INFO: 任务忙,等待5秒再检测
2022-10-31 12:45:44,283 - /usr/lib64/python3.6/asyncio/events.py[line:145] - INFO: 判断任务是否超时
查任务状态
任务状态:None
2022-10-31 12:45:44,322 - /usr/lib64/python3.6/asyncio/events.py[line:145] - INFO: 任务忙,等待5秒再检测
2022-10-31 12:45:49,324 - /usr/lib64/python3.6/asyncio/events.py[line:145] - INFO: 判断任务是否超时
查任务状态
任务状态:None
2022-10-31 12:45:49,348 - /usr/lib64/python3.6/asyncio/events.py[line:145] - INFO: 任务忙,等待5秒再检测
2022-10-31 12:45:54,351 - /usr/lib64/python3.6/asyncio/events.py[line:145] - INFO: 判断任务是否超时
查任务状态
任务状态:None
2022-10-31 12:45:54,370 - /usr/lib64/python3.6/asyncio/events.py[line:145] - INFO: 任务忙,等待5秒再检测
2022-10-31 12:45:59,373 - /usr/lib64/python3.6/asyncio/events.py[line:145] - INFO: 判断任务是否超时
查任务状态
任务状态:None
2022-10-31 12:45:59,390 - /usr/lib64/python3.6/asyncio/events.py[line:145] - INFO: 任务忙,等待5秒再检测
2022-10-31 12:46:04,393 - /usr/lib64/python3.6/asyncio/events.py[line:145] - INFO: 判断任务是否超时
查任务状态
任务状态:None
2022-10-31 12:46:04,422 - /usr/lib64/python3.6/asyncio/events.py[line:145] - INFO: 任务忙,等待5秒再检测
2022-10-31 12:46:09,424 - /usr/lib64/python3.6/asyncio/events.py[line:145] - INFO: 判断任务是否超时
查任务状态
任务状态:None
2022-10-31 12:46:09,452 - /usr/lib64/python3.6/asyncio/events.py[line:145] - INFO: 任务忙,等待5秒再检测
2022-10-31 12:46:14,454 - /usr/lib64/python3.6/asyncio/events.py[line:145] - INFO: 判断任务是否超时
查任务状态
任务状态:None

执行python3 auto_spy_bot2.py命令后报Server disconnected

如题,修改好auto_spy.yaml配置文件后,执行python3 auto_spy_bot2.py命令时,报异常Server disconnected,但是日志中没有写明是哪里的服务连不上,请问需要怎么处理?具体异常日志如下:

准备登录青龙:
2022-12-31 12:52:14,431 - /usr/lib64/python3.6/asyncio/events.py[line:145] - INFO:
青龙1-登录成功
2022-12-31 12:52:19,375 - /usr/lib64/python3.6/asyncio/events.py[line:145] - INFO: 获取任务列表成功
2022-12-31 12:52:19,376 - /usr/lib64/python3.6/asyncio/events.py[line:145] - INFO: 龙1-开始创建执行任务
2022-12-31 12:52:19,376 - /usr/lib64/python3.6/asyncio/events.py[line:145] - INFO: 龙1-开始创建【cj组队】任务
2022-12-31 12:52:19,376 - /usr/lib64/python3.6/asyncio/events.py[line:145] - INFO: 创建任务出错:
{'Container': [[]], 'Env': 'jd_cjzd', 'KeyWord': [['频道1变量A1'], ['频道2变量A2']], 'Name': 'cj组队', 'Script': 'jd_team60.js', 'TimeOut': 0, 'Wait': 3}
string indices must be integers
加载 ./plugins .py 插件----开始
插件信息加载成功
加载 ./plugins .py 插件----结束
加载 ./plugins/x86_tx .so 插件----开始
插件信息加载成功
加载 ./plugins/x86_tx .so 插件----结束
ERROR:root:【TaskRuning】出错:
ERROR:root:Server disconnected
ERROR:root:Traceback (most recent call last):
File "auto_spy.py", line 979, in auto_spy.TaskRuning
File "auto_spy.py", line 288, in gettasklist
File "/root/.local/lib/python3.6/site-packages/aiohttp/client.py", line 560, in _request
await resp.start(conn)
File "/root/.local/lib/python3.6/site-packages/aiohttp/client_reqrep.py", line 899, in start
message, payload = await protocol.read() # type: ignore[union-attr]
File "/root/.local/lib/python3.6/site-packages/aiohttp/streams.py", line 616, in read
await self._waiter
aiohttp.client_exceptions.ServerDisconnectedError: Server disconnected

报错[Errno -2] Name or service not known

2023-03-18 23:01:30,863 - /usr/local/lib/python3.6/asyncio/events.py[line:145] - INFO: 1-【【船长】关注店铺有礼-JK-1】创建成功
2023-03-18 23:01:30,864 - /usr/local/lib/python3.6/asyncio/events.py[line:145] - INFO: spy 加载 ./plugins .py 插件----开始
2023-03-18 23:01:30,865 - /usr/local/lib/python3.6/asyncio/events.py[line:145] - INFO: 插件信息加载成功
2023-03-18 23:01:30,865 - /usr/local/lib/python3.6/asyncio/events.py[line:145] - INFO: 加载 ./plugins .py 插件----结束
2023-03-18 23:01:30,866 - /usr/local/lib/python3.6/asyncio/events.py[line:145] - INFO: spy 加载 ./plugins/x86_tx .so 插件----开始
2023-03-18 23:01:30,867 - /usr/local/lib/python3.6/asyncio/events.py[line:145] - INFO: 插件信息加载成功
2023-03-18 23:01:30,867 - /usr/local/lib/python3.6/asyncio/events.py[line:145] - INFO: 加载 ./plugins/x86_tx .so 插件----结束
2023-03-18 23:01:30,929 - /usr/local/lib/python3.6/asyncio/events.py[line:145] - INFO: [Errno -2] Name or service not known

大佬,请问这是什么问题?TypeError: 'NoneType' object is not callable

root@auto_spy:/autospy# python3 auto_spy_bot2.py
sys info:uname_result(system='Linux', node='auto_spy', release='5.15.0-52-generic', version='#58-Ubuntu SMP Thu Oct 13 08: machine='x86_64', processor='')
系统为 x86_tx
/autospy
/autospy
加载参数
Traceback (most recent call last):
File "auto_spy_bot2.py", line 29, in
main(systype)
File "auto_spy.py", line 2513, in auto_spy.main
File "auto_spy.py", line 1981, in auto_spy.LoadConfig
File "auto_spy.py", line 1933, in auto_spy.CheckLic
AttributeError: 'NoneType' object has no attribute 'split'
Exception ignored in: <bound method ClientSession.del of <aiohttp.client.ClientSession object at 0x7f38ef252d68>>
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/aiohttp/client.py", line 343, in del
TypeError: 'NoneType' object is not callable

decoder 以及 h5st31 等问题哪位大神指点下迷津,不胜感激

问题一:
下载结果:True 0
保存文件:./config/
a bytes-like object is required, not 'str'
2023-06-13 21:16:09,798 - /usr/local/lib/python3.6/site-packages/telethon/client/updates.py - INFO: Traceback (most recent call last):
File "auto_spy.py", line 2777, in auto_spy.downloadfile
File "auto_spy.py", line 2778, in auto_spy.downloadfile
TypeError: a bytes-like object is required, not 'str'

问题二:
2023-06-13 21:21:03,025 - /usr/local/lib/python3.6/site-packages/telethon/client/updates.py - INFO: Traceback (most recent call last):
File "auto_spy.py", line 2874, in auto_spy.cmd_update
File "/usr/local/lib/python3.6/json/init.py", line 354, in loads
return _default_decoder.decode(s)
File "/usr/local/lib/python3.6/json/decoder.py", line 339, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/local/lib/python3.6/json/decoder.py", line 357, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

问题三:
ModuleNotFoundError: No module named 'h5st31'

请大神指点,万分感谢呀,

证书与当前用户不匹配

请问这个和系统识别成x86有关系吗

root@auto_spy:/autospy# python3 auto_spy_bot2.py
sys info:uname_result(system='Linux', node='auto_spy', release='5.10.43', version='#3.0.6 SMP Mon Aug 1 18:31:02 CST 2022', machine='aarch64', processor='')
系统为 arm
系统为 x86
/autospy
/autospy
加载参数
参数加载完成
脚本信息加载成功
使用socket5代理:192.168.2.134:7891
加载插件---开始
加载arm插件
加载插件---结束
AutoSpy V2022.5.23

Telegram 登录成功

证书与当前用户不匹配,10秒后程序退出
root@auto_spy:/autospy#

spy升级后无法运行,提示缺失组件

root@auto_spy:/autospy# python3 auto_spy_bot.py
sys info:uname_result(system='Linux', node='auto_spy', release='5.15.103', version='#0 SMP Tue Mar 21 14:20:33 2023', machine='x86_64', processor='')
系统为 x86_tx
Traceback (most recent call last):
File "auto_spy_bot2.py", line 28, in
from auto_spy import main
File "auto_spy.py", line 9, in init auto_spy
ModuleNotFoundError: No module named 'Crypto'

提示缺少组件但pip3 install Crypto还是pip3 install requests[Crypto] 安装后重启后还是提示同样的错误

启动成功貌似又没有完全成功,请指导

按照安装文档配置完成,启动成功以后,通过在群里发送spy可以正常返回信息,但是启动日志如下:**
image
日志上显示的任务创建完成,然后显示“不启用”,这是正常还是不正常?
青龙面板版本:2.14.3
服务器版本:centos 7
python3版本:3.6.8
pip3版本:21.3.1

群晖docker 运行不成功

用虚拟机的docker可以,群晖自带docker不成功。
运行 python3 auto_spy_bot.py
报:
sys info:uname_result(system='Linux', node='auto_spy', release='4.4.180+', version='#42962 SMP Wed Sep 21 10:56:47 CST 2022', machine='x86_64', processor='')
系统为 x86_tx
/autospy
/autospy
加载参数
Traceback (most recent call last):
File "auto_spy_bot2.py", line 29, in
main(systype)
File "auto_spy.py", line 2635, in auto_spy.main
File "auto_spy.py", line 2094, in auto_spy.LoadConfig
File "auto_spy.py", line 2095, in auto_spy.LoadConfig
File "/root/.local/lib/python3.6/site-packages/yaml/init.py", line 81, in load
return loader.get_single_data()
File "/root/.local/lib/python3.6/site-packages/yaml/constructor.py", line 49, in get_single_data
node = self.get_single_node()
File "/root/.local/lib/python3.6/site-packages/yaml/composer.py", line 36, in get_single_node
document = self.compose_document()
File "/root/.local/lib/python3.6/site-packages/yaml/composer.py", line 58, in compose_document
self.get_event()
File "/root/.local/lib/python3.6/site-packages/yaml/parser.py", line 118, in get_event
self.current_event = self.state()
File "/root/.local/lib/python3.6/site-packages/yaml/parser.py", line 193, in parse_document_end
token = self.peek_token()
File "/root/.local/lib/python3.6/site-packages/yaml/scanner.py", line 129, in peek_token
self.fetch_more_tokens()
File "/root/.local/lib/python3.6/site-packages/yaml/scanner.py", line 223, in fetch_more_tokens
return self.fetch_value()
File "/root/.local/lib/python3.6/site-packages/yaml/scanner.py", line 579, in fetch_value
self.get_mark())
yaml.scanner.ScannerError: mapping values are not allowed here
in "auto_spy.yaml", line 2, column 12
Exception ignored in: <bound method ClientSession.del of <aiohttp.client.ClientSession object at 0x7f2d73c1cd68>>
Traceback (most recent call last):
File "/root/.local/lib/python3.6/site-packages/aiohttp/client.py", line 343, in del
TypeError: 'NoneType' object is not callable

提示Illegal instruction错误

更换成2022101的版本正常,最新版本提示错误如下:
root@auto_spy:/autospy# python3 auto_spy_bot2.py
sys info:uname_result(system='Linux', node='auto_spy', release='4.9.282+', version='#0 SMP Thu Nov 24 12:39:38 2022', machine='aarch64', processor='')
系统为 arm
Illegal instruction
root@auto_spy:/autospy#

硬件及软件版本:
型号 | ARS2
架构 | ARMv8 Processor rev 4
目标平台 | realtek/rtd129x
固件版本 | OpenWrt 21.02.3 r16814-918a5b062e / LuCI istoreos-21.02 branch git-22.250.34214-700f1ba
内核版本 | 4.9.282+

青龙登录失败string indices must be integers

使用 python3 auto_spy_bot2.py时提示青龙登陆失败,配置文件中的青龙地址是:
......
QingLong:

  • Client_ID: 2khwgEMPQ....
    Client_Secret: fyysCyydw1RLb_CCIxw4W.....
    url: http://192.168.50.79:5700
    ......
    运行时提示:
    。。。
    Spy启动完成
    2022-11-28 12:32:36,211 - /usr/local/lib/python3.6/asyncio/events.py[line:145] - INFO: 开始鉴权
    2022-11-28 12:32:36,920 - /usr/local/lib/python3.6/asyncio/events.py[line:145] - INFO: 普通授权鉴权成功
    2022-11-28 12:32:37,288 - /usr/local/lib/python3.6/asyncio/events.py[line:145] - INFO: 龙1-开始创建【【云上】购物车锦鲤】任务
    2022-11-28 12:32:37,290 - /usr/local/lib/python3.6/asyncio/events.py[line:145] - INFO: 青龙-1 登录失败
    string indices must be integers
    加载 ./plugins .py 插件----开始
    插件信息加载成功
    加载 ./plugins .py 插件----结束
    加载 ./plugins/arm .so 插件----开始
    插件信息加载成功
    加载 ./plugins/arm .so 插件----结束

请问这怎样解决?

映射路径

使用群辉设备,为了便于修改参数添加了路径映射
image

结果报错
image

  • 问:映射路径应该是填的哪一个路径?
  • 答:已解决,需将路径下的所有文件拷贝到宿主机才能正常按图中目录映射

socket5用户认证

带有用户名和密码的socket5代理应该怎么填用户名和密码的参数呢?

http、sock5代理均不成功

全都报错,而这些代理在其它应用中完全没问题,维度auto_spy不能使用

是不能使用带密码的么?这样风险很高啊

能否增加环境变量“追加”功能?

现状:目前环境变量都是以“改写”模式,将原有变量全部换新。
问题:部分环境变量不适合一次性全部替换,如“店铺签到”中的"DPQDTK",这类变量只适合在原变量上继续追加新变量。
解决方法:建议在监控对象里增加一个配置选型

青龙登录失败

image

有显示登录成功,下一行显示失败.请问哪里配置有问题吗? 青龙版本: 2.11.3 AutoSpy V2023-01-06

N1搭建,调试报错!

root@auto_spy:/autospy# python3 auto_spy_bot.py
sys info:uname_result(system='Linux', node='auto_spy', release='5.19.3-flippy-76+', version='#37 SMP PREEMPT Sun Aug 21 22:00:22 CST 2022', machine='aarch64', processor='')
系统为 arm
系统为 x86
/autospy
/autospy
加载参数
参数加载完成
插件信息加载成功
不使用代理
Traceback (most recent call last):
File "auto_spy_bot.py", line 29, in
main(systype)
File "auto_spy.py", line 2776, in auto_spy.main
File "/usr/local/lib/python3.6/site-packages/telethon/client/auth.py", line 133, in start
else self.loop.run_until_complete(coro)
File "/usr/local/lib/python3.6/asyncio/base_events.py", line 488, in run_until_complete
return future.result()
File "/usr/local/lib/python3.6/site-packages/telethon/client/auth.py", line 140, in _start
await self.connect()
File "/usr/local/lib/python3.6/site-packages/telethon/client/telegrambaseclient.py", line 536, in connect
self.session.auth_key = self._sender.auth_key
File "/usr/local/lib/python3.6/site-packages/telethon/sessions/sqlite.py", line 180, in auth_key
self._update_session_table()
File "/usr/local/lib/python3.6/site-packages/telethon/sessions/sqlite.py", line 194, in _update_session_table
c.execute('delete from sessions')
sqlite3.OperationalError: database is locked
Exception ignored in: <bound method ClientSession.del of <aiohttp.client.ClientSession object at 0x7fa45bd6d8>>
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/aiohttp/client.py", line 343, in del
TypeError: 'NoneType' object is not callable

我发现识别系统有问题,先识别为arm,又显示识别为x86, 不理解这是情况。

安装的时候 提示这个错误,请大佬看一下~

root@auto_spy:/autospy# python3 auto_spy_bot2.py
sys info:uname_result(system='Linux', node='auto_spy', release='5.10.60-qnap', version='#1 SMP Sat Oct 22 01:04:01 CST 2022', machine='x86_64', processor='')
系统为 x86_tx
/autospy
/autospy
加载参数
Traceback (most recent call last):
File "auto_spy_bot2.py", line 29, in
main(systype)
File "auto_spy.py", line 2726, in auto_spy.main
File "auto_spy.py", line 2177, in auto_spy.LoadConfig
File "auto_spy.py", line 2065, in auto_spy.CheckLic
AttributeError: 'NoneType' object has no attribute 'split'
Exception ignored in: <bound method ClientSession.del of <aiohttp.client.ClientSession object at 0x7f7351a916a0>>
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/aiohttp/client.py", line 343, in del
TypeError: 'NoneType' object is not callable

在威联通NAS上面的DOCKER安装~
用的青龙2.11.3版本

青龙2.15.16测试结果存在错误

青龙2.15.16版本下监测线报有问题,日志输出:1
`
sys info:uname_result(system='Linux', node='auto_spy', release='6.2.16-3-pve', version='#1 SMP PREEMPT_DYNAMIC PVE 6.2.16-3 (2023-06-17T05:58Z)', machine='x86_64', processor='')

系统为 x86_tx

WARNING: The directory '/root/.cache/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you should use sudo's -H flag.

/autospy

/autospy

加载参数

2023-06-25 00:00:51,239 - auto_spy_bot.py - INFO: 参数加载完成

2023-06-25 00:00:51,240 - auto_spy_bot.py - INFO: 插件信息加载成功

不使用代理

----------------------------------TaskRuning-------------------------

2023-06-25 00:00:56,946 - /usr/local/lib/python3.6/asyncio/events.py - INFO: AutoSpy V2023-06-15 16:37:52

Telegram 登录成功

苍翠 欢迎使用SPY

Spy启动完成

2023-06-25 00:00:57,329 - /usr/local/lib/python3.6/asyncio/events.py - INFO: 开始鉴权

2023-06-25 00:00:57,932 - /usr/local/lib/python3.6/asyncio/events.py - INFO: 普通授权鉴权成功

2023-06-25 00:00:57,933 - /usr/local/lib/python3.6/asyncio/events.py - INFO:

准备登录青龙:

青龙版本:['2', '15', '16']

获取到青龙token,SE和ID对啦

2023-06-25 00:00:58,040 - /usr/local/lib/python3.6/asyncio/events.py - INFO:

青龙1-登录成功

2023-06-25 00:00:58,097 - /usr/local/lib/python3.6/asyncio/events.py - INFO: 获取任务列表成功

2023-06-25 00:00:58,098 - /usr/local/lib/python3.6/asyncio/events.py - INFO: 加载Faker.spy

2023-06-25 00:00:58,404 - /usr/local/lib/python3.6/asyncio/events.py - INFO: 青龙-1 登录失败

'js_config'

2023-06-25 00:00:58,430 - /usr/local/lib/python3.6/asyncio/events.py - INFO: 加载重启线报信息

2023-06-25 00:00:58,430 - /usr/local/lib/python3.6/asyncio/events.py - INFO: spy 加载 ./plugins .py 插件----开始

2023-06-25 00:00:58,431 - /usr/local/lib/python3.6/asyncio/events.py - INFO: 插件信息加载成功

2023-06-25 00:00:58,431 - /usr/local/lib/python3.6/asyncio/events.py - INFO: 加载插件:bean

2023-06-25 00:00:58,431 - /usr/local/lib/python3.6/asyncio/events.py - INFO: 加载 ./plugins .py 插件----结束

2023-06-25 00:00:58,431 - /usr/local/lib/python3.6/asyncio/events.py - INFO: spy 加载 ./plugins/x86_tx .so 插件----开始

2023-06-25 00:00:58,431 - /usr/local/lib/python3.6/asyncio/events.py - INFO: 插件信息加载成功

2023-06-25 00:00:58,431 - /usr/local/lib/python3.6/asyncio/events.py - INFO: 加载插件:bean

2023-06-25 00:00:58,449 - /usr/local/lib/python3.6/asyncio/events.py - INFO: Spy加载-->bean-->完成

2023-06-25 00:00:58,450 - /usr/local/lib/python3.6/asyncio/events.py - INFO: 加载 ./plugins/x86_tx .so 插件----结束

spy已启动完成,进入监听,去发个线报试试吧

1

===========================================

1

===========================================

1

===========================================

1

===========================================

1

===========================================

1

===========================================
`

telegram接收不到验证码

运行python3 auto_spy_bot.py,输入手机号码,telegram无法收到验证码。使用docker部署在海外服务器,不应该是墙的问题。麻烦看到回复下,谢谢你。

- /usr/local/lib/python3.6/asyncio/events.py[line:145] - INFO: 青龙-1 登录失败 'data' 不支持python3.6?

2022-11-04 21:46:09,868 - /usr/local/lib/python3.6/asyncio/events.py[line:145] - INFO: 青龙-1 登录失败
'data'
^CException ignored in: <bound method ClientSession.del of <aiohttp.client.ClientSession object at 0x7faa5aebf5c0>>
Traceback (most recent call last):
File "/root/.local/lib/python3.6/site-packages/aiohttp/client.py", line 343, in del
TypeError: 'NoneType' object is not callable

不支持青龙新版本2.15

AutoSpy目前不支持青龙新版本,请问大佬是否会进行适配?
如无适配计划,请问支持的青龙最新版本是哪个?
感谢大佬提供这么方便的工具,谢谢!

运行报错,稳定了一天,昨天下午授权过期后就开始出现问题重装过也没解决

root@auto_spy:/autospy# python3 auto_spy_bot.py
sys info:uname_result(system='Linux', node='auto_spy', release='3.10.0-1160.76.1.el7.x86_64', version='#1 SMP Wed Aug 10 16:21:17 UTC 2022', machine='x86_64', processor='')
系统为 x86_tx
/autospy
/autospy
加载参数
Traceback (most recent call last):
File "auto_spy_bot.py", line 29, in
main(systype)
File "auto_spy.py", line 2680, in auto_spy.main
File "auto_spy.py", line 2127, in auto_spy.LoadConfig
File "auto_spy.py", line 2128, in auto_spy.LoadConfig
File "/usr/local/lib/python3.6/site-packages/yaml/init.py", line 81, in load
return loader.get_single_data()
File "/usr/local/lib/python3.6/site-packages/yaml/constructor.py", line 49, in get_single_data
node = self.get_single_node()
File "/usr/local/lib/python3.6/site-packages/yaml/composer.py", line 36, in get_single_node
document = self.compose_document()
File "/usr/local/lib/python3.6/site-packages/yaml/composer.py", line 55, in compose_document
node = self.compose_node(None, None)
File "/usr/local/lib/python3.6/site-packages/yaml/composer.py", line 84, in compose_node
node = self.compose_mapping_node(anchor)
File "/usr/local/lib/python3.6/site-packages/yaml/composer.py", line 133, in compose_mapping_node
item_value = self.compose_node(node, item_key)
File "/usr/local/lib/python3.6/site-packages/yaml/composer.py", line 82, in compose_node
node = self.compose_sequence_node(anchor)
File "/usr/local/lib/python3.6/site-packages/yaml/composer.py", line 111, in compose_sequence_node
node.value.append(self.compose_node(node, index))
File "/usr/local/lib/python3.6/site-packages/yaml/composer.py", line 84, in compose_node
node = self.compose_mapping_node(anchor)
File "/usr/local/lib/python3.6/site-packages/yaml/composer.py", line 127, in compose_mapping_node
while not self.check_event(MappingEndEvent):
File "/usr/local/lib/python3.6/site-packages/yaml/parser.py", line 98, in check_event
self.current_event = self.state()
File "/usr/local/lib/python3.6/site-packages/yaml/parser.py", line 439, in parse_block_mapping_key
"expected , but found %r" % token.id, token.start_mark)
yaml.parser.ParserError: while parsing a block mapping
in "auto_spy.yaml", line 260, column 3
expected , but found '-'
in "auto_spy.yaml", line 269, column 3
Exception ignored in: <bound method ClientSession.del of <aiohttp.client.ClientSession object at 0x7fb1140115f8>>
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/aiohttp/client.py", line 343, in del
TypeError: 'NoneType' object is not callable

armv71不支持

请问大佬是否考虑支持一下armv71架构,谢谢!
root@mv100:~# uname -m
armv7l

不论是在Docker还是在本地环境下均会出现错误

执行命令python3 auto_spy_bot.py后会出现

[root@VM-20-14-centos autospy]# pip3 install --user -U asyncio pyyaml telethon snowland-smx httpx pysocks requests WARNING: Running pip install with root privileges is generally not a good idea. Try pip3 install --userinstead. Requirement already up-to-date: asyncio in /root/.local/lib/python3.6/site-packages Requirement already up-to-date: pyyaml in /root/.local/lib/python3.6/site-packages Requirement already up-to-date: telethon in /root/.local/lib/python3.6/site-packages Requirement already up-to-date: snowland-smx in /root/.local/lib/python3.6/site-packages Requirement already up-to-date: httpx in /root/.local/lib/python3.6/site-packages Requirement already up-to-date: pysocks in /root/.local/lib/python3.6/site-packages Requirement already up-to-date: requests in /root/.local/lib/python3.6/site-packages Requirement already up-to-date: pyaes in /root/.local/lib/python3.6/site-packages (from telethon) Requirement already up-to-date: rsa in /root/.local/lib/python3.6/site-packages (from telethon) Requirement already up-to-date: sniffio in /root/.local/lib/python3.6/site-packages (from httpx) Requirement already up-to-date: httpcore<0.15.0,>=0.14.5 in /root/.local/lib/python3.6/site-packages (from httpx) Requirement already up-to-date: certifi in /root/.local/lib/python3.6/site-packages (from httpx) Requirement already up-to-date: rfc3986[idna2008]<2,>=1.3 in /root/.local/lib/python3.6/site-packages (from httpx) Requirement already up-to-date: charset-normalizer in /root/.local/lib/python3.6/site-packages (from httpx) Requirement already up-to-date: async-generator; python_version < "3.7" in /root/.local/lib/python3.6/site-packages (from httpx) Requirement already up-to-date: idna<4,>=2.5; python_version >= "3" in /root/.local/lib/python3.6/site-packages (from requests) Requirement already up-to-date: urllib3<1.27,>=1.21.1 in /root/.local/lib/python3.6/site-packages (from requests) Requirement already up-to-date: pyasn1>=0.1.3 in /root/.local/lib/python3.6/site-packages (from rsa->telethon) Requirement already up-to-date: contextvars>=2.1; python_version < "3.7" in /root/.local/lib/python3.6/site-packages (from sniffio->httpx) Requirement already up-to-date: h11<0.13,>=0.11 in /root/.local/lib/python3.6/site-packages (from httpcore<0.15.0,>=0.14.5->httpx) Requirement already up-to-date: anyio==3.* in /root/.local/lib/python3.6/site-packages (from httpcore<0.15.0,>=0.14.5->httpx) Requirement already up-to-date: immutables>=0.9 in /root/.local/lib/python3.6/site-packages (from contextvars>=2.1; python_version < "3.7"->sniffio->httpx) Requirement already up-to-date: typing-extensions; python_version < "3.8" in /root/.local/lib/python3.6/site-packages (from anyio==3.*->httpcore<0.15.0,>=0.14.5->httpx) Requirement already up-to-date: dataclasses; python_version < "3.7" in /root/.local/lib/python3.6/site-packages (from anyio==3.*->httpcore<0.15.0,>=0.14.5->httpx) [root@VM-20-14-centos autospy]# python3 auto_spy_bot.py sys info:uname_result(system='Linux', node='VM-20-14-centos', release='3.10.0-1160.76.1.el7.x86_64', version='#1 SMP Wed Aug 10 16:21:17 UTC 2022', machine='x86_64', processor='x86_64') 系统为 x86_tx /root/.local/lib/python3.6/site-packages/requests/__init__.py:104: RequestsDependencyWarning: urllib3 (1.26.12) or chardet (None)/charset_normalizer (3.0.0) doesn't match a supported version! RequestsDependencyWarning) No module named 'aiohttp' 缺依赖,尝试进行修复,也可手动修复: pip3 install --user python-socks[asyncio] python-socks requests[socks] pysocks requests asyncio telethon==1.24.0 pyyaml httpx anyio snowland-smx WARNING: Running pip install with root privileges is generally not a good idea. Trypip3 install --user` instead.
Requirement already satisfied: snowland-smx in /root/.local/lib/python3.6/site-packages
Requirement already satisfied: python-socks[asyncio] in /root/.local/lib/python3.6/site-packages
Requirement already satisfied: requests[socks] in /root/.local/lib/python3.6/site-packages
Requirement already satisfied: pysocks in /root/.local/lib/python3.6/site-packages
Requirement already satisfied: asyncio in /root/.local/lib/python3.6/site-packages
Collecting telethon==1.24.0
Downloading http://mirrors.tencentyun.com/pypi/packages/f5/2a/238c14ad6032d91ff134723d48470f8c5fe521522af323fde10c34e23047/Telethon-1.24.0-py3-none-any.whl (528kB)
100% |████████████████████████████████| 532kB 14.2MB/s
Requirement already satisfied: pyyaml in /root/.local/lib/python3.6/site-packages
Requirement already satisfied: httpx in /root/.local/lib/python3.6/site-packages
Requirement already satisfied: anyio in /root/.local/lib/python3.6/site-packages
Collecting aiohttp
Downloading http://mirrors.tencentyun.com/pypi/packages/ff/4f/62d9859b7d4e6dc32feda67815c5f5ab4421e6909e48cbc970b6a40d60b7/aiohttp-3.8.3.tar.gz (7.3MB)
100% |████████████████████████████████| 7.3MB 31.5MB/s
Complete output from command python setup.py egg_info:
*********************
* Accelerated build *
*********************
Traceback (most recent call last):
File "", line 1, in
File "/tmp/pip-build-ct6vlgtr/aiohttp/setup.py", line 54, in
setup(**setup_kwargs)
File "/usr/lib/python3.6/site-packages/setuptools/init.py", line 129, in setup
return distutils.core.setup(**attrs)
File "/usr/lib64/python3.6/distutils/core.py", line 121, in setup
dist.parse_config_files()
File "/usr/lib/python3.6/site-packages/setuptools/dist.py", line 495, in parse_config_files
ignore_option_errors=ignore_option_errors)
File "/usr/lib/python3.6/site-packages/setuptools/config.py", line 111, in parse_configuration
meta.parse()
File "/usr/lib/python3.6/site-packages/setuptools/config.py", line 397, in parse
section_parser_method(section_options)
File "/usr/lib/python3.6/site-packages/setuptools/config.py", line 370, in parse_section
self[name] = value
File "/usr/lib/python3.6/site-packages/setuptools/config.py", line 174, in setitem
value = parser(value)
File "/usr/lib/python3.6/site-packages/setuptools/config.py", line 463, in _parse_version
version = self._parse_attr(value, self.package_dir)
File "/usr/lib/python3.6/site-packages/setuptools/config.py", line 320, in _parse_attr
module = import_module(module_name)
File "/usr/lib64/python3.6/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 994, in _gcd_import
File "", line 971, in _find_and_load
File "", line 955, in _find_and_load_unlocked
File "", line 665, in _load_unlocked
File "", line 678, in exec_module
File "", line 219, in _call_with_frames_removed
File "/tmp/pip-build-ct6vlgtr/aiohttp/aiohttp/init.py", line 5, in
from . import hdrs as hdrs
File "/tmp/pip-build-ct6vlgtr/aiohttp/aiohttp/hdrs.py", line 8, in
from multidict import istr
ModuleNotFoundError: No module named 'multidict'

----------------------------------------

Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-ct6vlgtr/aiohttp/
Traceback (most recent call last):
File "auto_spy.py", line 50, in auto_spy
ModuleNotFoundError: No module named 'aiohttp'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "auto_spy_bot.py", line 28, in
from auto_spy import main
File "auto_spy.py", line 70, in init auto_spy
ModuleNotFoundError: No module named 'numpy'
[root@VM-20-14-centos autospy]# python auto_spy_bot.py
File "auto_spy_bot.py", line 14
SyntaxError: Non-ASCII character '\xe7' in file auto_spy_bot.py on line 14, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details
[root@VM-20-14-centos autospy]# `

想知道spy容器有没有端口号

大佬你好,spy容器的默认端口号是多少?还是就没有端口号,我这边的环境是openwrt的docker里跑spy,如果有端口,我openwrt的adguardhome就可以看到spy 的访问情况,就像我的青龙 可以看到青龙都访问哪些
容器默认桥接,创建容器时比如青龙的 5200:5700 这样adg就会显示 没有端口的 访问数据应该都归到local里面了 所以想知道spy的默认端口 可以不改变 哪怕是默认5700:5700都管用
image

使用spy会导致封号吗?

首先自用的tg被封了,又注册了两个小号都被封了,不知道是哪里姿势不对。还是说新号不能用api。
配置如下:
Telegram:
Log_En: true
TgLost: ''
Welcome: 亲爱的,我来啦~~
api_hash: 212474a82ecd75b8c3291550f8280c1e
api_id: 29274606
forward_channel_id: ''
forward_keyword: []
forward_user_id: []
forward_user_name: []
listen_CH:

多KeyWord监控的问题

比如:
KeyWord:

    • jd_cjwxKnowledgeActivity_activityId
    • jd_cjhy_wxKnowledgeActivity_activityId
    • jd_wxKnowledgeActivity_activityUrl

发现这个多个关键字无法检测到,只能检测到一个

RegularRules: cjhy@[\d|a-z]{32}@0
这个规则的作用是什么?(菜鸟疑问,大佬见谅)

config文件内的文件内容是写死的,还是使用者可以自定义?本人发现,自定义好像无效(可能是我打开的方式不对)

希望大佬对于config文件的使用给一个食用指南,打扰了。

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.