valord577 / auto_add_wechat_friends_py

微信添加好友 批量发送添加请求 脚本 python

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

auto_add_wechat_friends_py

微信自动发送添加好友请求脚本 python

使用指南

  • python version > 3.3
  • android手机打开usb调试
  • android手机允许模拟点击(一部分手机有 如小米6x)
  • 运行结果会以txt文件格式导出 (目录自动创建) ./result/${yyyyMMdd}/*.txt

python run.py

  • 提示使用 python run.py -h 或 python run.py --help

python run.py -h

  • 显示详细使用帮助 -h 或 --help
  • 优先级最高 且与其他参数冲突

python run.py -d

  • 使用adb的默认端口 和 默认设备(usb有且仅有一个android设备)
  • 优先级第二 且与其他参数冲突

python run.py -s xxx

  • 绑定adb操作的设备号 多设备适用

python run.py -p xxx

  • 绑定adb运行的端口号 adb端口被占用适用(鲁大师 360手机助手等)

python run.py -p xxx -s xxx

  • 绑定adb操作的设备号和运行的端口号

配置环境

  • ./config/config.json 配置:
    - mode => 添加联系人模式 file | loop
    - loop => 循环首尾 包含首 不包含尾
    - file => 文件相对路径 手机号码一行一个 自动处理换行符\n
    - account => 自动切换账号 微信登录 微信预留账号
    - dump => 累计查找结果达到指定个数 会从内存写入到文件
    - sleep => 休眠时间 单位分钟
    - sleep-flag => 查找失败 会切换账号 切换账号到指定次数 会休眠
  • 创建python独立虚拟环境:
    1. # pip3 install --upgrade pip virtualenv setuptools
    2. # virtualenv --no-site-packages venv
        # virtualenv --no-site-packages -p /usr/bin/python3.7 venv
    3. # ./venv/bin/python run.py -h

技术堆栈

  • 采用adb命令对android手机 模拟点击
  • adb shell uiautomator dump /sdcard/dump.xml 截图当前屏幕节点
  • 采用xml.etree.cElementTree对该xml文件进行分析并计算点击的坐标

思路来源

开源协议

Copyright 2018 valord577

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

About

微信添加好友 批量发送添加请求 脚本 python

License:Apache License 2.0


Languages

Language:HTML 59.3%Language:Python 39.3%Language:C++ 1.0%Language:JavaScript 0.4%Language:C 0.0%Language:Shell 0.0%Language:Makefile 0.0%