From a3bc31a0f92049bbdaa701dcde004c68dba1369b Mon Sep 17 00:00:00 2001 From: nineven Date: Sun, 28 Feb 2021 13:30:42 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=B6=85=E7=BA=A7=E7=AD=BE?= =?UTF-8?q?=E5=B7=B2=E7=9F=A5=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/FirSuperSignBase.vue | 1 - fir_ser/api/utils/app/supersignutils.py | 9 +++++- fir_ser/api/views/receiveudids.py | 2 -- fir_ser/tests/postudid.py | 31 ++++++++++++------- 4 files changed, 28 insertions(+), 15 deletions(-) diff --git a/fir_client/src/components/FirSuperSignBase.vue b/fir_client/src/components/FirSuperSignBase.vue index 0dfd521..afb931d 100644 --- a/fir_client/src/components/FirSuperSignBase.vue +++ b/fir_client/src/components/FirSuperSignBase.vue @@ -537,7 +537,6 @@ this.authemail = developer.email; } else if (developer.issuer_id) { this.iosdeveloperFun({"methods": "PUT", "data": {"issuer_id": developer.issuer_id, "act": act}}); - this.codeactiveVisible = true; } // this.inputcode(developer) diff --git a/fir_ser/api/utils/app/supersignutils.py b/fir_ser/api/utils/app/supersignutils.py index 944d581..a24339e 100644 --- a/fir_ser/api/utils/app/supersignutils.py +++ b/fir_ser/api/utils/app/supersignutils.py @@ -262,7 +262,11 @@ class IosUtils(object): return provisionName + '.mobileprovision' def resign(self): - if AppUDID.objects.filter(app_id=self.app_obj, udid=self.udid_info.get('udid')).first().is_signed: + if not self.developer_obj: + logger.error("udid %s app %s not exists apple developer" % (self.udid_info.get('udid'), self.app_obj)) + return + app_udid_obj = AppUDID.objects.filter(app_id=self.app_obj, udid=self.udid_info.get('udid')).first() + if app_udid_obj and app_udid_obj.is_signed: apptodev_obj = APPToDeveloper.objects.filter(app_id=self.app_obj).first() if apptodev_obj: release_obj = AppReleaseInfo.objects.filter(app_id=self.app_obj, is_master=True).first() @@ -302,6 +306,9 @@ class IosUtils(object): self.resign() return + AppUDID.objects.update_or_create(app_id=self.app_obj, udid=self.udid_info.get('udid'), + defaults=self.udid_info) + file_format_path_name = file_format_path(self.user_obj, self.auth) my_local_key = file_format_path_name + ".key" app_dev_pem = file_format_path_name + ".pem" diff --git a/fir_ser/api/views/receiveudids.py b/fir_ser/api/views/receiveudids.py index 18678fd..08343a2 100644 --- a/fir_ser/api/views/receiveudids.py +++ b/fir_ser/api/views/receiveudids.py @@ -25,8 +25,6 @@ class IosUDIDView(View): if app_info: if app_info.issupersign and app_info.user_id.supersign_active: - AppUDID.objects.update_or_create(app_id=app_info, udid=format_udid_info.get('udid'), - defaults=format_udid_info) ios_obj = IosUtils(format_udid_info, app_info.user_id, app_info) ios_obj.resign() else: diff --git a/fir_ser/tests/postudid.py b/fir_ser/tests/postudid.py index 8b2d3ec..89a828d 100644 --- a/fir_ser/tests/postudid.py +++ b/fir_ser/tests/postudid.py @@ -4,7 +4,7 @@ import random short = ["bgql", "wjbu", "vnfg", "bgql"] udid_lists = [ - "f55df38afe5c1242b8bc478d0182bbd0d7d08929", + "f55df38afe5c1242b8bc478d0182bbd0d7d08929aeasadfsdf", "f55df38afe5c1242b8bc478d0182bbd0d7d08929", "f55df38afe5c1242b8bc478d0182bbd0d7d08922", "f55df38afe5c1242b8bc478d0182bbd0d7d01129", @@ -34,16 +34,25 @@ udid_lists = [ "f55df38afe5c1242b8bc478d0182bbd0d7dsfe08929", ] -shorts='pzsdaaa' -for udid in udid_lists: - data = '\n\n\n\n\tPRODUCT\n\tiPhone9,1\n\tSERIAL\n\tF71YD58GHG74\n\tUDID\n\t%s\n\tVERSION\n\t17E262\n\n\n' % ( - udid) - # uri = "https://app.hehelucky.cn/udid/%s" % (random.choice(short)) - uri = "https://app.hehelucky.cn/udid/%s" % (shorts) - req = requests.post(uri, data=data) - print(req.status_code) - print(req.text) - exit(1) +def postaaa(shorts='bncz'): + + for udid in udid_lists: + udid=udid+str(random.choice(short))+str(random.choice(short))+str(random.choice(short)) + data = '\n\n\n\n\tPRODUCT\n\tiPhone9,1\n\tSERIAL\n\tF71YD58GHG74\n\tUDID\n\t%s\n\tVERSION\n\t17E262\n\n\n' % ( + udid) + # uri = "https://app.hehelucky.cn/udid/%s" % (random.choice(short)) + uri = "https://app.hehelucky.cn/udid/%s" % (shorts) + req = requests.post(uri, data=data) + print(req.headers) + print(req.status_code) + print(req.text) + # exit(1) # a = '验证码%(code)s,您正在注册成为新用户,感谢您的支持!' # print(a % {'code': 111}) +pa=10 +while pa> 0: + postaaa() + pa=pa-1 + +postaaa() \ No newline at end of file