首页 > 其他分享 >苹果系统Applescript实现FaceTime蓝号检测,无痕检测数据是否开通FaceTime服务

苹果系统Applescript实现FaceTime蓝号检测,无痕检测数据是否开通FaceTime服务

时间:2024-07-27 17:19:53浏览次数:8  
标签:FaceTime 蓝号 set end target 检测 file tell

FaceTime是苹果公司iOS和macOS(以前称Mac OS X或OS X)内置的一款视频通话软件,通过Wi-Fi或者蜂窝数据接入互联网,在两个装有FaceTime的设备之间实现视频通话。其要求通话双方均具有装有FaceTime的苹果设备,苹果ID以及可接入互联网的3G/4G/5G或者Wi-Fi网络。

 

二、Applescript来实现检测功能
1.实现全自动无痕检测手机号或邮箱号是否启用或开通FaceTime服务
/*  需要注意的是:检测是不是FaceTime数据,需要在手机号的前缀 +国家代码即可,检测邮箱号是否开通FaceTime服务则不需要加任何前缀。升级版参考相关文章: https://www.cnblogs.com */
facetime蓝号检测代码:

--get_ui()
facetime()
 
--获取facetime应用所有ui
on get_ui()
 tell application "FaceTime" to activate
	 tell application "System Events"
		 tell process "FaceTime"
			 tell window 1
				 entire contents
			 end tell
		 end tell
	 end tell
end get_ui
 
 
 
on facetime()
 tell application "Finder" to activate
 tell application "Finder"
	 set chosenfile to (choose file)
 end tell
 
 
 tell application "FaceTime"
	 tell application "FaceTime" to activate
	 
	 set phoneData to read chosenfile
	 set cards to paragraphs of phoneData
	 repeat with phone in cards
		 
		 set num to the length of phone
		 if (num > 0) then
			 my check_data(phone)
			 delay 1
		 end if
	 end repeat
	 
 end tell
end facetime


# 检测数据是否开通或启用facetime
on check_data(phone)
 tell application "System Events"
	 tell process "FaceTime"
		 --核心代码...
	 end tell
 end tell
end check_data


-- 记录有效数据
on WritePhone(the_phone)
 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() & "success/检测成功的FaceTime数据.txt"
	 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

 

标签:FaceTime,蓝号,set,end,target,检测,file,tell
From: https://www.cnblogs.com/codtina/p/18319808

相关文章

  • 【Python】利用 face_recognition 库进行人脸检测识别【附完整示例】
    1.背景条件1.1安装所需库首先安装face_recognition和Pillow这两个库。您可以使用以下命令来安装它们:pipinstallface_recognitionPillow-ihttps://pypi.tuna.tsinghua.edu.cn/simple1.2拷贝代码安装完成后,您就可以在本地运行以下提供的代码了。importfac......
  • 【PyTorch】单目标检测项目
    对象检测是在图像中查找特定对象位置的过程,用于处理单对象或多对象检测问题。单对象检测在给定图像中仅定位一个对象。对象的位置可以通过边界框定义。单对象检测使用四个数字预测边界框。对于正方形物体,可以固定宽度和高度,并简化问题以仅预测两个数字,例如使用两个数字来定位......
  • 我可以使用哪些技术来改进微弱阴影的检测?
    我每10分钟拍摄一次放在太阳前面的10厘米钉子阴影的图像。然而,我在清晨和傍晚时面临着挑战,当时阴影变得微弱而苍白,使我的算法很难检测到它们。这是我试图检测的微弱阴影的示例:当阴影颜色丰富或强烈时,我的算法成功检测到它。然而,在阴影较弱的情况下,它无法识别该......
  • 基于YOLOv9的停车场空闲车位检测【python源码+UI界面+数据集+模型+语音报警+安装说明
    往期精品导航基于YOLOv9的脑肿瘤区域检测智慧课堂基于YOLOv8的学生上课行为检测基于YOLOv9+pyside的安检仪x光危险物物品检测(有ui)基于YOLOv9的PCB板缺陷检测基于YOLOv9的线路绝缘子缺陷检测【python源码+UI界面+数据集+模型+语音报警+安装说明】基于YOLOv9的道路状况检测【......
  • 使用 python 检测鼠标是等待还是忙碌
    我正在用Python2.7创建一个脚本。该脚本在应用程序内自动执行鼠标单击。有一些情况,在单击鼠标后,鼠标光标将“等待”,我想等到鼠标光标恢复正常后再进行操作我进入代码中的下一步。Python中是否可以检测鼠标是否正在等待?在Python中没有内置方法可以检测......
  • 异常检测
    什么是异常检测异常就是程序运行时发生错误的信号(在程序出现错误时,则会产生一个异常,若程序没有处理它,则会抛出该异常,程序的运行也随之终止),在python中,错误触发的异常如下异常的种类AttributeError试图访问一个对象没有的树形,比如foo.x,但是foo没有属性xIOError输入/输出异......
  • 【AI+安全】入侵检测系统:实时监测与防范网络攻击
    ❀引言随着互联网的普及和信息技术的飞速发展,网络安全问题日益凸显。网络攻击、数据泄露和身份盗用等事件频频发生,给企业和个人带来了巨大的经济损失和声誉风险。为了应对这些威胁,入侵检测系统(IDS)作为一种重要的网络安全工具,受到了广泛的关注和应用。本文将深入探讨入侵检测系......
  • java静态代码检测-spotbugs
    以前使用的findbugs宣布在2016年后已经不做维护了,取而代之的是spotbugs.要想使用spotbugs,需要在代码仓库中做一些配置1.在maven项目的pom.xml文件中,加入依赖包: officalwebsiteurlreference: https://spotbugs.readthedocs.io/en/latest/maven.html<plugin><groupId......
  • 网站IPv6支持率怎么检测?
    在当今数字化的时代,IPv6的推广和应用已经成为网络发展的重要趋势。IPv6拥有更大的地址空间、更高的安全性和更好的性能,对于满足日益增长的网络需求至关重要。对于网站所有者和管理员来说,了解其网站对IPv6的支持率是评估网站性能和兼容性的关键指标之一。网站IPv6支持率怎么检测?1......
  • 灭火器检测算法:防患未然,精准高效,AI智能守护加油站消防安全
    随着科技的飞速发展和安全意识的不断提升,加油站作为易燃易爆场所,其消防安全管理显得尤为重要。其中,消防灭火器的有效部署和及时维护是保障加油站安全的关键环节。近年来,AI技术在消防安全领域的应用日益广泛,特别是加油站消防灭火器检测AI算法的研发与应用,为加油站的消防安全管理提......