首页
社区
课程
招聘
[原创] iTunes Apple ID 苹果账号登录协议
2020-1-2 18:02 51474

[原创] iTunes Apple ID 苹果账号登录协议

2020-1-2 18:02
51474
iTunes 12.0 x64版本。QQ 9292 0 4200

private iTunesDownloadErrorState LoginApp(iTunesUserInfo appleAccountInfo_0)
        {
           
            iTunesDownloadErrorState succeed = iTunesDownloadErrorState.Succeed;
            Dictionary<object, object> objPlist = new Dictionary<object, object>();
            objPlist.Add("appleId", appleAccountInfo_0.UserName);
            objPlist.Add("attempt", "1");
            objPlist.Add("createSession", true);
            objPlist.Add("guid", appleAccountInfo_0.Guid);
            objPlist.Add("machineName", appleAccountInfo_0.MachineName);
            objPlist.Add("password", appleAccountInfo_0.Password);
            objPlist.Add("why", "signIn");
            string s = tool.CreatePlistString(objPlist);
        Label_0084:
            appleAccountInfo_0.IsAreaChanged = false;

            DateTime now = DateTime.Now;
            while (DateTime.Now.Subtract(now).TotalSeconds < 120.0)
            {
                try
                {
                    string str5 = string.Format("https://p{0}-buy.itunes.apple.com/WebObjects/MZFinance.woa/wa/authenticate", appleAccountInfo_0.ServerId);
                    string str6 = string.Format("https://itunes.apple.com/WebObjects/MZStore.woa/wa/viewGrouping?cc={0}&mt=8", GetAreaByDescription(appleAccountInfo_0.StoredDescrption));
                    byte[] bytes = Encoding.UTF8.GetBytes(s);
                    string str7 = string.Empty;
                    if (NewLogin)
                    {
                        str7 = Convert.ToBase64String(this.GetSignsapsetupcertbyte(appleAccountInfo_0.StoredDescrption, bytes));
                    }
                    HttpWebRequest request = this.SetiTunesHtppHeaders(str5, bytes, str6, appleAccountInfo_0.StoredDescrption, str7,appleAccountInfo_0);
                    request.ContentType = "application/x-apple-plist";
                    string str8 = "";
                    string str9 = this.GetiTunesHtpp(request, ref str8, appleAccountInfo_0); 
                    if (!string.IsNullOrEmpty(str9) && (str8 == ""))
                    {
                        //if (!appleAccountInfo_0.IsAreaChanged)
                        {
                            appleAccountInfo_0.PlistContent = str9;
                        }
                        request = null;
                        break;
                    }
                    appleAccountInfo_0.ServerId = this.GetServerId(str8);
                    request = null;
                }
                catch (Exception exception)
                {

                }
                continue;
            }
            //if (appleAccountInfo_0.IsAreaChanged)
            {
              //  goto Label_0084;
            }
            if (appleAccountInfo_0.PlistContent.Length == 0)
            {
                succeed = iTunesDownloadErrorState.WebCannotAnalyse;
            }
            else
            {
                //MessageBox.Show(appleAccountInfo_0.PlistContent);

                string str3 = this.GetKeyValue("<key>failureType</key>", "<string>", "</string>", appleAccountInfo_0.PlistContent);
                string str2 = this.GetKeyValue("<key>customerMessage</key>", "<string>", "</string>", appleAccountInfo_0.PlistContent);
                if ((str2.Length <= 0) && (str3.Length <= 0))
                {
                    if (str2.Length > 0)
                    {
                        if (str2.Contains("https://iforgot.apple.com"))
                        {
                            succeed = iTunesDownloadErrorState.LoginiTunesDisable;
                        }
                        else
                        {
                            succeed = iTunesDownloadErrorState.UnKnow;
                        }
                    }
                    //您的 Apple ID 或密码输入有误
                    else if ((str3.Length == 0) && (str2.Length == 0))
                    {
                        string str4 = this.GetKeyValue("<key>message</key>", "<string>", "</string>", appleAccountInfo_0.PlistContent);
                        if ((str4.Length > 0) && str4.StartsWith("This Apple ID is only valid for purchases"))
                        {
                            succeed = iTunesDownloadErrorState.LoginInOtherStore;
                            Nt.LoggerService.ULogger.Debug(appleAccountInfo_0.PlistContent);
                        }
                    }
                }
                else if (appleAccountInfo_0.PlistContent.IndexOf("或密码输入有误") > 0 || appleAccountInfo_0.PlistContent.IndexOf("Your Apple ID or password was entered incorrectly") > 0)
                {
                    succeed = iTunesDownloadErrorState.LoginException;
                    //写放数据
                    /*
                    if (_errorLogin.InsertDbLogin(new errorLoginUser { userName = appleAccountInfo_0.UserName, pwd = appleAccountInfo_0.Password }) > 0)
                    {
                        Nt.LoggerService.ULogger.Debug(string.Format("********用户:{0}, 登录或密码错误, 数据已经写入数据库********", appleAccountInfo_0.UserName));

                    }
                    else
                    {
                        Nt.LoggerService.ULogger.Debug(string.Format("********用户:{0}, 登录或密码错误, 数据未写入数据库!********", appleAccountInfo_0.UserName));
                    }
                     */
                }
                else if (appleAccountInfo_0.PlistContent.IndexOf("您的帐户已被禁用") > 0 && appleAccountInfo_0.PlistContent.IndexOf("以重新设置您的帐户") > 0)
                {
                    succeed = iTunesDownloadErrorState.NeedSecurityCode;
                }
                else if (appleAccountInfo_0.PlistContent.IndexOf("您的帐户已被禁用") > 0)
                {
                    succeed = iTunesDownloadErrorState.LoginiTunesDisable;
                }
                else if (appleAccountInfo_0.PlistContent.IndexOf("<key>failureType</key>") > 0)
                {
                    succeed = iTunesDownloadErrorState.LoginiTunesDisable;
                    Nt.LoggerService.ULogger.Debug(appleAccountInfo_0.PlistContent);
                }
                else
                {
                    succeed = iTunesDownloadErrorState.UnKnow;
                }
            }
            
            return succeed;
        }









阿里云助力开发者!2核2G 3M带宽不限流量!6.18限时价,开 发者可享99元/年,续费同价!

收藏
点赞0
打赏
分享
最新回复 (15)
雪    币: 2952
活跃值: (2628)
能力值: ( LV4,RANK:40 )
在线值:
发帖
回帖
粉丝
小调调 2020-1-6 10:09
2
0
这个太弱了吧~
雪    币: 10
活跃值: (109)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
youyinkai 2020-1-12 21:54
3
0
没什么难度这个 我也才又搞了一遍登录签名+guid全套 没什么变化 还是那接近20个左右函数
雪    币: 5
能力值: ( LV1,RANK:0 )
在线值:
发帖
回帖
粉丝
git_80114alihasanzaade 2020-6-14 03:59
4
0
I looking for a iOS reverse engineer for a project, I pay good money
Please contact me on Skype:
live:admin_161310
雪    币: 3
活跃值: (90)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
走码观花 2020-11-1 18:13
5
0
git上都有开源的了
雪    币: 27
活跃值: (90)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
caihaonan 2020-11-7 20:13
6
0
额这个感觉有点基础的就能写出来....
雪    币: 172
能力值: ( LV1,RANK:0 )
在线值:
发帖
回帖
粉丝
zsboy125 2020-11-9 09:59
7
0
萌新的我,在看雪论坛,有点无处安放,完全看不懂...
雪    币: 60
活跃值: (406)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
wx_浴血筑梦 2021-10-18 20:56
8
0
求大神 逆向分析 apple store购买流程,350 12345
雪    币: 41
能力值: ( LV1,RANK:0 )
在线值:
发帖
回帖
粉丝
mb_uhuswhpe 2022-4-14 17:41
9
0
guid
雪    币: 43
能力值: ( LV1,RANK:0 )
在线值:
发帖
回帖
粉丝
mb_jkdkkndb 2022-5-4 17:31
10
0
收一个itunes注册机,有的扣扣3593687896
雪    币: 2
能力值: ( LV1,RANK:0 )
在线值:
发帖
回帖
粉丝
qldxw 2022-7-4 01:01
11
0
收一个itunes注册机,有现成的更好
雪    币: 90
活跃值: (310)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
mb_eoototam 2022-8-17 15:59
12
1
youyinkai 没什么难度这个 我也才又搞了一遍登录签名+guid全套 没什么变化 还是那接近20个左右函数
大佬可以请教问题吗
雪    币: 21
能力值: ( LV1,RANK:0 )
在线值:
发帖
回帖
粉丝
suncheng0932 2022-11-10 08:22
13
1
I looking for a iOS reverse engineer for a project, I pay good money
Please contact me on Skype:
live:@suncheng0932
雪    币: 19773
活跃值: (29385)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
秋狝 2023-9-14 09:45
15
1
感谢分享
雪    币: 4
活跃值: (330)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
慈悲佛祖 2024-1-27 22:04
16
0
之前研究过itunes注册和itunes登录。有kbsync算法和x_apple_ActionSignature算法。
游客
登录 | 注册 方可回帖
返回