reformat code and import

publicsignpoll
fxC 3 years ago
parent cb4fc0b827
commit 0a20226dd7
  1. 2
      fir_ser/admin/admin.py
  2. 2
      fir_ser/admin/models.py
  3. 2
      fir_ser/admin/tests.py
  4. 9
      fir_ser/admin/urls.py
  5. 25
      fir_ser/admin/views/app.py
  6. 2
      fir_ser/admin/views/celery_flower.py
  7. 17
      fir_ser/admin/views/domain.py
  8. 12
      fir_ser/admin/views/login.py
  9. 23
      fir_ser/admin/views/order.py
  10. 23
      fir_ser/admin/views/storage.py
  11. 21
      fir_ser/admin/views/supersign.py
  12. 20
      fir_ser/admin/views/user.py
  13. 8
      fir_ser/api/base_views.py
  14. 5
      fir_ser/api/management/commands/services/command.py
  15. 11
      fir_ser/api/management/commands/services/hands.py
  16. 2
      fir_ser/api/management/commands/services/services/__init__.py
  17. 6
      fir_ser/api/management/commands/services/services/base.py
  18. 5
      fir_ser/api/management/commands/services/services/beat.py
  19. 2
      fir_ser/api/management/commands/services/services/celery_base.py
  20. 2
      fir_ser/api/management/commands/services/services/flower.py
  21. 2
      fir_ser/api/management/commands/services/services/gunicorn.py
  22. 2
      fir_ser/api/management/commands/services/services/uwsgi.py
  23. 4
      fir_ser/api/management/commands/services/utils.py
  24. 4
      fir_ser/api/migrations/0001_initial.py
  25. 2
      fir_ser/api/migrations/0005_thirdwechatuserinfo.py
  26. 2
      fir_ser/api/migrations/0012_useraddisplayinfo.py
  27. 2
      fir_ser/api/migrations/0015_iosdeveloperpublicpoolbill_remoteclientinfo.py
  28. 2
      fir_ser/api/migrations/0016_alter_appudid_udid.py
  29. 10
      fir_ser/api/models.py
  30. 8
      fir_ser/api/tasks.py
  31. 14
      fir_ser/api/urls.py
  32. 8
      fir_ser/api/utils/TokenManager.py
  33. 7
      fir_ser/api/utils/app/apputils.py
  34. 10
      fir_ser/api/utils/app/firApi.py
  35. 15
      fir_ser/api/utils/app/iossignapi.py
  36. 3
      fir_ser/api/utils/app/raqc.py
  37. 10
      fir_ser/api/utils/app/shellcmds.py
  38. 2
      fir_ser/api/utils/app/supersignutils.py
  39. 7
      fir_ser/api/utils/apple/appleapiv3.py
  40. 8
      fir_ser/api/utils/auth.py
  41. 16
      fir_ser/api/utils/baseutils.py
  42. 11
      fir_ser/api/utils/crontab/ctasks.py
  43. 7
      fir_ser/api/utils/geetest/geetest_lib.py
  44. 6
      fir_ser/api/utils/geetest/geetest_utils.py
  45. 3
      fir_ser/api/utils/middlewares.py
  46. 7
      fir_ser/api/utils/modelutils.py
  47. 12
      fir_ser/api/utils/mp/utils.py
  48. 8
      fir_ser/api/utils/mp/wechat.py
  49. 8
      fir_ser/api/utils/pay/ali.py
  50. 12
      fir_ser/api/utils/pay/alipay/__init__.py
  51. 10
      fir_ser/api/utils/pay/alipay/compat.py
  52. 1
      fir_ser/api/utils/pay/alipay/loggers.py
  53. 10
      fir_ser/api/utils/pay/alipay/utils.py
  54. 2
      fir_ser/api/utils/pay/util.py
  55. 7
      fir_ser/api/utils/pay/wx.py
  56. 11
      fir_ser/api/utils/pay/wxpay/core.py
  57. 3
      fir_ser/api/utils/sendmsg/aliyunApi.py
  58. 3
      fir_ser/api/utils/sendmsg/jiguangApi.py
  59. 5
      fir_ser/api/utils/sendmsg/sendmsg.py
  60. 7
      fir_ser/api/utils/serializer.py
  61. 11
      fir_ser/api/utils/storage/aliyunApi.py
  62. 18
      fir_ser/api/utils/storage/caches.py
  63. 5
      fir_ser/api/utils/storage/localApi.py
  64. 6
      fir_ser/api/utils/storage/qiniuApi.py
  65. 16
      fir_ser/api/utils/storage/storage.py
  66. 3
      fir_ser/api/utils/tempcaches.py
  67. 3
      fir_ser/api/utils/throttle.py
  68. 23
      fir_ser/api/utils/utils.py
  69. 12
      fir_ser/api/views/advert.py
  70. 23
      fir_ser/api/views/apps.py
  71. 10
      fir_ser/api/views/domain.py
  72. 27
      fir_ser/api/views/download.py
  73. 24
      fir_ser/api/views/login.py
  74. 12
      fir_ser/api/views/logout.py
  75. 16
      fir_ser/api/views/order.py
  76. 18
      fir_ser/api/views/receiveudids.py
  77. 11
      fir_ser/api/views/storage.py
  78. 13
      fir_ser/api/views/supersign.py
  79. 9
      fir_ser/api/views/thirdlogin.py
  80. 22
      fir_ser/api/views/uploads.py
  81. 4
      fir_ser/cli.py
  82. 4
      fir_ser/cli/urls.py
  83. 3
      fir_ser/cli/views/apps.py
  84. 2
      fir_ser/cli/views/login.py
  85. 2
      fir_ser/fir_ser/celery.py
  86. 2
      fir_ser/fir_ser/urls.py
  87. 3
      fir_ser/tests/postudid.py

@ -1,3 +1 @@
from django.contrib import admin
# Register your models here. # Register your models here.

@ -1,3 +1 @@
from django.db import models
# Create your models here. # Create your models here.

@ -1,3 +1 @@
from django.test import TestCase
# Create your tests here. # Create your tests here.

@ -14,13 +14,14 @@ Including another URLconf
2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) 2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
""" """
from django.urls import re_path from django.urls import re_path
from admin.views.login import LoginView, LoginUserView
from admin.views.user import UserInfoView, UserCertificationInfoView, ThirdWxAccountView
from admin.views.app import AppInfoView, AppReleaseInfoView from admin.views.app import AppInfoView, AppReleaseInfoView
from admin.views.storage import StorageInfoView, StorageChangeView from admin.views.domain import DomainNameInfoView
from admin.views.login import LoginView, LoginUserView
from admin.views.order import OrderInfoView from admin.views.order import OrderInfoView
from admin.views.storage import StorageInfoView, StorageChangeView
from admin.views.supersign import DeveloperInfoView, DevicesInfoView from admin.views.supersign import DeveloperInfoView, DevicesInfoView
from admin.views.domain import DomainNameInfoView from admin.views.user import UserInfoView, UserCertificationInfoView, ThirdWxAccountView
urlpatterns = [ urlpatterns = [
# path("",include(router.urls)), # path("",include(router.urls)),

@ -4,27 +4,20 @@
# author: liuyu # author: liuyu
# date: 2021/4/11 # date: 2021/4/11
from django.contrib import auth import logging
from api.models import Token, AppReleaseInfo, Apps
from rest_framework.pagination import PageNumberPagination
from rest_framework.response import Response from rest_framework.response import Response
from rest_framework.views import APIView
from api.base_views import app_delete
from api.models import AppReleaseInfo, Apps
from api.utils.TokenManager import verify_token from api.utils.TokenManager import verify_token
from api.utils.auth import AdminTokenAuthentication from api.utils.auth import AdminTokenAuthentication
from api.utils.serializer import AdminAppsSerializer, AdminAppReleaseSerializer
from django.core.cache import cache
from rest_framework.views import APIView
import binascii
import os, datetime
from api.utils.utils import get_captcha, valid_captcha, get_choices_dict
from api.utils.response import BaseResponse
from fir_ser.settings import CACHE_KEY_TEMPLATE, LOGIN
from api.utils.storage.caches import login_auth_failed, del_cache_response_by_short, get_app_instance_by_cache, \
get_download_url_by_cache
import logging
from api.utils.throttle import VisitRegister1Throttle, VisitRegister2Throttle
from rest_framework.pagination import PageNumberPagination
from api.utils.baseutils import get_dict_from_filter_fields from api.utils.baseutils import get_dict_from_filter_fields
from api.base_views import app_delete from api.utils.response import BaseResponse
from api.utils.serializer import AdminAppsSerializer, AdminAppReleaseSerializer
from api.utils.storage.caches import del_cache_response_by_short, get_download_url_by_cache
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)

@ -1,7 +1,7 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# #
from django.http import HttpResponse
from django.conf import settings from django.conf import settings
from django.http import HttpResponse
from django.utils.translation import ugettext as _ from django.utils.translation import ugettext as _
from proxy.views import proxy_view from proxy.views import proxy_view
from rest_framework.views import APIView from rest_framework.views import APIView

@ -4,17 +4,18 @@
# author: liuyu # author: liuyu
# date: 2021/4/11 # date: 2021/4/11
from api.models import UserDomainInfo
from rest_framework.response import Response
from api.utils.auth import AdminTokenAuthentication
from api.utils.serializer import AdminDomainNameSerializer
from rest_framework.views import APIView
from api.utils.response import BaseResponse
from api.utils.storage.caches import del_cache_response_by_short, reset_app_wx_easy_type
import logging import logging
from rest_framework.pagination import PageNumberPagination from rest_framework.pagination import PageNumberPagination
from rest_framework.response import Response
from rest_framework.views import APIView
from api.models import UserDomainInfo
from api.utils.auth import AdminTokenAuthentication
from api.utils.baseutils import get_dict_from_filter_fields from api.utils.baseutils import get_dict_from_filter_fields
from api.base_views import app_delete from api.utils.response import BaseResponse
from api.utils.serializer import AdminDomainNameSerializer
from api.utils.storage.caches import reset_app_wx_easy_type
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)

@ -4,17 +4,19 @@
# author: liuyu # author: liuyu
# date: 2021/4/11 # date: 2021/4/11
import logging
from django.contrib import auth from django.contrib import auth
from rest_framework.response import Response from rest_framework.response import Response
from api.utils.auth import ExpiringTokenAuthentication
from api.utils.serializer import UserInfoSerializer
from rest_framework.views import APIView from rest_framework.views import APIView
from api.utils.utils import get_captcha, valid_captcha, set_user_token
from api.utils.auth import ExpiringTokenAuthentication
from api.utils.response import BaseResponse from api.utils.response import BaseResponse
from fir_ser.settings import CACHE_KEY_TEMPLATE, LOGIN from api.utils.serializer import UserInfoSerializer
from api.utils.storage.caches import login_auth_failed from api.utils.storage.caches import login_auth_failed
import logging
from api.utils.throttle import VisitRegister1Throttle, VisitRegister2Throttle from api.utils.throttle import VisitRegister1Throttle, VisitRegister2Throttle
from api.utils.utils import get_captcha, valid_captcha, set_user_token
from fir_ser.settings import LOGIN
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)

@ -4,26 +4,19 @@
# author: liuyu # author: liuyu
# date: 2021/4/11 # date: 2021/4/11
from django.contrib import auth import logging
from api.base_views import storage_change from rest_framework.pagination import PageNumberPagination
from api.models import Token, UserInfo, Order
from rest_framework.response import Response from rest_framework.response import Response
from rest_framework.views import APIView
from api.models import UserInfo, Order
from api.utils.auth import AdminTokenAuthentication from api.utils.auth import AdminTokenAuthentication
from api.utils.baseutils import get_dict_from_filter_fields from api.utils.baseutils import get_dict_from_filter_fields
from api.utils.serializer import AdminStorageSerializer, AdminUserCertificationSerializer, AdminOrdersSerializer
from django.core.cache import cache
from rest_framework.views import APIView
import binascii
import os, datetime
from api.utils.utils import get_captcha, valid_captcha, get_choices_dict, get_order_num
from api.utils.response import BaseResponse from api.utils.response import BaseResponse
from fir_ser.settings import CACHE_KEY_TEMPLATE, LOGIN from api.utils.serializer import AdminOrdersSerializer
from api.utils.storage.caches import login_auth_failed, update_order_info from api.utils.storage.caches import update_order_info
import logging from api.utils.utils import get_order_num
from api.utils.throttle import VisitRegister1Throttle, VisitRegister2Throttle
from rest_framework.pagination import PageNumberPagination
from api.utils.baseutils import format_storage_selection
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)

@ -4,26 +4,19 @@
# author: liuyu # author: liuyu
# date: 2021/4/11 # date: 2021/4/11
from django.contrib import auth import logging
from api.base_views import storage_change from rest_framework.pagination import PageNumberPagination
from api.models import Token, UserInfo, AppStorage
from rest_framework.response import Response from rest_framework.response import Response
from rest_framework.views import APIView
from api.base_views import storage_change
from api.models import UserInfo, AppStorage
from api.utils.auth import AdminTokenAuthentication from api.utils.auth import AdminTokenAuthentication
from api.utils.baseutils import format_storage_selection
from api.utils.baseutils import get_dict_from_filter_fields from api.utils.baseutils import get_dict_from_filter_fields
from api.utils.serializer import AdminStorageSerializer, AdminUserCertificationSerializer
from django.core.cache import cache
from rest_framework.views import APIView
import binascii
import os, datetime
from api.utils.utils import get_captcha, valid_captcha, get_choices_dict
from api.utils.response import BaseResponse from api.utils.response import BaseResponse
from fir_ser.settings import CACHE_KEY_TEMPLATE, LOGIN from api.utils.serializer import AdminStorageSerializer
from api.utils.storage.caches import login_auth_failed
import logging
from api.utils.throttle import VisitRegister1Throttle, VisitRegister2Throttle
from rest_framework.pagination import PageNumberPagination
from api.utils.baseutils import format_storage_selection
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)

@ -4,24 +4,17 @@
# author: liuyu # author: liuyu
# date: 2021/4/11 # date: 2021/4/11
from django.contrib import auth import logging
from api.models import Token, APPSuperSignUsedInfo, AppIOSDeveloperInfo
from rest_framework.pagination import PageNumberPagination
from rest_framework.response import Response from rest_framework.response import Response
from rest_framework.views import APIView
from api.models import APPSuperSignUsedInfo, AppIOSDeveloperInfo
from api.utils.auth import AdminTokenAuthentication from api.utils.auth import AdminTokenAuthentication
from api.utils.baseutils import get_dict_from_filter_fields from api.utils.baseutils import get_dict_from_filter_fields
from api.utils.serializer import AdminDeveloperSerializer, AdminUserCertificationSerializer, \
AdminSuperSignUsedSerializer
from django.core.cache import cache
from rest_framework.views import APIView
import binascii
import os, datetime
from api.utils.utils import get_captcha, valid_captcha, get_choices_dict
from api.utils.response import BaseResponse from api.utils.response import BaseResponse
from fir_ser.settings import CACHE_KEY_TEMPLATE, LOGIN from api.utils.serializer import AdminDeveloperSerializer, AdminSuperSignUsedSerializer
from api.utils.storage.caches import login_auth_failed
import logging
from api.utils.throttle import VisitRegister1Throttle, VisitRegister2Throttle
from rest_framework.pagination import PageNumberPagination
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)

@ -4,23 +4,17 @@
# author: liuyu # author: liuyu
# date: 2021/4/11 # date: 2021/4/11
from django.contrib import auth import logging
from api.models import Token, UserInfo, UserCertificationInfo, ThirdWeChatUserInfo
from rest_framework.pagination import PageNumberPagination
from rest_framework.response import Response from rest_framework.response import Response
from rest_framework.views import APIView
from api.models import UserInfo, UserCertificationInfo, ThirdWeChatUserInfo
from api.utils.auth import AdminTokenAuthentication from api.utils.auth import AdminTokenAuthentication
from api.utils.baseutils import get_dict_from_filter_fields from api.utils.baseutils import get_dict_from_filter_fields
from api.utils.serializer import AdminUserInfoSerializer, AdminUserCertificationSerializer, AdminThirdWxSerializer
from django.core.cache import cache
from rest_framework.views import APIView
import binascii
import os, datetime
from api.utils.utils import get_captcha, valid_captcha, get_choices_dict
from api.utils.response import BaseResponse from api.utils.response import BaseResponse
from fir_ser.settings import CACHE_KEY_TEMPLATE, LOGIN from api.utils.serializer import AdminUserInfoSerializer, AdminUserCertificationSerializer, AdminThirdWxSerializer
from api.utils.storage.caches import login_auth_failed
import logging
from api.utils.throttle import VisitRegister1Throttle, VisitRegister2Throttle
from rest_framework.pagination import PageNumberPagination
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)

@ -4,14 +4,14 @@
# author: NinEveN # author: NinEveN
# date: 2021/4/13 # date: 2021/4/13
from api.utils.response import BaseResponse import logging
from api.models import AppReleaseInfo, APPToDeveloper, UserInfo, AppScreenShot, AppStorage
from api.utils.app.supersignutils import IosUtils from api.utils.app.supersignutils import IosUtils
from api.utils.storage.storage import Storage from api.utils.response import BaseResponse
from api.utils.storage.caches import del_cache_response_by_short, del_cache_by_delete_app, \ from api.utils.storage.caches import del_cache_response_by_short, del_cache_by_delete_app, \
del_cache_storage, MigrateStorageState del_cache_storage, MigrateStorageState
from api.models import AppReleaseInfo, APPToDeveloper, UserInfo, AppScreenShot, AppStorage from api.utils.storage.storage import Storage
import logging
from api.utils.utils import delete_local_files, delete_app_screenshots_files, change_storage_and_change_head_img, \ from api.utils.utils import delete_local_files, delete_app_screenshots_files, change_storage_and_change_head_img, \
migrating_storage_data, clean_storage_data, check_storage_is_new_storage migrating_storage_data, clean_storage_data, check_storage_is_new_storage

@ -1,7 +1,8 @@
from django.core.management.base import BaseCommand, CommandError from django.core.management.base import BaseCommand
from django.db.models import TextChoices from django.db.models import TextChoices
from .utils import ServicesUtil
from .hands import * from .hands import *
from .utils import ServicesUtil
class Services(TextChoices): class Services(TextChoices):

@ -1,13 +1,14 @@
import logging
import os import os
import subprocess
import sys import sys
import logging import time
from django.conf import settings
from config import BASE_DIR
import psutil import psutil
from django.conf import settings
import time
import subprocess
from config import BASECONF from config import BASECONF
from config import BASE_DIR
try: try:
__version__ = BASECONF.VERSION __version__ = BASECONF.VERSION

@ -1,5 +1,5 @@
from .beat import * from .beat import *
from .celery_default import *
from .flower import * from .flower import *
from .gunicorn import * from .gunicorn import *
from .celery_default import *
from .uwsgi import * from .uwsgi import *

@ -1,9 +1,9 @@
import abc import abc
import shutil
import psutil
import datetime import datetime
import threading
import pwd import pwd
import shutil
import threading
from ..hands import * from ..hands import *

@ -1,7 +1,8 @@
from ..hands import *
from .base import BaseService
from django.core.cache import cache from django.core.cache import cache
from .base import BaseService
from ..hands import *
__all__ = ['BeatService'] __all__ = ['BeatService']

@ -1,5 +1,5 @@
from ..hands import *
from .base import BaseService from .base import BaseService
from ..hands import *
class CeleryBaseService(BaseService): class CeleryBaseService(BaseService):

@ -1,5 +1,5 @@
from ..hands import *
from .base import BaseService from .base import BaseService
from ..hands import *
__all__ = ['FlowerService'] __all__ = ['FlowerService']

@ -1,5 +1,5 @@
from ..hands import *
from .base import BaseService from .base import BaseService
from ..hands import *
__all__ = ['GunicornService'] __all__ = ['GunicornService']

@ -1,5 +1,5 @@
from ..hands import *
from .base import BaseService from .base import BaseService
from ..hands import *
__all__ = ['UwsgiService'] __all__ = ['UwsgiService']

@ -1,7 +1,9 @@
import threading
import signal import signal
import threading
import daemon import daemon
from daemon import pidfile from daemon import pidfile
from .hands import * from .hands import *
from .hands import __version__ from .hands import __version__
from .services.base import BaseService from .services.base import BaseService

@ -1,9 +1,9 @@
# Generated by Django 3.0.3 on 2021-05-27 13:55 # Generated by Django 3.0.3 on 2021-05-27 13:55
from django.conf import settings
import django.contrib.auth.models import django.contrib.auth.models
from django.db import migrations, models
import django.db.models.deletion import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models
price_info_list = [ price_info_list = [
{ {

@ -1,8 +1,8 @@
# Generated by Django 3.2.3 on 2021-09-07 19:18 # Generated by Django 3.2.3 on 2021-09-07 19:18
import django.db.models.deletion
from django.conf import settings from django.conf import settings
from django.db import migrations, models from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration): class Migration(migrations.Migration):

@ -1,8 +1,8 @@
# Generated by Django 3.2.3 on 2021-10-14 14:35 # Generated by Django 3.2.3 on 2021-10-14 14:35
import django.db.models.deletion
from django.conf import settings from django.conf import settings
from django.db import migrations, models from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration): class Migration(migrations.Migration):

@ -1,8 +1,8 @@
# Generated by Django 3.2.3 on 2021-10-30 10:57 # Generated by Django 3.2.3 on 2021-10-30 10:57
import django.db.models.deletion
from django.conf import settings from django.conf import settings
from django.db import migrations, models from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration): class Migration(migrations.Migration):

@ -1,7 +1,7 @@
# Generated by Django 3.2.3 on 2021-10-30 11:52 # Generated by Django 3.2.3 on 2021-10-30 11:52
from django.db import migrations, models
import django.db.models.deletion import django.db.models.deletion
from django.db import migrations, models
class Migration(migrations.Migration): class Migration(migrations.Migration):

@ -1,14 +1,14 @@
from django.db import models from django.contrib.auth.models import AbstractUser
# Create your models here.
from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes.models import ContentType
from django.db import models
from django.contrib.auth.models import AbstractUser
from api.utils.TokenManager import generate_alphanumeric_token_of_length, generate_numeric_token_of_length from api.utils.TokenManager import generate_alphanumeric_token_of_length, generate_numeric_token_of_length
from api.utils.baseutils import make_random_uuid from api.utils.baseutils import make_random_uuid
# Create your models here.
######################################## 用户表 ######################################## ######################################## 用户表 ########################################

@ -7,16 +7,14 @@
from celery import shared_task from celery import shared_task
from django.core.cache import cache from django.core.cache import cache
from api.utils.mp.wechat import sync_wx_access_token
from api.utils.storage.storage import get_local_storage
from api.models import Apps from api.models import Apps
from api.utils.app.supersignutils import IosUtils, resign_by_app_id, get_ios_developer_public_num from api.utils.app.supersignutils import IosUtils, resign_by_app_id
from api.utils.crontab.ctasks import sync_download_times, auto_clean_upload_tmp_file, auto_delete_ios_mobile_tmp_file, \ from api.utils.crontab.ctasks import sync_download_times, auto_clean_upload_tmp_file, auto_delete_ios_mobile_tmp_file, \
auto_check_ios_developer_active auto_check_ios_developer_active
from api.utils.geetest.geetest_utils import check_bypass_status from api.utils.geetest.geetest_utils import check_bypass_status
from api.utils.mp.wechat import sync_wx_access_token
from api.utils.storage.storage import get_local_storage
from api.views.login import get_login_type from api.views.login import get_login_type
from fir_ser.celery import app from fir_ser.celery import app
from fir_ser.settings import LOGIN, CHANGER, REGISTER from fir_ser.settings import LOGIN, CHANGER, REGISTER

@ -15,19 +15,19 @@ Including another URLconf
""" """
from django.urls import re_path from django.urls import re_path
from api.views.advert import UserAdInfoView
from api.views.apps import AppsView, AppInfoView, AppReleaseInfoView
from api.views.domain import DomainCnameView, DomainInfoView
from api.views.download import ShortDownloadView
from api.views.login import LoginView, UserInfoView, RegistView, AuthorizationView, ChangeAuthorizationView, \ from api.views.login import LoginView, UserInfoView, RegistView, AuthorizationView, ChangeAuthorizationView, \
UserApiTokenView, CertificationView, ChangeInfoView, WeChatLoginView, WeChatLoginCheckView UserApiTokenView, CertificationView, ChangeInfoView, WeChatLoginView, WeChatLoginCheckView
from api.views.logout import LogoutView from api.views.logout import LogoutView
from api.views.apps import AppsView, AppInfoView, AppReleaseInfoView
from api.views.download import ShortDownloadView
from api.views.uploads import AppAnalyseView, UploadView
from api.views.storage import StorageView
from api.views.receiveudids import IosUDIDView, TaskView
from api.views.order import PriceView, OrderView, PaySuccess from api.views.order import PriceView, OrderView, PaySuccess
from api.views.receiveudids import IosUDIDView, TaskView
from api.views.storage import StorageView
from api.views.supersign import DeveloperView, SuperSignUsedView, AppUDIDUsedView, SuperSignCertView from api.views.supersign import DeveloperView, SuperSignUsedView, AppUDIDUsedView, SuperSignCertView
from api.views.domain import DomainCnameView, DomainInfoView
from api.views.thirdlogin import ValidWxChatToken, ThirdWxAccount from api.views.thirdlogin import ValidWxChatToken, ThirdWxAccount
from api.views.advert import UserAdInfoView from api.views.uploads import AppAnalyseView, UploadView
# router=DefaultRouter() # router=DefaultRouter()
# router.register("apps", AppsView) # router.register("apps", AppsView)

@ -3,13 +3,15 @@
# project: 3月 # project: 3月
# author: liuyu # author: liuyu
# date: 2020/3/8 # date: 2020/3/8
import uuid import logging
import string
import random import random
import string
import time import time
import uuid
from django.core.cache import cache from django.core.cache import cache
from fir_ser.settings import CACHE_KEY_TEMPLATE from fir_ser.settings import CACHE_KEY_TEMPLATE
import logging
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)

@ -3,13 +3,14 @@
# project: 3月 # project: 3月
# author: liuyu # author: liuyu
# date: 2020/3/6 # date: 2020/3/6
from api.models import AppReleaseInfo, Apps import logging
import random import random
from api.models import AppReleaseInfo, Apps
from api.utils.baseutils import make_app_uuid from api.utils.baseutils import make_app_uuid
from api.utils.modelutils import get_user_domain_name from api.utils.modelutils import get_user_domain_name
from api.utils.storage.storage import Storage
from api.utils.storage.caches import del_cache_response_by_short from api.utils.storage.caches import del_cache_response_by_short
import logging from api.utils.storage.storage import Storage
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)

@ -4,12 +4,16 @@
# author: NinEveN # author: NinEveN
# date: 2019/12/19 # date: 2019/12/19
import requests import io
import zipfile, re, os, random, io import os
from androguard.core.bytecodes import apk
import plistlib import plistlib
import re
import zipfile
import qrcode import qrcode
import requests
from PIL import Image from PIL import Image
from androguard.core.bytecodes import apk
def bytes2human(n): def bytes2human(n):

@ -3,19 +3,20 @@
# project: 4月 # project: 4月
# author: liuyu # author: liuyu
# date: 2020/4/24 # date: 2020/4/24
import base64
import datetime import datetime
import logging
from api.utils.app.shellcmds import shell_command, use_user_pass
from api.utils.baseutils import get_format_time, format_apple_date, make_app_uuid
from fir_ser.settings import SUPER_SIGN_ROOT
import os import os
import re import re
import logging
from api.utils.apple.appleapiv3 import AppStoreConnectApi
import base64
from OpenSSL.crypto import (load_pkcs12, dump_certificate_request, dump_privatekey, PKey, TYPE_RSA, X509Req, from OpenSSL.crypto import (load_pkcs12, dump_certificate_request, dump_privatekey, PKey, TYPE_RSA, X509Req,
dump_certificate, load_privatekey, load_certificate, PKCS12, FILETYPE_PEM, FILETYPE_ASN1) dump_certificate, load_privatekey, load_certificate, PKCS12, FILETYPE_PEM, FILETYPE_ASN1)
from api.utils.app.shellcmds import shell_command, use_user_pass
from api.utils.apple.appleapiv3 import AppStoreConnectApi
from api.utils.baseutils import get_format_time, format_apple_date, make_app_uuid
from fir_ser.settings import SUPER_SIGN_ROOT
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)

@ -13,9 +13,10 @@ Python生成二维码 v1.0
''' '''
import os
import qrcode import qrcode
from PIL import Image from PIL import Image
import os
# 生成二维码图片 # 生成二维码图片

@ -3,11 +3,15 @@
# project: 3月 # project: 3月
# author: liuyu # author: liuyu
# date: 2020/3/6 # date: 2020/3/6
import time, re, os, signal import json
from subprocess import Popen, PIPE
import logging import logging
import paramiko, json import os
import signal
import socket import socket
import time
from subprocess import Popen, PIPE
import paramiko
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)

@ -8,9 +8,9 @@ import logging
import os import os
import time import time
import uuid import uuid
import xmltodict
import zipfile import zipfile
import xmltodict
from django.core.cache import cache from django.core.cache import cache
from django.db.models import Sum from django.db.models import Sum

@ -6,13 +6,14 @@
# pip install pyjwt # pip install pyjwt
import base64 import base64
import os
import datetime import datetime
import requests
import jwt
import logging import logging
import os
from collections import namedtuple from collections import namedtuple
import jwt
import requests
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)

@ -3,14 +3,16 @@
# project: 9月 # project: 9月
# author: NinEveN # author: NinEveN
# date: 2020/9/24 # date: 2020/9/24
import base64
from django.core.cache import cache from django.core.cache import cache
from django.http.cookie import parse_cookie
from rest_framework.authentication import BaseAuthentication from rest_framework.authentication import BaseAuthentication
from rest_framework.exceptions import AuthenticationFailed from rest_framework.exceptions import AuthenticationFailed
from api.models import UserInfo
from rest_framework.permissions import BasePermission from rest_framework.permissions import BasePermission
from api.models import UserInfo
from fir_ser.settings import CACHE_KEY_TEMPLATE from fir_ser.settings import CACHE_KEY_TEMPLATE
from django.http.cookie import parse_cookie
import base64
def get_cookie_token(request): def get_cookie_token(request):

@ -4,17 +4,19 @@
# author: NinEveN # author: NinEveN
# date: 2021/4/16 # date: 2021/4/16
import os, re, time
import datetime import datetime
from django.utils import timezone import logging
import os
import re
import time
import uuid
from fir_ser.settings import SUPER_SIGN_ROOT, SERVER_DOMAIN
from django.core.validators import validate_email
from django.core.exceptions import ValidationError from django.core.exceptions import ValidationError
import logging from django.core.validators import validate_email
from django.utils import timezone
from dns.resolver import Resolver from dns.resolver import Resolver
import uuid
from fir_ser.settings import SUPER_SIGN_ROOT, SERVER_DOMAIN
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)

@ -4,14 +4,17 @@
# author: liuyu # author: liuyu
# date: 2020/4/7 # date: 2020/4/7
import logging
import os
import time
from django.core.cache import cache
from api.models import Apps, UserInfo, AppIOSDeveloperInfo from api.models import Apps, UserInfo, AppIOSDeveloperInfo
from api.utils.storage.storage import Storage
from api.utils.app.supersignutils import IosUtils from api.utils.app.supersignutils import IosUtils
from api.utils.storage.storage import Storage
from api.utils.utils import send_ios_developer_active_status from api.utils.utils import send_ios_developer_active_status
from django.core.cache import cache
from fir_ser.settings import CACHE_KEY_TEMPLATE, SYNC_CACHE_TO_DATABASE, SUPER_SIGN_ROOT, MSGTEMPLATE from fir_ser.settings import CACHE_KEY_TEMPLATE, SYNC_CACHE_TO_DATABASE, SUPER_SIGN_ROOT, MSGTEMPLATE
import time, os
import logging
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)

@ -1,8 +1,9 @@
import random import hashlib
import hmac
import json import json
import random
import requests import requests
import hmac
import hashlib
from .geetest_lib_result import GeetestLibResult from .geetest_lib_result import GeetestLibResult

@ -4,13 +4,15 @@
# author: NinEveN # author: NinEveN
# date: 2021/3/25 # date: 2021/3/25
import requests
import json import json
import logging import logging
import requests
from django.core.cache import cache as redis_connect from django.core.cache import cache as redis_connect
from api.utils.geetest.geetest_lib import GeetestLib
from fir_ser.settings import GEETEST_ID, GEETEST_KEY, GEETEST_BYPASS_URL, \ from fir_ser.settings import GEETEST_ID, GEETEST_KEY, GEETEST_BYPASS_URL, \
GEETEST_BYPASS_STATUS_KEY GEETEST_BYPASS_STATUS_KEY
from api.utils.geetest.geetest_lib import GeetestLib
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)

@ -1,6 +1,7 @@
from django.utils.deprecation import MiddlewareMixin
import logging import logging
from django.utils.deprecation import MiddlewareMixin
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)

@ -5,12 +5,13 @@
# date: 2021/4/16 # date: 2021/4/16
from django.db.models import Count
import random
from api.models import AppReleaseInfo, UserDomainInfo, DomainCnameInfo, UserAdDisplayInfo, RemoteClientInfo
import logging import logging
import random
from urllib.parse import urljoin from urllib.parse import urljoin
from django.db.models import Count
from api.models import AppReleaseInfo, UserDomainInfo, DomainCnameInfo, UserAdDisplayInfo, RemoteClientInfo
from api.utils.baseutils import get_server_domain_from_request, get_user_default_domain_name, get_real_ip_address, \ from api.utils.baseutils import get_server_domain_from_request, get_user_default_domain_name, get_real_ip_address, \
get_origin_domain_name get_origin_domain_name

@ -5,15 +5,17 @@
# date: 2021/9/6 # date: 2021/9/6
import base64 import base64
import hashlib
import logging import logging
import string
import random import random
import socket
import string
import struct import struct
import hashlib
from Crypto.Cipher import AES
import xml.etree.cElementTree as ET
import time import time
import socket import xml.etree.cElementTree as ET
from Crypto.Cipher import AES
from . import ierror from . import ierror
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)

@ -3,16 +3,16 @@
# project: 9月 # project: 9月
# author: NinEveN # author: NinEveN
# date: 2021/9/6 # date: 2021/9/6
from hashlib import sha1
import requests
import logging
import json import json
import logging
from hashlib import sha1
import requests
from django.core.cache import cache from django.core.cache import cache
from api.utils.baseutils import get_format_time from api.utils.baseutils import get_format_time
from fir_ser.settings import THIRDLOGINCONF, CACHE_KEY_TEMPLATE
from api.utils.mp.utils import WxMsgCryptBase from api.utils.mp.utils import WxMsgCryptBase
from fir_ser.settings import THIRDLOGINCONF, CACHE_KEY_TEMPLATE
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
wx_login_info = THIRDLOGINCONF.wx_official wx_login_info = THIRDLOGINCONF.wx_official

@ -6,12 +6,12 @@
# pip install alipay-sdk-python==3.3.398 # pip install alipay-sdk-python==3.3.398
from api.utils.pay.alipay import AliPay
from api.utils.pay.alipay.utils import AliPayConfig
from datetime import datetime, timedelta
from api.utils.storage.caches import update_order_info, update_order_status
import json import json
import logging import logging
from datetime import datetime, timedelta
from api.utils.pay.alipay import AliPay, AliPayConfig
from api.utils.storage.caches import update_order_info, update_order_status
logger = logging.getLogger('pay') logger = logging.getLogger('pay')

@ -5,19 +5,20 @@
~~~~~~~~~~ ~~~~~~~~~~
""" """
import hashlib
import json import json
from base64 import decodebytes, encodebytes
from datetime import datetime from datetime import datetime
from functools import partial from functools import partial
from urllib.parse import quote_plus
from urllib.request import urlopen
import hashlib
import OpenSSL import OpenSSL
from Crypto.Hash import SHA, SHA256 from Crypto.Hash import SHA, SHA256
from Crypto.PublicKey import RSA from Crypto.PublicKey import RSA
from Crypto.Signature import PKCS1_v1_5 from Crypto.Signature import PKCS1_v1_5
from .compat import decodebytes, encodebytes, quote_plus, urlopen
from .exceptions import AliPayException, AliPayValidationError from .exceptions import AliPayException, AliPayValidationError
from .utils import AliPayConfig
from .loggers import logger from .loggers import logger
# 常见加密算法 # 常见加密算法
@ -32,6 +33,11 @@ CryptoAlgSet = (
) )
class AliPayConfig:
def __init__(self, timeout=15):
self.timeout = timeout
class BaseAliPay: class BaseAliPay:
@property @property
def appid(self): def appid(self):

@ -1,10 +0,0 @@
#!/usr/bin/env python
# coding: utf-8
"""
compat.py
~~~~~~~~~~
"""
from urllib.parse import quote_plus
from urllib.request import urlopen
from base64 import decodebytes, encodebytes

@ -1,4 +1,3 @@
import logging
import logging.config import logging.config
logging.config.dictConfig({ logging.config.dictConfig({

@ -1,10 +0,0 @@
"""
alipay/utils.py
~~~~~~~~~~
"""
class AliPayConfig:
def __init__(self, timeout=15):
self.timeout = timeout

@ -4,9 +4,9 @@
# author: NinEveN # author: NinEveN
# date: 2021/4/18 # date: 2021/4/18
from fir_ser.settings import PAY_CONFIG_KEY_INFO
from api.utils.pay.ali import Alipay from api.utils.pay.ali import Alipay
from api.utils.pay.wx import Weixinpay from api.utils.pay.wx import Weixinpay
from fir_ser.settings import PAY_CONFIG_KEY_INFO
def get_pay_obj_form_name(pay_name): def get_pay_obj_form_name(pay_name):

@ -4,11 +4,12 @@
# author: NinEveN # author: NinEveN
# date: 2021/3/18 # date: 2021/3/18
from api.utils.pay.wxpay import WeChatPay, WeChatPayType
from datetime import datetime, timedelta
from api.utils.storage.caches import update_order_info, update_order_status
import json import json
import logging import logging
from datetime import datetime, timedelta
from api.utils.pay.wxpay import WeChatPay, WeChatPayType
from api.utils.storage.caches import update_order_info, update_order_status
logger = logging.getLogger('pay') logger = logging.getLogger('pay')

@ -1,16 +1,12 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
import json import json
from enum import Enum
import requests
# -*- coding: utf-8 -*-
import time import time
import uuid import uuid
from base64 import b64decode, b64encode from base64 import b64decode, b64encode
import json from enum import Enum
import requests
from OpenSSL import crypto
from cryptography.exceptions import InvalidSignature from cryptography.exceptions import InvalidSignature
from cryptography.hazmat.backends import default_backend from cryptography.hazmat.backends import default_backend
from cryptography.hazmat.primitives.asymmetric.padding import PKCS1v15 from cryptography.hazmat.primitives.asymmetric.padding import PKCS1v15
@ -18,7 +14,6 @@ from cryptography.hazmat.primitives.ciphers.aead import AESGCM
from cryptography.hazmat.primitives.hashes import SHA256 from cryptography.hazmat.primitives.hashes import SHA256
from cryptography.hazmat.primitives.serialization import (load_pem_private_key, from cryptography.hazmat.primitives.serialization import (load_pem_private_key,
load_pem_public_key) load_pem_public_key)
from OpenSSL import crypto
def build_authorization(path, def build_authorization(path,

@ -5,9 +5,10 @@
# date: 2020/3/22 # date: 2020/3/22
import json
from aliyunsdkcore.client import AcsClient from aliyunsdkcore.client import AcsClient
from aliyunsdkcore.request import CommonRequest from aliyunsdkcore.request import CommonRequest
import json
class AliMsgSender(object): class AliMsgSender(object):

@ -4,9 +4,10 @@
# author: liuyu # author: liuyu
# date: 2020/3/22 # date: 2020/3/22
import requests
import json import json
import requests
class JiGuangMsgSender(object): class JiGuangMsgSender(object):
BASE_URL = 'https://api.sms.jpush.cn/v1/' BASE_URL = 'https://api.sms.jpush.cn/v1/'

@ -4,11 +4,12 @@
# author: liuyu # author: liuyu
# date: 2020/3/23 # date: 2020/3/23
import logging
from fir_ser.settings import THIRD_PART_CONFIG_KEY_INFO
from .aliyunApi import AliMsgSender from .aliyunApi import AliMsgSender
from .emailApi import EmailMsgSender from .emailApi import EmailMsgSender
from .jiguangApi import JiGuangMsgSender from .jiguangApi import JiGuangMsgSender
from fir_ser.settings import THIRD_PART_CONFIG_KEY_INFO
import logging
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)

@ -1,12 +1,15 @@
import logging
import os
from rest_framework import serializers from rest_framework import serializers
from api import models from api import models
from api.utils.TokenManager import make_token from api.utils.TokenManager import make_token
from api.utils.app.apputils import bytes2human from api.utils.app.apputils import bytes2human
from api.utils.modelutils import get_user_domain_name, get_app_domain_name, get_redirect_server_domain from api.utils.modelutils import get_user_domain_name, get_app_domain_name, get_redirect_server_domain
from api.utils.storage.caches import get_user_free_download_times, get_user_cert_auth_status
from api.utils.storage.storage import Storage from api.utils.storage.storage import Storage
from api.utils.utils import get_developer_udided, get_choices_dict, get_choices_name_from_key from api.utils.utils import get_developer_udided, get_choices_dict, get_choices_name_from_key
from api.utils.storage.caches import get_user_free_download_times, get_user_cert_auth_status
import os, logging
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)

@ -6,15 +6,16 @@
# pip install aliyun-python-sdk-sts oss2 # pip install aliyun-python-sdk-sts oss2
import hashlib
import json import json
import logging
import os import os
from aliyunsdkcore import client
from aliyunsdksts.request.v20150401 import AssumeRoleRequest
import oss2
import re import re
import hashlib
import time import time
import logging
import oss2
from aliyunsdkcore import client
from aliyunsdksts.request.v20150401 import AssumeRoleRequest
from oss2 import SizedFileAdapter, determine_part_size from oss2 import SizedFileAdapter, determine_part_size
from oss2.models import PartInfo from oss2.models import PartInfo

@ -4,19 +4,21 @@
# author: liuyu # author: liuyu
# date: 2020/4/7 # date: 2020/4/7
import logging
import os
import time
from django.core.cache import cache from django.core.cache import cache
from api.models import Apps, UserInfo, AppReleaseInfo, AppUDID, APPToDeveloper, APPSuperSignUsedInfo, \ from django.db.models import F
UserCertificationInfo, Order
import time, os
from django.utils import timezone from django.utils import timezone
from api.models import Apps, UserInfo, AppReleaseInfo, AppUDID, APPToDeveloper, APPSuperSignUsedInfo, \
UserCertificationInfo, Order
from api.utils.baseutils import check_app_password
from api.utils.modelutils import get_app_d_count_by_app_id, get_app_domain_name, get_user_domain_name
from api.utils.storage.storage import Storage, LocalStorage
from fir_ser.settings import CACHE_KEY_TEMPLATE, SERVER_DOMAIN, SYNC_CACHE_TO_DATABASE, DEFAULT_MOBILEPROVISION, \ from fir_ser.settings import CACHE_KEY_TEMPLATE, SERVER_DOMAIN, SYNC_CACHE_TO_DATABASE, DEFAULT_MOBILEPROVISION, \
USER_FREE_DOWNLOAD_TIMES, AUTH_USER_FREE_DOWNLOAD_TIMES USER_FREE_DOWNLOAD_TIMES, AUTH_USER_FREE_DOWNLOAD_TIMES
from api.utils.storage.storage import Storage, LocalStorage
from api.utils.modelutils import get_app_d_count_by_app_id, get_app_domain_name, get_user_domain_name
from api.utils.baseutils import check_app_password
import logging
from django.db.models import F
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)

@ -6,11 +6,12 @@
""" """
本地存储api 本地存储api
""" """
import logging
import os
from api.utils.TokenManager import make_token from api.utils.TokenManager import make_token
from api.utils.storage.aliyunApi import AliYunCdn from api.utils.storage.aliyunApi import AliYunCdn
from fir_ser import settings from fir_ser import settings
import os
import logging
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)

@ -6,10 +6,12 @@
""" """
主要是调用七牛云存储处理七牛云存储的逻辑 主要是调用七牛云存储处理七牛云存储的逻辑
""" """
import logging
import os
import requests
from qiniu import Auth, put_file, etag from qiniu import Auth, put_file, etag
from qiniu import BucketManager from qiniu import BucketManager
import os, requests
import logging
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)

@ -4,15 +4,19 @@
# author: liuyu # author: liuyu
# date: 2020/3/23 # date: 2020/3/23
import base64
import json
import logging
import time
from django.core.cache import cache
from api.models import UserInfo from api.models import UserInfo
from .aliyunApi import AliYunOss, AliYunCdn
from .qiniuApi import QiNiuOss
from .localApi import LocalStorage
import json, time, base64
from api.utils.baseutils import get_dict_from_filter_fields from api.utils.baseutils import get_dict_from_filter_fields
from fir_ser.settings import THIRD_PART_CONFIG_KEY_INFO, CACHE_KEY_TEMPLATE from fir_ser.settings import THIRD_PART_CONFIG_KEY_INFO, CACHE_KEY_TEMPLATE
from django.core.cache import cache from .aliyunApi import AliYunOss, AliYunCdn
import logging from .localApi import LocalStorage
from .qiniuApi import QiNiuOss
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)

@ -4,9 +4,10 @@
# author: NinEveN # author: NinEveN
# date: 2020/9/24 # date: 2020/9/24
from django.core.cache import cache
import base64 import base64
from django.core.cache import cache
class TmpCache(object): class TmpCache(object):

@ -4,9 +4,10 @@
# author: NinEveN # author: NinEveN
# date: 2021/3/25 # date: 2021/3/25
from rest_framework.throttling import SimpleRateThrottle
import hashlib import hashlib
from rest_framework.throttling import SimpleRateThrottle
class VisitShortThrottle(SimpleRateThrottle): class VisitShortThrottle(SimpleRateThrottle):
"""短连接用户访问频率限制1""" """短连接用户访问频率限制1"""

@ -3,24 +3,27 @@
# project: 5月 # project: 5月
# author: liuyu # author: liuyu
# date: 2020/5/7 # date: 2020/5/7
import os, datetime, random
import binascii import binascii
import datetime
import logging
import os
import random
from captcha.helpers import captcha_image_url
from captcha.models import CaptchaStore
from django.core.cache import cache
from api.utils.modelutils import get_app_d_count_by_app_id
from fir_ser.settings import SERVER_DOMAIN, CAPTCHA_LENGTH, MEDIA_ROOT, CACHE_KEY_TEMPLATE
from api.models import APPSuperSignUsedInfo, APPToDeveloper, \ from api.models import APPSuperSignUsedInfo, APPToDeveloper, \
UDIDsyncDeveloper, UserInfo, AppReleaseInfo, AppScreenShot, Token, DeveloperDevicesID, UserAdDisplayInfo UDIDsyncDeveloper, UserInfo, AppReleaseInfo, AppScreenShot, Token, DeveloperDevicesID, UserAdDisplayInfo
from api.utils.storage.localApi import LocalStorage
from api.utils.storage.storage import Storage
from api.utils.tempcaches import TmpCache
from api.utils.TokenManager import generate_numeric_token_of_length, generate_alphanumeric_token_of_length, make_token, \ from api.utils.TokenManager import generate_numeric_token_of_length, generate_alphanumeric_token_of_length, make_token, \
verify_token verify_token
from api.utils.modelutils import get_app_d_count_by_app_id
from api.utils.sendmsg.sendmsg import SendMessage from api.utils.sendmsg.sendmsg import SendMessage
from captcha.models import CaptchaStore
from captcha.helpers import captcha_image_url
from api.utils.storage.caches import consume_user_download_times from api.utils.storage.caches import consume_user_download_times
from django.core.cache import cache from api.utils.storage.localApi import LocalStorage
import logging from api.utils.storage.storage import Storage
from api.utils.tempcaches import TmpCache
from fir_ser.settings import SERVER_DOMAIN, CAPTCHA_LENGTH, MEDIA_ROOT, CACHE_KEY_TEMPLATE
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)

@ -3,16 +3,16 @@
# project: 10月 # project: 10月
# author: liuyu # author: liuyu
# date: 2021/10/14 # date: 2021/10/14
from rest_framework.views import APIView import logging
from api.utils.response import BaseResponse from rest_framework.pagination import PageNumberPagination
from api.utils.auth import ExpiringTokenAuthentication, UserAdInfoPermission
from rest_framework.response import Response from rest_framework.response import Response
from rest_framework.views import APIView
from api.models import UserAdDisplayInfo from api.models import UserAdDisplayInfo
from api.utils.auth import ExpiringTokenAuthentication, UserAdInfoPermission
from api.utils.response import BaseResponse
from api.utils.serializer import UserAdInfoSerializer from api.utils.serializer import UserAdInfoSerializer
from rest_framework.pagination import PageNumberPagination
import logging
from api.utils.storage.caches import reset_short_response_cache from api.utils.storage.caches import reset_short_response_cache
from api.utils.storage.storage import Storage from api.utils.storage.storage import Storage

@ -4,23 +4,24 @@
# author: liuyu # author: liuyu
# date: 2020/3/4 # date: 2020/3/4
import logging
from django.db.models import Sum
from rest_framework.pagination import PageNumberPagination
from rest_framework.response import Response
from rest_framework.views import APIView from rest_framework.views import APIView
from api.base_views import app_delete
from api.models import Apps, AppReleaseInfo, APPToDeveloper, AppIOSDeveloperInfo, UserInfo, AppScreenShot
from api.tasks import run_resign_task from api.tasks import run_resign_task
from api.utils.response import BaseResponse
from api.utils.auth import ExpiringTokenAuthentication
from rest_framework.response import Response
from django.db.models import Sum
from api.utils.app.supersignutils import IosUtils, get_ios_developer_public_num from api.utils.app.supersignutils import IosUtils, get_ios_developer_public_num
from api.utils.storage.storage import Storage from api.utils.auth import ExpiringTokenAuthentication
from api.utils.storage.caches import del_cache_response_by_short, get_app_today_download_times, del_cache_by_delete_app from api.utils.modelutils import get_user_domain_name, get_app_domain_name
from api.models import Apps, AppReleaseInfo, APPToDeveloper, AppIOSDeveloperInfo, UserInfo, AppScreenShot from api.utils.response import BaseResponse
from api.utils.serializer import AppsSerializer, AppReleaseSerializer, AppsListSerializer from api.utils.serializer import AppsSerializer, AppReleaseSerializer, AppsListSerializer
from rest_framework.pagination import PageNumberPagination from api.utils.storage.caches import del_cache_response_by_short, get_app_today_download_times, del_cache_by_delete_app
import logging from api.utils.storage.storage import Storage
from api.utils.utils import delete_local_files, delete_app_screenshots_files from api.utils.utils import delete_local_files, delete_app_screenshots_files
from api.utils.modelutils import get_user_domain_name, get_app_domain_name
from api.base_views import app_delete
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)

@ -3,17 +3,17 @@
# project: 3月 # project: 3月
# author: NinEveN # author: NinEveN
# date: 2021/3/29 # date: 2021/3/29
import logging
from rest_framework.pagination import PageNumberPagination from rest_framework.pagination import PageNumberPagination
from rest_framework.response import Response
from rest_framework.views import APIView from rest_framework.views import APIView
from api.models import UserDomainInfo, Apps
from api.utils.auth import ExpiringTokenAuthentication, DownloadQrPermission
from api.utils.baseutils import is_valid_domain, get_cname_from_domain from api.utils.baseutils import is_valid_domain, get_cname_from_domain
from api.utils.modelutils import get_user_domain_name, get_min_default_domain_cname_obj from api.utils.modelutils import get_user_domain_name, get_min_default_domain_cname_obj
from api.utils.response import BaseResponse from api.utils.response import BaseResponse
from api.utils.auth import ExpiringTokenAuthentication, DownloadQrPermission
from rest_framework.response import Response
from api.models import UserDomainInfo, Apps
import logging
from api.utils.serializer import DomainNameSerializer from api.utils.serializer import DomainNameSerializer
from api.utils.storage.caches import del_cache_response_by_short, reset_app_wx_easy_type from api.utils.storage.caches import del_cache_response_by_short, reset_app_wx_easy_type
from api.utils.utils import get_choices_dict from api.utils.utils import get_choices_dict

@ -4,28 +4,29 @@
# author: liuyu # author: liuyu
# date: 2020/3/6 # date: 2020/3/6
import logging
import os
from django.http import FileResponse
from rest_framework.response import Response
from rest_framework.views import APIView from rest_framework.views import APIView
from api.models import Apps, AppReleaseInfo, APPToDeveloper, APPSuperSignUsedInfo
from api.utils.TokenManager import verify_token from api.utils.TokenManager import verify_token
from api.utils.response import BaseResponse
from rest_framework.response import Response
from fir_ser import settings
from api.utils.app.apputils import make_resigned from api.utils.app.apputils import make_resigned
from api.utils.app.supersignutils import make_sign_udid_mobile_config from api.utils.app.supersignutils import make_sign_udid_mobile_config
from api.utils.storage.storage import Storage, get_local_storage
from api.utils.storage.caches import get_app_instance_by_cache, get_download_url_by_cache, set_app_download_by_cache, \
del_cache_response_by_short, consume_user_download_times, check_app_permission
import os
from api.utils.decorators import cache_response # 本来使用的是 drf-extensions==0.7.0 但是还未支持该版本Django
from api.utils.serializer import AppsShortSerializer, AppAdInfoSerializer
from api.models import Apps, AppReleaseInfo, APPToDeveloper, APPSuperSignUsedInfo
from django.http import FileResponse
import logging
from api.utils.baseutils import get_profile_full_path, make_random_uuid, get_real_ip_address, get_origin_domain_name, \ from api.utils.baseutils import get_profile_full_path, make_random_uuid, get_real_ip_address, get_origin_domain_name, \
format_get_uri, get_post_udid_url format_get_uri, get_post_udid_url
from api.utils.throttle import VisitShortThrottle, InstallShortThrottle, InstallThrottle1, InstallThrottle2 from api.utils.decorators import cache_response # 本来使用的是 drf-extensions==0.7.0 但是还未支持该版本Django
from api.utils.modelutils import get_app_domain_name, get_filename_form_file, check_app_domain_name_access, \ from api.utils.modelutils import get_app_domain_name, get_filename_form_file, check_app_domain_name_access, \
ad_random_weight, get_redirect_server_domain ad_random_weight, get_redirect_server_domain
from api.utils.response import BaseResponse
from api.utils.serializer import AppsShortSerializer, AppAdInfoSerializer
from api.utils.storage.caches import get_app_instance_by_cache, get_download_url_by_cache, set_app_download_by_cache, \
del_cache_response_by_short, consume_user_download_times, check_app_permission
from api.utils.storage.storage import Storage, get_local_storage
from api.utils.throttle import VisitShortThrottle, InstallShortThrottle, InstallThrottle1, InstallThrottle2
from fir_ser import settings
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)

@ -1,24 +1,24 @@
from django.contrib import auth import logging
from api.models import Token, UserInfo, UserCertificationInfo, CertificationInfo from django.contrib import auth
from django.core.cache import cache
from rest_framework.response import Response from rest_framework.response import Response
from rest_framework.views import APIView
from api.models import Token, UserInfo, UserCertificationInfo, CertificationInfo
from api.utils.auth import ExpiringTokenAuthentication
from api.utils.baseutils import is_valid_phone, is_valid_email, get_real_ip_address
from api.utils.geetest.geetest_utils import first_register, second_validate
from api.utils.modelutils import get_min_default_domain_cname_obj
from api.utils.mp.wechat import make_wx_login_qrcode, show_qrcode_url from api.utils.mp.wechat import make_wx_login_qrcode, show_qrcode_url
from api.utils.response import BaseResponse
from api.utils.serializer import UserInfoSerializer, CertificationSerializer, UserCertificationSerializer from api.utils.serializer import UserInfoSerializer, CertificationSerializer, UserCertificationSerializer
from django.core.cache import cache from api.utils.storage.caches import login_auth_failed, set_wx_ticket_login_info_cache, get_wx_ticket_login_info_cache
from rest_framework.views import APIView from api.utils.throttle import VisitRegister1Throttle, VisitRegister2Throttle, GetAuthC1Throttle, GetAuthC2Throttle
from api.utils.utils import get_captcha, valid_captcha, \ from api.utils.utils import get_captcha, valid_captcha, \
get_sender_sms_token, is_valid_sender_code, get_sender_email_token, get_random_username, \ get_sender_sms_token, is_valid_sender_code, get_sender_email_token, get_random_username, \
check_username_exists, set_user_token check_username_exists, set_user_token
from api.utils.baseutils import is_valid_phone, is_valid_email, get_real_ip_address
from api.utils.modelutils import get_min_default_domain_cname_obj
from api.utils.auth import ExpiringTokenAuthentication
from api.utils.response import BaseResponse
from fir_ser.settings import REGISTER, LOGIN, CHANGER from fir_ser.settings import REGISTER, LOGIN, CHANGER
from api.utils.storage.caches import login_auth_failed, set_wx_ticket_login_info_cache, get_wx_ticket_login_info_cache
import logging
from api.utils.geetest.geetest_utils import first_register, second_validate
from api.utils.throttle import VisitRegister1Throttle, VisitRegister2Throttle, GetAuthC1Throttle, GetAuthC2Throttle
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)

@ -1,10 +1,12 @@
from rest_framework.views import APIView import logging
from api.utils.auth import ExpiringTokenAuthentication
from api.models import Token from django.contrib import auth
from django.core.cache import cache from django.core.cache import cache
from rest_framework.response import Response from rest_framework.response import Response
from django.contrib import auth from rest_framework.views import APIView
import logging
from api.models import Token
from api.utils.auth import ExpiringTokenAuthentication
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)

@ -4,17 +4,19 @@
# author: NinEveN # author: NinEveN
# date: 2021/3/29 # date: 2021/3/29
from rest_framework.views import APIView import logging
from api.utils.response import BaseResponse
from api.utils.auth import ExpiringTokenAuthentication from rest_framework.pagination import PageNumberPagination
from rest_framework.response import Response from rest_framework.response import Response
from rest_framework.views import APIView
from api.models import Price, Order from api.models import Price, Order
from api.utils.auth import ExpiringTokenAuthentication
from api.utils.pay.util import get_pay_obj_form_name, get_enable_pay_choices, get_payment_type
from api.utils.response import BaseResponse
from api.utils.serializer import PriceSerializer, OrdersSerializer from api.utils.serializer import PriceSerializer, OrdersSerializer
from rest_framework.pagination import PageNumberPagination
from api.utils.utils import get_order_num, get_choices_dict
from api.utils.storage.caches import update_order_status from api.utils.storage.caches import update_order_status
import logging from api.utils.utils import get_order_num, get_choices_dict
from api.utils.pay.util import get_pay_obj_form_name, get_enable_pay_choices, get_payment_type
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)

@ -3,23 +3,23 @@
# project: 3月 # project: 3月
# author: liuyu # author: liuyu
# date: 2020/3/6 # date: 2020/3/6
from api.utils.app.supersignutils import udid_bytes_to_dict, make_sign_udid_mobile_config, IosUtils import logging
from api.models import Apps from celery.exceptions import TimeoutError
from django.views import View
from django.http import HttpResponsePermanentRedirect, FileResponse, HttpResponse from django.http import HttpResponsePermanentRedirect, FileResponse, HttpResponse
from django.views import View
from rest_framework.response import Response from rest_framework.response import Response
from rest_framework.views import APIView
from api.models import Apps
from api.tasks import run_sign_task from api.tasks import run_sign_task
from api.utils.app.supersignutils import udid_bytes_to_dict, make_sign_udid_mobile_config
from api.utils.baseutils import get_real_ip_address, get_http_server_domain, make_random_uuid
from api.utils.modelutils import get_app_domain_name, get_redirect_server_domain
from api.utils.response import BaseResponse from api.utils.response import BaseResponse
from api.utils.storage.caches import check_app_permission from api.utils.storage.caches import check_app_permission
from api.utils.throttle import ReceiveUdidThrottle1, ReceiveUdidThrottle2 from api.utils.throttle import ReceiveUdidThrottle1, ReceiveUdidThrottle2
from fir_ser.celery import app from fir_ser.celery import app
import logging
from rest_framework.views import APIView
from api.utils.baseutils import get_real_ip_address, get_http_server_domain, make_random_uuid
from api.utils.modelutils import get_app_domain_name, get_redirect_server_domain
from celery.exceptions import TimeoutError
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)

@ -4,17 +4,18 @@
# author: liuyu # author: liuyu
# date: 2020/3/4 # date: 2020/3/4
import logging
from rest_framework.response import Response
from rest_framework.views import APIView from rest_framework.views import APIView
from api.base_views import storage_change from api.base_views import storage_change
from api.utils.response import BaseResponse
from api.utils.auth import ExpiringTokenAuthentication, StoragePermission
from rest_framework.response import Response
from api.models import AppStorage, UserInfo from api.models import AppStorage, UserInfo
from api.utils.auth import ExpiringTokenAuthentication, StoragePermission
from api.utils.response import BaseResponse
from api.utils.serializer import StorageSerializer
from api.utils.storage.caches import MigrateStorageState from api.utils.storage.caches import MigrateStorageState
from api.utils.utils import upload_oss_default_head_img, get_choices_dict from api.utils.utils import upload_oss_default_head_img, get_choices_dict
from api.utils.serializer import StorageSerializer
import logging
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)

@ -3,18 +3,19 @@
# project: 3月 # project: 3月
# author: liuyu # author: liuyu
# date: 2020/3/4 # date: 2020/3/4
import logging
from django.http.response import FileResponse from django.http.response import FileResponse
from rest_framework.pagination import PageNumberPagination
from rest_framework.response import Response
from rest_framework.views import APIView from rest_framework.views import APIView
from api.utils.response import BaseResponse
from api.utils.auth import ExpiringTokenAuthentication, SuperSignPermission
from rest_framework.response import Response
from api.models import AppIOSDeveloperInfo, APPSuperSignUsedInfo, AppUDID from api.models import AppIOSDeveloperInfo, APPSuperSignUsedInfo, AppUDID
from api.utils.serializer import DeveloperSerializer, SuperSignUsedSerializer, DeviceUDIDSerializer
from rest_framework.pagination import PageNumberPagination
from api.utils.app.supersignutils import IosUtils from api.utils.app.supersignutils import IosUtils
from api.utils.auth import ExpiringTokenAuthentication, SuperSignPermission
from api.utils.response import BaseResponse
from api.utils.serializer import DeveloperSerializer, SuperSignUsedSerializer, DeviceUDIDSerializer
from api.utils.utils import get_developer_devices, get_choices_dict from api.utils.utils import get_developer_devices, get_choices_dict
import logging
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)

@ -3,16 +3,17 @@
# project: 3月 # project: 3月
# author: NinEveN # author: NinEveN
# date: 2021/3/29 # date: 2021/3/29
from rest_framework.pagination import PageNumberPagination
from rest_framework.response import Response
from django.http.response import HttpResponse
import logging import logging
import random import random
from django.http.response import HttpResponse
from rest_framework.pagination import PageNumberPagination
from rest_framework.response import Response
from rest_framework.views import APIView from rest_framework.views import APIView
from rest_framework_xml.parsers import XMLParser from rest_framework_xml.parsers import XMLParser
from api.models import ThirdWeChatUserInfo, UserInfo, UserCertificationInfo from api.models import ThirdWeChatUserInfo, UserInfo, UserCertificationInfo
from api.utils.auth import ExpiringTokenAuthentication from api.utils.auth import ExpiringTokenAuthentication
from api.utils.mp.chat import reply, receive from api.utils.mp.chat import reply, receive
from api.utils.mp.wechat import check_signature, WxMsgCrypt, get_userinfo_from_openid, WxTemplateMsg from api.utils.mp.wechat import check_signature, WxMsgCrypt, get_userinfo_from_openid, WxTemplateMsg
from api.utils.response import BaseResponse from api.utils.response import BaseResponse

@ -3,20 +3,24 @@
# project: 3月 # project: 3月
# author: liuyu # author: liuyu
# date: 2020/3/6 # date: 2020/3/6
import json
import logging
import os
from rest_framework.response import Response
from rest_framework.views import APIView
from api.models import Apps, AppReleaseInfo, UserInfo, AppScreenShot, CertificationInfo, UserAdDisplayInfo
from api.tasks import run_resign_task
from api.utils.TokenManager import verify_token from api.utils.TokenManager import verify_token
from api.utils.app.apputils import get_random_short, save_app_infos from api.utils.app.apputils import get_random_short, save_app_infos
from api.utils.modelutils import get_app_domain_name, get_redirect_server_domain from api.utils.auth import ExpiringTokenAuthentication
from api.utils.storage.storage import Storage
from api.utils.storage.caches import upload_file_tmp_name, del_cache_response_by_short
from api.models import Apps, AppReleaseInfo, UserInfo, AppScreenShot, CertificationInfo, UserAdDisplayInfo
from api.utils.baseutils import make_app_uuid, make_from_user_uuid from api.utils.baseutils import make_app_uuid, make_from_user_uuid
from rest_framework.views import APIView from api.utils.modelutils import get_app_domain_name, get_redirect_server_domain
from api.utils.response import BaseResponse from api.utils.response import BaseResponse
from api.utils.auth import ExpiringTokenAuthentication from api.utils.storage.caches import upload_file_tmp_name, del_cache_response_by_short
from rest_framework.response import Response from api.utils.storage.storage import Storage
from fir_ser import settings from fir_ser import settings
from api.tasks import run_resign_task
import os, json, logging
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)

@ -4,12 +4,12 @@
# author: NinEveN # author: NinEveN
# date: 2021/1/9 # date: 2021/1/9
import argparse import argparse
import json
import os import os
import sys
import plistlib import plistlib
import random import random
import re import re
import json import sys
import zipfile import zipfile
''' '''

@ -13,10 +13,10 @@ Including another URLconf
1. Import the include() function: from django.urls import include, path 1. Import the include() function: from django.urls import include, path
2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) 2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
""" """
from django.urls import path, re_path, include from django.urls import re_path
from cli.views.login import CliUserInfoView
from cli.views.apps import CliAppsView, CliAppInfoView, CliAppReleaseInfoView from cli.views.apps import CliAppsView, CliAppInfoView, CliAppReleaseInfoView
from cli.views.login import CliUserInfoView
from cli.views.uploads import CliAppAnalyseView, CliUploadView from cli.views.uploads import CliAppAnalyseView, CliUploadView
urlpatterns = [ urlpatterns = [

@ -4,9 +4,10 @@
# author: liuyu # author: liuyu
# date: 2020/3/4 # date: 2020/3/4
import logging
from api.utils.auth import ApiTokenAuthentication from api.utils.auth import ApiTokenAuthentication
from api.views.apps import AppsView, AppInfoView, AppReleaseInfoView from api.views.apps import AppsView, AppInfoView, AppReleaseInfoView
import logging
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)

@ -1,6 +1,6 @@
from api.utils.auth import ApiTokenAuthentication
import logging import logging
from api.utils.auth import ApiTokenAuthentication
from api.views.login import UserInfoView from api.views.login import UserInfoView
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)

@ -5,10 +5,10 @@
# date: 2021/5/27 # date: 2021/5/27
import os import os
from celery import Celery from celery import Celery
# set the default Django settings module for the 'celery' program. # set the default Django settings module for the 'celery' program.
from fir_ser.settings import SYNC_CACHE_TO_DATABASE, GEETEST_CYCLE_TIME
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'fir_ser.settings') os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'fir_ser.settings')

@ -18,9 +18,9 @@ from django.urls import re_path, include
from django.views.static import serve from django.views.static import serve
from admin.views.celery_flower import CeleryFlowerView from admin.views.celery_flower import CeleryFlowerView
from fir_ser import settings
from api.views.download import DownloadView, InstallView from api.views.download import DownloadView, InstallView
from api.views.receiveudids import IosUDIDView, ShowUdidView from api.views.receiveudids import IosUDIDView, ShowUdidView
from fir_ser import settings
urlpatterns = [ urlpatterns = [
re_path('fly.admin/', admin.site.urls), re_path('fly.admin/', admin.site.urls),

@ -1,6 +1,7 @@
import requests
import random import random
import requests
short = ["bgql", "wjbu", "vnfg", "bgql"] short = ["bgql", "wjbu", "vnfg", "bgql"]
udid_lists = [ udid_lists = [

Loading…
Cancel
Save