Apple公司全线在mac os与ios两个操作系统上内置了FaceTime与iMessage两个应用。完美替代运营商的短信与电话。并且FaceTime与iMessage的帐号不仅仅与Apple ID 绑定,同时也与使用这Apple ID的手机号码绑定,这样的漏洞自然给无孔不入的中国的群发垃圾信息商们提供了后门。
这样iPhone的iMessage时不时就能收到以邮件为发送者的垃圾iMessage,尤其是嘀嗒打车群发的最多,听说是厦门一家公司操刀的。针对iMessage的群发实现,新闻稿上说是花几分钟写个脚本就可以了。
研究怎么实现iMessage群发先是从XMPP协议开始的,因为Apple MAC os上的ichat是XMPP客户端,可以连接iMessage服务器,同时也可连接gtalk与weibo私信。但后面发现iMessage的服务器验证是加密,没办法实现非ichat XMPP客户端连接iMeesage服务器,那就自然没办法实现程序控制往iMeesage服务器批量发送信息。
一、iMessage蓝号检测的方式:
1.人工筛选,将要验证的号码输出到文件中,以逗号分隔。再将文件中的号码粘贴到iMessage客户端的地址栏,iMessage客户端会自动逐个检验该号码是否为iMessage账号,检验速度视网速而定。红色表示不是iMessage账号,蓝色表示iMessage账号。
2.编写苹果Mac Os操作系统下的脚本程序进行过滤(全自动无痕检测,无需人工干预),将数据输入到号码文本框之后,如果捕获到失败的异常则不是iMessage账号,捕获到成功则把数据保存下来。
二、电脑协议版程序或手机app实现全自动无痕检测
无痕检测数据是否开启iMessge功能示例代码:
-- 全自动无痕检测手机号或邮箱数据是否开启iMessage服务
startApp()
-- 执行iMessage蓝号检测主程序
on startApp()
tell application "Finder" to activate
tell application "Finder"
set chosenfile to (choose file)
end tell
tell application "Messages"
tell application "Messages" to activate
set phoneData to read chosenfile
set cards to paragraphs of phoneData
repeat with phone in cards
--set msgText to (my AppendFace(" "))
-- 假如字符串大于0,则草率判定是手机号
set num to the length of phone
if (num > 0) then
--执行检测
my sendMsg(phone)
delay 1
end if
end repeat
display dialog "恭喜,数据已全部检测完毕!"
end tell
end startApp
# 开始检测
on sendMsg(phone)
tell application "Messages" to activate
tell application "System Events"
tell process "Messages"
tell window 1
--核心代码,省略.........
if static text of sheet 1 of window "信息" of application process "Messages" of application "System Events" exists then
--对未启用imessage的手机号码进行记录
my WritePhone(phone, "未开启im的数据.txt")
else
--对已启用imessage的手机号码进行记录
my WritePhone(phone, "已开启im的数据.txt")
end if
delay 0.2
key code 76
end tell
end tell
end tell
end sendMsg
-- 记录有效手机号
on WritePhone(the_phone, file_name)
set num to the length of the_phone
if (num > 0) then
set fileName to date string of (current date)
set logFilePath to my current_folder_path() & "send/" & file_name
set this_file to (POSIX file logFilePath as string)
set this_story to the_phone & "
"
try
set fp to open for access this_file
set myText to read fp
if (myText does not contain the_phone) then
my write_to_file(this_story, this_file, true, true)
end if
on error
my write_to_file(this_story, this_file, true, true)
end try
end if
end WritePhone
-- 写入文件
on write_to_file(this_data, target_file, append_data, append_end)
try
set the target_file to the target_file as text
set the open_target_file to ¬
open for access file target_file with write permission
if append_data is false then
set eof of the open_target_file to 0
write this_data to the open_target_file starting at eof
else if append_end is false then
try
set fp to open for access target_file
set myText to read fp
set eof of the open_target_file to 0
write this_data to the open_target_file starting at eof
write myText to the open_target_file starting at eof
on error
write this_data to the open_target_file starting at eof
end try
else
write this_data to the open_target_file starting at eof
end if
close access the open_target_file
return target_file
on error
try
close access file target_file
end try
return false
end try
end write_to_file
-- 获取当前文件的父文件夹路径
on current_folder_path()
set UnixPath to POSIX path of ((path to me as text) & "::")
return UnixPath
end current_folder_path
1.Mac OS电脑协议版全自动无痕检测(0.2-0.5秒检测一封,具体视网速和硬件性能而定)
2.越狱版iPhone手机全自动无痕检测程序,全自动检测是否开通imessage