From 5901d63f3e1fd3734ec4090a7b01d76b3cbeda98 Mon Sep 17 00:00:00 2001 From: nineven Date: Wed, 9 Mar 2022 22:20:31 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=EF=BC=8C=E5=A2=9E=E5=8A=A0=E8=AE=BE=E5=A4=87=E5=90=8C=E6=AD=A5?= =?UTF-8?q?=E8=AF=A6=E7=BB=86=E6=97=A5=E5=BF=97=E3=80=90=E6=9C=89=E6=97=B6?= =?UTF-8?q?=E5=80=99=E4=BC=9A=E5=88=A0=E9=99=A4=E8=AF=A5=E5=BC=80=E5=8F=91?= =?UTF-8?q?=E8=80=85=E4=B8=8B=E6=89=80=E6=9C=89=E7=AD=BE=E5=90=8D=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=EF=BC=8C=E5=BE=88=E8=AF=A1=E5=BC=82=E3=80=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../libs/sendmsg/templates/check_developer.html | 6 +----- fir_ser/tests/postudid.py | 7 +++---- fir_ser/xsign/utils/supersignutils.py | 17 ++++++++++++----- 3 files changed, 16 insertions(+), 14 deletions(-) diff --git a/fir_ser/common/libs/sendmsg/templates/check_developer.html b/fir_ser/common/libs/sendmsg/templates/check_developer.html index 5ac4f71..b34c508 100644 --- a/fir_ser/common/libs/sendmsg/templates/check_developer.html +++ b/fir_ser/common/libs/sendmsg/templates/check_developer.html @@ -10,10 +10,6 @@ margin-left: auto; } - .span12 { - width: 1170px; - } - .table { --bs-table-bg: transparent; --bs-table-accent-bg: transparent; @@ -136,7 +132,7 @@
-
+

尊敬的用户 {{ username }} 你好,苹果开发者状态监测如下:

diff --git a/fir_ser/tests/postudid.py b/fir_ser/tests/postudid.py index 3f04a18..3040b16 100644 --- a/fir_ser/tests/postudid.py +++ b/fir_ser/tests/postudid.py @@ -52,7 +52,7 @@ short_list = [ def postudid(short=short_list[0], udid=udid_lists[0]): 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" % (short) + uri = "https://app.hehelucky.cn/api/v1/fir/xsign/udid/%s" % (short) req = requests.post(uri, data=data) print(req.status_code, req.text) @@ -93,9 +93,8 @@ udid_test_s = [ "00008030-000E6CC122D2402E" ] - -# postudid(udid="760862a7367dea986542dae17ee31cd139e454ad", short='semi') -# exit() +postudid(udid="41d1b77e3a831f82a0ca306beaceeb955280b57a", short='vcdp') +exit() def call_function_try_attempts(try_attempts=3): diff --git a/fir_ser/xsign/utils/supersignutils.py b/fir_ser/xsign/utils/supersignutils.py index 9f3ef50..8d0dd2d 100644 --- a/fir_ser/xsign/utils/supersignutils.py +++ b/fir_ser/xsign/utils/supersignutils.py @@ -1076,29 +1076,36 @@ class IosUtils(object): udid_developer_obj_list = UDIDsyncDeveloper.objects.filter(developerid=developer_obj).values_list('udid') udid_developer_list = [x[0] for x in udid_developer_obj_list if len(x) > 0] udid_result_list = [device.udid for device in result] + logger.warning(f"issuer_id:{developer_obj.issuer_id} udid database info: {udid_developer_list}") + logger.warning(f"issuer_id:{developer_obj.issuer_id} udid develope info: {udid_result_list}") will_del_udid_list = list(set(udid_developer_list) - set(udid_result_list)) + logger.warning(f"issuer_id:{developer_obj.issuer_id} udidsync will delete: {will_del_udid_list}") udid_enabled_result_list = [device.udid for device in result if device.status == 'ENABLED'] will_del_disabled_udid_list = list(set(udid_developer_list) - set(udid_enabled_result_list)) + logger.warning(f"issuer_id:{developer_obj.issuer_id} delete and disabled: {will_del_disabled_udid_list}") for device_obj in result: obj, create = update_or_create_developer_udid_info(device_obj, developer_obj) if not create: DeveloperDevicesID.objects.filter(udid=obj, developerid=developer_obj).update( **{'did': device_obj.id}) - AppUDID.objects.filter(udid__udid__in=will_del_disabled_udid_list, - app_id__developerdevicesid__udid__in=UDIDsyncDeveloper.objects.filter( - udid__in=will_del_disabled_udid_list)).delete() + AppUDID.objects.filter(udid__udid__in=will_del_disabled_udid_list, udid__developerid=developer_obj).delete() developer_device_list = DeveloperDevicesID.objects.filter(udid__udid__in=will_del_disabled_udid_list, developerid=developer_obj).all() + app_pk_list = [] for developer_device_obj in developer_device_list: - app_obj = developer_device_obj.app_id + app_pk_list.append(developer_device_obj.app_id.pk) + developer_device_obj.delete() + + for app_pk in list(set(app_pk_list)): + app_obj = Apps.objects.filter(pk=app_pk).first() if APPSuperSignUsedInfo.objects.filter(developerid=developer_obj, app_id=app_obj).count() == 0: + logger.warning(f"issuer_id:{developer_obj.issuer_id} delete {app_obj} profile and sign ipa file") IosUtils.clean_app_by_developer_obj(app_obj, developer_obj) delete_app_to_dev_and_file(developer_obj, app_obj.pk) delete_app_profile_file(developer_obj, app_obj) - developer_device_obj.delete() UDIDsyncDeveloper.objects.filter(udid__in=will_del_udid_list, developerid=developer_obj).delete() From 684a407f978ad56793eeb94230e3a5ad38993146 Mon Sep 17 00:00:00 2001 From: nineven Date: Wed, 9 Mar 2022 22:26:57 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=EF=BC=8C=E5=A2=9E=E5=8A=A0=E8=AE=BE=E5=A4=87=E5=90=8C=E6=AD=A5?= =?UTF-8?q?=E8=AF=A6=E7=BB=86=E6=97=A5=E5=BF=97=E3=80=90=E6=9C=89=E6=97=B6?= =?UTF-8?q?=E5=80=99=E4=BC=9A=E5=88=A0=E9=99=A4=E8=AF=A5=E5=BC=80=E5=8F=91?= =?UTF-8?q?=E8=80=85=E4=B8=8B=E6=89=80=E6=9C=89=E7=AD=BE=E5=90=8D=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=EF=BC=8C=E5=BE=88=E8=AF=A1=E5=BC=82=E3=80=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fir_ser/xsign/utils/supersignutils.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fir_ser/xsign/utils/supersignutils.py b/fir_ser/xsign/utils/supersignutils.py index 8d0dd2d..a3b5b47 100644 --- a/fir_ser/xsign/utils/supersignutils.py +++ b/fir_ser/xsign/utils/supersignutils.py @@ -1076,13 +1076,15 @@ class IosUtils(object): udid_developer_obj_list = UDIDsyncDeveloper.objects.filter(developerid=developer_obj).values_list('udid') udid_developer_list = [x[0] for x in udid_developer_obj_list if len(x) > 0] udid_result_list = [device.udid for device in result] + udid_enabled_result_list = [device.udid for device in result if device.status == 'ENABLED'] + logger.warning(f"issuer_id:{developer_obj.issuer_id} udid database info: {udid_developer_list}") logger.warning(f"issuer_id:{developer_obj.issuer_id} udid develope info: {udid_result_list}") + logger.warning(f"issuer_id:{developer_obj.issuer_id} udid develope enable info: {udid_enabled_result_list}") will_del_udid_list = list(set(udid_developer_list) - set(udid_result_list)) logger.warning(f"issuer_id:{developer_obj.issuer_id} udidsync will delete: {will_del_udid_list}") - udid_enabled_result_list = [device.udid for device in result if device.status == 'ENABLED'] will_del_disabled_udid_list = list(set(udid_developer_list) - set(udid_enabled_result_list)) logger.warning(f"issuer_id:{developer_obj.issuer_id} delete and disabled: {will_del_disabled_udid_list}")