Giter Club home page Giter Club logo

auto_add_wechat_friends_py's Introduction

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.

auto_add_wechat_friends_py's People

Contributors

valord577 avatar

Watchers

 avatar

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.