一、imessages資料檢測的兩種方式:
1.人工篩選,將要驗證的號碼輸出到檔案中,以逗號分隔。再將檔案中的號碼貼上到iMessage客戶端的位址列,iMessage客戶端會自動逐個檢驗該號碼是否為iMessage賬號,檢驗速度視網速而定。紅色表示不是iMessage賬號,藍色表示iMessage賬號。
2.編寫蘋果Mac Os作業系統下的指令碼程式進行過濾(全自動無痕檢測,無需人工干預),將資料輸入到號碼文字框之後,如果捕獲到失敗的異常則不是iMessage賬號,捕獲到成功則把資料儲存下來。
3.升級版相關參考博文首頁相關文章: https://www.cnblogs.com/ap16633/
二、實現全自動無痕檢測資料是否啟用或開通imessages
電腦版全自動無痕檢測手機號是否註冊iMessage(注意:檢測不同國家手機號需要在手機號的字首 +國家程式碼即可,自動無痕檢測匯入的txt資料,藍色的手機號資料自動儲存,有償提供系統執行環境+檢測程式或原始碼,有意可聯絡:@mac66166 )
全自動無痕檢測手機或郵箱號是否註冊iMessage的程式碼示例:
1 -- 檢測手機號或郵箱號是否註冊imesaages,imessages藍號檢測
2 -- 檢測是iMessge資料存放位置 -> send/已開啟im的資料.txt
3 -- 檢測不是iMessge資料存放位置 -> send/未開啟im的資料.txt
4
5 startApp()
6 --Get_UI() --獲取iMessages應用所有ui元素
7
8 --獲取Messages應用所有ui元素
9 on Get_UI()
10 tell application "Messages" to activate
11 tell application "System Events"
12 tell process "Messages"
13 tell window 1
14 entire contents
15 end tell
16 end tell
17 end tell
18 end Get_UI
19
20
21 --檢測資料是不是imessage資料
22 on startApp()
23 tell application "Finder" to activate
24
25 tell application "Finder"
26 set chosenfile to (choose file)
27 end tell
28
29 tell application "Messages"
30 tell application "Messages" to activate
31
32 set phoneData to read chosenfile
33 set cards to paragraphs of phoneData
34
35 repeat with phone in cards
36 --set msgText to (my AppendFace(" "))
37
38 -- 假如字串大於0,則草率判定是手機號
39 set num to the length of phone
40 if (num > 0) then
41 --執行檢測
42 my sendMsg(phone)
43 delay 1
44 end if
45 end repeat
46 display dialog "恭喜,資料已全部檢測完畢!"
47 end tell
48 end startApp
49
50
51 # 執行檢測
52 on sendMsg(phone)
53 tell application "Messages" to activate
54 tell application "System Events"
55 tell process "Messages"
56 tell window 1
57 --核心程式碼,省略.........
58
59 if static text of sheet 1 of window "資訊" of application process "Messages" of application "System Events" exists then
60 --對未啟用imessage的手機號碼進行記錄
61 my WritePhone(phone, "未開啟im的資料.txt")
62 else
63 --對已啟用imessage的手機號碼進行記錄
64 my WritePhone(phone, "已開啟im的資料.txt")
65 end if
66
67
68 delay 0.2
69 key code 76
70
71
72 end tell
73 end tell
74 end tell
75 end sendMsg
76
77
78 -- 記錄有效手機號
79 on WritePhone(the_phone, file_name)
80 set num to the length of the_phone
81 if (num > 0) then
82 set fileName to date string of (current date)
83 set logFilePath to my current_folder_path() & "send/" & file_name
84 set this_file to (POSIX file logFilePath as string)
85 set this_story to the_phone & "
86 "
87 try
88 set fp to open for access this_file
89 set myText to read fp
90
91 if (myText does not contain the_phone) then
92 my write_to_file(this_story, this_file, true, true)
93 end if
94 on error
95 my write_to_file(this_story, this_file, true,