Applescript實現無痕檢測是否註冊iMessage服務,iMessages資料篩選,iMessage藍號檢測完美實現

iMessages發表於2024-06-20

一、實現iMessage藍號資料篩選的兩種方式:
1.人工篩選,將要驗證的號碼輸出到檔案中,以逗號分隔。再將檔案中的號碼貼上到iMessage客戶端的位址列,iMessage客戶端會自動逐個檢驗該號碼是否為iMessage賬號,檢驗速度視網速而定。紅色表示不是iMessage賬號,藍色表示iMessage賬號。
2.編寫指令碼控制Mac os/iphone上自帶的iMessage應用進行驗證(全自動無痕跡檢測,無需人工干預),將資料自動填充到號碼框之後,如果捕獲到失敗則不是iMessage賬號,捕獲到成功則把資料儲存下來。
3.最新升級版本請參考博文首頁相關文章: https://www.cnblogs.com/imblog/

二、指令碼程式或app對指定資料全自動無痕過濾
Mac OS系統下無痕檢測手機號是否註冊imessage的程式(注意:檢測不同國家手機號需要在手機號的字首 +國家程式碼即可,自動檢測匯入的txt資料,藍號資料自動儲存,新升級版經測試單app id可檢測1000+條,有意可聯絡)
檢測資料是否開通imessge示例程式碼:

  1 -- 全自動無痕檢測匯入的資料是否註冊imesaages
  2 startApp()
  3 
  4 
  5 --執行主程式
  6 on startApp()
  7     tell application "Finder" to activate
  8     
  9     tell application "Finder"
 10         set chosenfile to (choose file)
 11     end tell
 12     
 13     tell application "Messages"
 14         tell application "Messages" to activate
 15         
 16         set phoneData to read chosenfile
 17         set cards to paragraphs of phoneData
 18         
 19         repeat with phone in cards
 20             --set msgText to (my AppendFace(" "))
 21             
 22             -- 假如字串大於0,則草率判定是手機號
 23             set num to the length of phone
 24             if (num > 0) then
 25                 --執行檢測
 26                 my sendMsg(phone)
 27                 delay 1    
 28             end if
 29         end repeat
 30         display dialog "恭喜,資料已全部檢測完畢!"
 31     end tell
 32 end startApp
 33 
 34 
 35 # 開始檢測
 36 on sendMsg(phone)
 37     tell application "Messages" to activate
 38     tell application "System Events"
 39         tell process "Messages"
 40             tell window 1
 41                 --核心程式碼,省略.........
 42                 
 43                 if static text of sheet 1 of window "資訊" of application process "Messages" of application "System Events" exists then
 44                     --對未啟用imessage的手機號碼進行記錄
 45                     my WritePhone(phone, "未開啟im的資料.txt")
 46                 else
 47                     --對已啟用imessage的手機號碼進行記錄
 48                     my WritePhone(phone, "已開啟im的資料.txt")
 49                 end if
 50                 
 51                 
 52                 delay 0.2
 53                 key code 76
 54 
 55                 
 56             end tell
 57         end tell
 58     end tell
 59 end sendMsg
 60 
 61 
 62 -- 記錄有效手機號
 63 on WritePhone(the_phone, file_name)
 64     set num to the length of the_phone
 65     if (num > 0) then
 66         set fileName to date string of (current date)
 67         set logFilePath to my current_folder_path() & "send/" & file_name
 68         set this_file to (POSIX file logFilePath as string)
 69         set this_story to the_phone & "
 70 "
 71         try
 72             set fp to open for access this_file
 73             set myText to read fp
 74             
 75             if (myText does not contain the_phone) then
 76                 my write_to_file(this_story, this_file, true, true)
 77             end if
 78         on error
 79             my write_to_file(this_story, this_file, true, true)
 80         end try
 81     end if
 82 end WritePhone
 83 
 84 
 85 -- 寫入檔案
 86 on write_to_file(this_data, target_file, append_data, append_end)
 87     try
 88         set the target_file to the target_file as text
 89         set the open_target_file to ¬
 90             open for access file target_file with write permission
 91         
 92         if append_data is false then
 93             set eof of the open_target_file to 0
 94             write this_data to the open_target_file starting at eof
 95         else if append_end is false then
 96             try
 97                 set fp to open for access target_file
 98                 set myText to read fp
 99                 set eof of the open_target_file to 0
100                 write this_data to the open_target_file starting at eof
101                 write myText to the open_target_file starting at eof
102             on error
103                 write this_data to the open_target_file starting at eof
104             end try
105         else
106             write this_data to the open_target_file starting at eof
107         end if
108         
109         close access the open_target_file
110         return target_file
111     on error
112         try
113             close access file target_file
114         end try
115         return false
116     end try
117 end write_to_file
118 
119 
120 -- 獲取當前檔案的父資料夾路徑
121 on current_folder_path()
122     set UnixPath to POSIX path of ((path to me as text) & "::")
123     return UnixPath
124 end current_folder_path

1.電腦版Mac OS系統上的檢測程式,全自動無痕檢測手機號或郵箱是否開通imessage(全自動無痕檢測使用者匯入的手機號或郵箱資料,預設0.1秒到0.5秒檢測一封,自動儲存已開啟im的資料和未開啟的im的資料)

2.iPhone手機上的檢測程式,全自動無痕檢測資料手機號是否開通imessage(全自動無痕檢測使用者匯入的手機號或郵箱資料,預設2-5秒檢測一封藍號資料,檢測結果自動儲存)

相關文章