当前位置: 首页 > news >正文

协议版iM蓝号检测,批量筛选iMessages数据,无痕检测是否开启iMessage服务

一、实现iMessage数据检测的两种方式:
1.人工筛选,将要验证的号码输出到文件中,以逗号分隔。再将文件中的号码粘贴到iMessage客户端的地址栏,iMessage客户端会自动逐个检验该号码是否为iMessage账号,检验速度视网速而定。红色表示不是iMessage账号,蓝色表示iMessage账号。
2.编写程序控制Mac os/iphone上自带的iMessage应用进行验证(自动无痕迹检测,无需人工干预),将数据自动填充到号码框之后,如果捕获到失败则不是iMessage账号,捕获到成功则把数据保存下来。

 

二、iMessage蓝号检测协议分析
/* 注意:检测不同国家手机号,需要在被检测手机号前面 +国家代码,全自动协议筛选,检测结果自动保存 */
imessge蓝号检测协议代码如下:

'''
    协议通道版iMessage蓝号检测
'''
import time
import os
import urllib.request
import common
from selenium import webdriver
from selenium.webdriver.chrome.service import Service
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.support.wait import WebDriverWait
from selenium.common.exceptions import TimeoutException
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys# 初始化参数设置
def init():
    options  =  Options()
    options.binary_location = "./apple.dll"
    options.add_argument('--ignore-certificate-errors')
    options.add_argument('--ignore-ssl-errors')
    options.add_argument("--log-level=3") 
    options.add_experimental_option("excludeSwitches", ["enable-logging"])
    options.add_argument(f"user-agent=common.get_rand_ua()")    
    options.add_argument('--headless')    # 创建服务
    service = Service(executable_path="./driver.dll")
    driver =  webdriver.Chrome(service=service, options=options)
    driver.set_window_position(0,0)
    driver.set_window_size(560,820)
    driver.get(check_URL) 
    driver.implicitly_wait(5)
    return driver
    
        
# 任务处理
def Check(file_txt, ini_file, result_path, result_file_name):
    if os.path.exists(file_txt) == True:
    
        #启动初始参数
        browser = init()
        
        with open(file_txt, 'r') as f:
            lines = f.readlines()
            line_count = len(lines)
            common.log(f"待检测数据文件 {file_txt} 总数量: {line_count} 条")
            index = int(common.read_ini(ini_file))
            tag = True    
            while tag:
                #根据索引取出数据
                Email_data = lines[index].strip()
                common.log(Email_data + " 检测中...")                email_locator = (By.CLASS_NAME, 'generic-input-field.form-textbox-input.iforgot-apple-id.force-ltr')
                email_element = common.is_element_present(browser, email_locator)
                
                image_data_locator = (By.XPATH, '//idms-captcha//div//div//img')
                image_data_element = common.is_element_present(browser, image_data_locator)
                
                capth_locator = (By.CLASS_NAME, 'generic-input-field.form-textbox-input.captcha-input')
                capth_element = common.is_element_present(browser, capth_locator)
                    
                submit_locator = (By.XPATH, '//idms-toolbar//div//div//div//button')
                submit_element = common.is_element_present(browser, submit_locator)
                if     email_element == True and image_data_element == True and capth_element == True and submit_element == True :                                
                    time.sleep(0.5)
                    browser.find_element(By.CLASS_NAME, 'generic-input-field.form-textbox-input.iforgot-apple-id.force-ltr').send_keys(Email_data)                    # 获取验证码数据并识别
                    image_element = browser.find_element(By.CSS_SELECTOR, '.img-wrapper > img:nth-child(1)')
                    Verification_code = common.get_verify_code(image_element.screenshot_as_png)
                                        
                    time.sleep(0.5)
                    browser.find_element(By.CLASS_NAME, 'generic-input-field.form-textbox-input.captcha-input').send_keys(Verification_code)                      time.sleep(0.5)    
                    browser.find_element(By.XPATH, '//idms-toolbar//div//div//div//button').click()
                
                    time.sleep(1)
                    button_locator = (By.CSS_SELECTOR, 'button.button:nth-child(2) > div:nth-child(1)')
                    button_element = common.is_element_present(browser, button_locator)
                    if button_element == True :
                        # 记录当前检测的数据的索引
                        index += 1
                        common.write_ini(ini_file, index)
                        
                        # 记录检测成功的数据
                        common.wirte_append_txt(result_path, result_file_name, Email_data + "---" + "OK\n")
                        common.log(Email_data + ' 已开通')            
                    else:    
                        err_mess_locator = (By.CLASS_NAME, 'form-message-wrapper.std-error span.form-message')
                        err_mess_lement= common.is_element_present(browser, err_mess_locator)
                        if err_mess_lement == True :
                            common.log('验证码识别错误,重新检测中...')                
                        else:
                            index += 1
                            common.write_ini(ini_file, index)
                            # 记录检测成功的数据
                            common.wirte_append_txt(result_path, result_file_name, Email_data + "---" + "Fail\n")
                            common.log(Email_data + ' 未开通')
                        
                    if index >= line_count:
                        common.write_ini(ini_file, 0)
                        common.log(f'{file_txt}, 文件的{line_count}条数据已全部检测完毕!')    
                        
                        tag = False
                        break                
                else:
                    common.log('API接口加载失败,重新请求中...')
                browser.quit() 
                time.sleep(0.5)
                browser = init()                
    else:
        common.log(f"待检测的 {file_txt} 文件不存在!")
                   
 
# 取当前日期时间,返回格式20250113形式
def date_now():date_now = time.strftime("%Y%m%d", time.localtime()) return date_nowif __name__ == '__main__':
    common.banner()result_file_name = common.date_now() + '_检测结果.txt'
    Check('data.txt', 'Config.ini', '检测结果', result_file_name)

源码编译后运行效果图(程序可以在WindowsMac/Linux等系统下多开同时运行,协议通道版检测,无需APP ID,无需证书,安装即可使用, 全自动im蓝号检测,无需人工看守;检测结果自动保存,升级版参考文章: http://www.opsers.net  )

 1

 

http://www.wxhsa.cn/company.asp?id=1442

相关文章:

  • 栈和队列总结
  • 工业互联网认知实训台-一句话介绍
  • 湾区杯 SilentMiner WP
  • Python-课后题题目-1.1编程世界初探
  • Python-课后题题目-1.2初识python语言
  • node和npm相关的记录
  • 在Spring boot 中使用@master 设置主从数据库
  • 设计模式-装饰器模式 - MaC
  • 【API接口】最新可用河马短剧接口
  • 第 16 章反射(reflection)
  • 自我介绍+软工5问
  • 电容器+动生电动势+自由落体模型
  • 引用(reference)
  • 设计模式-组合模式 - MaC
  • 【推荐】100%开源!大型工业跨平台软件C++源码提供,建模,组态
  • tmux 使用教程
  • 引用类型
  • CF1237C2
  • 力扣215. 数组中的第K个最大元素
  • 设计模式-桥接模式 - MaC
  • linux环境docker离线镜像elasticsearch-7.17.3镜像资源
  • Python 降序排序:轻松搞定列表、字典和自定义对象
  • 第02周 预习、实验与作业:Java基础语法2、面向对象入门
  • part 4
  • systemctl的service脚本写法
  • 9月份美联储的降息利好
  • 口胡记录
  • Day16内存分析及初始化
  • leveldb源码分析 #1 Slice WriteBatch WriteBatchInternal 【work记录】