微信轰炸Python脚本

 1 import time
 2 
 3 from pynput.keyboard import Key,Controller
 4 
 5 keyboard  = Controller()
 6 
 7 a = input("请输入你要循环的内容:")
 8 b = int(input("请输入循环的次数:"))
 9 print("数据以接收!请将光标移动到对话框")
10 
11 time.sleep(2)
12 for i in range(3):
13     print(r"距离程序运行还有%d秒"%(3-i))
14     time.sleep(1)
15 for i in range(b):
16     keyboard.type(a)
17     keyboard.press(Key.enter)
18     keyboard.release(Key.enter)
19     time.sleep(0.1)
20 print("消息发送成功!请关闭窗口")

 

posted @ 2022-08-17 10:58  liuun  阅读(826)  评论(0编辑  收藏  举报