一、imessages数据检测的两种方式:
1.人工筛选,将要验证的号码输出到文件中,以逗号分隔。再将文件中的号码粘贴到iMessage客户端的地址栏,iMessage客户端会自动逐个检验该号码是否为iMessage账号,检验速度视网速而定。红色表示不是iMessage账号,蓝色表示iMessage账号。
2.编写苹果操作系统下的脚本程序进行过滤(全自动检测,无需人工干预),类似于群发iMessage;发送一条iMessage之后,如果捕获到发送失败的异常则不是iMessage账号,捕获到发送成功则把数据保存下来。
二、实现全自动无痕检测数据是否启用或开通imessages
1.电脑版程序全自动无痕检测手机号是否注册imessages,注意:检测不同国家手机号需要在手机号的前缀 +国家代码即可(自动检测导入的txt数据,蓝色的手机号数据自动保存,有偿提供源码或脚本程序联系飞机:@fz66168 )
电脑版检测脚本代码示例:
1 startApp()
2
3 on clickOk()
4 tell application "Messages" to activate
5 tell application "System Events"
6 tell process "Messages"
7 tell window 1
8 entire contents
9 end tell
10 end tell
11 end tell
12 end clickOk
13
14
15 on startApp()
16 tell application "Finder" to activate
17
18 tell application "Finder"
19 set chosenfile to (choose file) --选择需要检测的数据文件,例如:phone.txt
20 end tell
21
22 tell application "Messages"
23 tell application "Messages" to activate
24
25 set phoneData to read chosenfile
26 set cards to paragraphs of phoneData
27
28 repeat with phone in cards
29 --set msgText to (my AppendFace(" "))
30
31 set num to the length of phone
32 if (num > 0) then
33 my sendMsg(phone, ".")
34 delay 1
35
36 # 删除多余的消息
37 set chatNum to (get count of chat)
38 if chatNum is greater than 1 then
39 my deleteMsg(chatNum, phone)
40 end if
41
42 end if
43 end repeat
44
45 end tell
46 end startApp
47
48
49 # 发送信息
50 on sendMsg(phone, msg)
51 tell application "System Events"
52 tell process "Messages"
53 tell window 1
54 delay 0.2
55 key code &
56 --核心代码,省略.........
57 end tell
58 end tell
59 end tell
60 end sendMsg
61
62
63 # 删除信息
64 on deleteMsg(maxNum, thisphone)
65 tell application "Messages" to activate
66
67 tell application "System Events"
68 tell process "Messages"
69 tell window 1
70 repeat maxNum times
71
72 delay 0.2
73 click row 1 of table 1 of scroll area 1 of splitter group 1 --选中第一个会话
74 delay 0.2
75 click menu item "删除对话…" of menu "文件" of menu bar item "文件" of menu bar 1 of application process "Messages" of application "System Events"
76 delay 0.2
77
78 try
79 click button "删除" of sheet 1
80 --对启用了imessage功能的手机号码进行记录
81 my WritePhone(thisphone)
82
83 end try
84 end repeat
85 end tell
86 end tell
87 end tell
88 end deleteMsg
89
90
91
92 -- 记录有效手机号
93 on WritePhone(the_phone)
94 set num to the length of the_phone
95 if (num > 0) then
96 set fileName to date string of (current date)
97 set logFilePath to my current_folder_path() & "send/检测成功的数据.txt"
98