ClownHe 1 éve
szülő
commit
e7dabb5c96
44 módosított fájl, 1140 hozzáadás és 0 törlés
  1. 8 0
      cppc_py10_project/.idea/.gitignore
  2. 8 0
      cppc_py10_project/.idea/cppc_py10_project.iml
  3. 13 0
      cppc_py10_project/.idea/inspectionProfiles/Project_Default.xml
  4. 6 0
      cppc_py10_project/.idea/inspectionProfiles/profiles_settings.xml
  5. 4 0
      cppc_py10_project/.idea/misc.xml
  6. 8 0
      cppc_py10_project/.idea/modules.xml
  7. 224 0
      cppc_py10_project/appium_mitmproxy_demo.py
  8. 147 0
      cppc_py10_project/frida_demo.py
  9. 16 0
      cppc_py10_project/main.py
  10. 21 0
      cppc_py10_project/反编译工具/dex2jar-2.0/d2j-baksmali.bat
  11. 36 0
      cppc_py10_project/反编译工具/dex2jar-2.0/d2j-baksmali.sh
  12. 21 0
      cppc_py10_project/反编译工具/dex2jar-2.0/d2j-dex-recompute-checksum.bat
  13. 36 0
      cppc_py10_project/反编译工具/dex2jar-2.0/d2j-dex-recompute-checksum.sh
  14. 21 0
      cppc_py10_project/反编译工具/dex2jar-2.0/d2j-dex2jar.bat
  15. 36 0
      cppc_py10_project/反编译工具/dex2jar-2.0/d2j-dex2jar.sh
  16. 21 0
      cppc_py10_project/反编译工具/dex2jar-2.0/d2j-dex2smali.bat
  17. 36 0
      cppc_py10_project/反编译工具/dex2jar-2.0/d2j-dex2smali.sh
  18. 21 0
      cppc_py10_project/反编译工具/dex2jar-2.0/d2j-jar2dex.bat
  19. 36 0
      cppc_py10_project/反编译工具/dex2jar-2.0/d2j-jar2dex.sh
  20. 21 0
      cppc_py10_project/反编译工具/dex2jar-2.0/d2j-jar2jasmin.bat
  21. 36 0
      cppc_py10_project/反编译工具/dex2jar-2.0/d2j-jar2jasmin.sh
  22. 21 0
      cppc_py10_project/反编译工具/dex2jar-2.0/d2j-jasmin2jar.bat
  23. 36 0
      cppc_py10_project/反编译工具/dex2jar-2.0/d2j-jasmin2jar.sh
  24. 21 0
      cppc_py10_project/反编译工具/dex2jar-2.0/d2j-smali.bat
  25. 36 0
      cppc_py10_project/反编译工具/dex2jar-2.0/d2j-smali.sh
  26. 21 0
      cppc_py10_project/反编译工具/dex2jar-2.0/d2j-std-apk.bat
  27. 36 0
      cppc_py10_project/反编译工具/dex2jar-2.0/d2j-std-apk.sh
  28. 14 0
      cppc_py10_project/反编译工具/dex2jar-2.0/d2j_invoke.bat
  29. 48 0
      cppc_py10_project/反编译工具/dex2jar-2.0/d2j_invoke.sh
  30. BIN
      cppc_py10_project/反编译工具/dex2jar-2.0/lib/antlr-runtime-3.5.jar
  31. BIN
      cppc_py10_project/反编译工具/dex2jar-2.0/lib/asm-debug-all-4.1.jar
  32. BIN
      cppc_py10_project/反编译工具/dex2jar-2.0/lib/d2j-base-cmd-2.0.jar
  33. BIN
      cppc_py10_project/反编译工具/dex2jar-2.0/lib/d2j-jasmin-2.0.jar
  34. BIN
      cppc_py10_project/反编译工具/dex2jar-2.0/lib/d2j-smali-2.0.jar
  35. BIN
      cppc_py10_project/反编译工具/dex2jar-2.0/lib/dex-ir-2.0.jar
  36. BIN
      cppc_py10_project/反编译工具/dex2jar-2.0/lib/dex-reader-2.0.jar
  37. BIN
      cppc_py10_project/反编译工具/dex2jar-2.0/lib/dex-reader-api-2.0.jar
  38. BIN
      cppc_py10_project/反编译工具/dex2jar-2.0/lib/dex-tools-2.0.jar
  39. BIN
      cppc_py10_project/反编译工具/dex2jar-2.0/lib/dex-translator-2.0.jar
  40. BIN
      cppc_py10_project/反编译工具/dex2jar-2.0/lib/dex-writer-2.0.jar
  41. BIN
      cppc_py10_project/反编译工具/dex2jar-2.0/lib/dx-1.7.jar
  42. BIN
      cppc_py10_project/反编译工具/美团.zip
  43. 27 0
      python_scripts/批量执行每日数据获取脚本.py
  44. 104 0
      python_scripts/食亨菜单导出.py

+ 8 - 0
cppc_py10_project/.idea/.gitignore

@@ -0,0 +1,8 @@
+# 默认忽略的文件
+/shelf/
+/workspace.xml
+# 数据源本地存储已忽略文件
+/../../../../:\cppc\cppc_py10_project\.idea/dataSources/
+/dataSources.local.xml
+# 基于编辑器的 HTTP 客户端请求
+/httpRequests/

+ 8 - 0
cppc_py10_project/.idea/cppc_py10_project.iml

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="PYTHON_MODULE" version="4">
+  <component name="NewModuleRootManager">
+    <content url="file://$MODULE_DIR$" />
+    <orderEntry type="jdk" jdkName="Python 3.10" jdkType="Python SDK" />
+    <orderEntry type="sourceFolder" forTests="false" />
+  </component>
+</module>

+ 13 - 0
cppc_py10_project/.idea/inspectionProfiles/Project_Default.xml

@@ -0,0 +1,13 @@
+<component name="InspectionProjectProfileManager">
+  <profile version="1.0">
+    <option name="myName" value="Project Default" />
+    <inspection_tool class="Eslint" enabled="true" level="WARNING" enabled_by_default="true" />
+    <inspection_tool class="PyPep8Inspection" enabled="true" level="WEAK WARNING" enabled_by_default="true">
+      <option name="ignoredErrors">
+        <list>
+          <option value="E101" />
+        </list>
+      </option>
+    </inspection_tool>
+  </profile>
+</component>

+ 6 - 0
cppc_py10_project/.idea/inspectionProfiles/profiles_settings.xml

@@ -0,0 +1,6 @@
+<component name="InspectionProjectProfileManager">
+  <settings>
+    <option name="USE_PROJECT_PROFILE" value="false" />
+    <version value="1.0" />
+  </settings>
+</component>

+ 4 - 0
cppc_py10_project/.idea/misc.xml

@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="ProjectRootManager" version="2" project-jdk-name="Python 3.10" project-jdk-type="Python SDK" />
+</project>

+ 8 - 0
cppc_py10_project/.idea/modules.xml

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="ProjectModuleManager">
+    <modules>
+      <module fileurl="file://$PROJECT_DIR$/.idea/cppc_py10_project.iml" filepath="$PROJECT_DIR$/.idea/cppc_py10_project.iml" />
+    </modules>
+  </component>
+</project>

+ 224 - 0
cppc_py10_project/appium_mitmproxy_demo.py

@@ -0,0 +1,224 @@
+# -*- codeing = utf-8 -*-
+# @Time : 2022/9/29 16:17
+# @Author : Clown
+# @File : appium_mitmproxy_demo.py
+# @Software : PyCharm
+import mitmproxy
+import csv
+import pandas
+import appium
+from appium import webdriver
+from appium.webdriver.common.appiumby import AppiumBy
+from appium.webdriver.common.touch_action import TouchAction
+import time
+import random
+
+def getSize(driver):
+    """获取页面大小"""
+    x = driver.get_window_size()['width']
+    y = driver.get_window_size()['height']
+    return(x, y)
+
+
+def swipeRight(driver):
+    """向右滑动 - [x轴变动,y轴不变]"""
+    l = getSize(driver)
+    x1 = int(l[0] * 0.8)
+    x2 = int(l[0] * 0.2)
+    y = int(l[1] * 0.5)
+    driver.swipe(x1, y, x2, y, 1000)
+
+
+def swipeLeft(driver):
+    """向左滑动 - [x轴变动,y轴不变]"""
+    l = getSize(driver)
+    x1 = int(l[0] * 0.9)
+    x2 = int(l[0] * 0.1)
+    y = int(l[1] * 0.5)
+    driver.swipe(x2, y, x1, y, 1000)
+
+
+def swipeDown(driver,y1):
+    """向下滑动 - [x轴不变,y轴变动]"""
+    l = getSize(driver)
+    # y1 = int(l[1] * 0.5)
+    # y2 = int(l[1] * 0.2)
+    y2 = y1 - 630
+    x_v = random.uniform(0.45,0.55)
+    x = int(l[0] * (x_v))  # 329 --348
+    x1 = int(l[0] * (x_v))
+    # driver.swipe(x, y1, x1, y2)
+    driver.swipe(x, y1, x1, y2)
+    # time.sleep(random.uniform(0.5,1))
+
+
+def swipeUp(driver):
+    """向上滑动 - [x轴不变,y轴变动]"""
+    l = getSize(driver)
+    y1 = int(l[1] * 0.9)
+    y2 = int(l[1] * 0.2)
+    x = int(l[0] * 0.5)
+    driver.swipe(x, y2, x, y1, 1000)
+
+#计算器
+appPackage = 'com.oneplus.calculator'
+appActivity = 'com.oneplus.calculator.Calculator'
+
+#美团
+appPackage = 'com.sankuai.meituan'
+appActivity = 'com.meituan.android.pt.homepage.activity.MainActivity'
+
+# #美团外卖
+# appPackage = 'com.sankuai.meituan.takeoutnew'
+# appActivity = 'com.sankuai.waimai.business.page.homepage.MainActivity'
+
+addr = '徐汇区石龙路853号'
+city = '上海'
+
+app_dict = {
+    "platformName": "Android",
+    "platformVersion": '10.0.11',
+    "automationName": "uiautomator2",
+    "deviceName": '4b324dc1',
+    "appPackage": appPackage,
+    "appActivity": appActivity,
+    "unicodeKeyboard": True,
+    "resetKeyboard": True,
+    "newCommandTimeout": 6000,
+    "noReset": True
+}
+'''
+"platformName": "Android",            # 系统环境
+  "platformVersion": xxxx,              #测试手机android版本
+  "automationName": "uiautomator2",     #自动化名称
+  "deviceName": xxxxx,                  #设备名称  设备名称查看方式:win + r  输入cmd 使用adb命令【adb devices】获取
+  "appPackage": xxxx,                   # 程序包名  程序包名查看方式:win + r  输入cmd 使用adb命令【adb shell "dumpsys window | grep mCurrent】(不要按回车),然后操作安卓设备清除所有在运行的app,打开需自动执行的app,在cmd界面按回车执行命令
+                                        # 程序包名的操作对应输出的内容如:[
+                                        #   mCurrentUserId=0
+                                        #   mCurrentFocus=Window{408742e u0 com.oneplus.calculator/com.oneplus.calculator.Calculator}  【com.oneplus.calculator】为包名,【com.oneplus.calculator.Calculator】为程序入口名
+                                        #   mCurrent=[0,80][1080,2280]
+                                        #   mCurrentAppOrientation=SCREEN_ORIENTATION_UNSPECIFIED
+                                        #   mCurrentRotation=ROTATION_0]
+  "appActivity": "xxxx,                 #程序入口类名
+  "unicodeKeyboard": True,              #使用自带输入法,输入中文时填True
+  "resetKeyboard": True,                #执行程序恢复原来输入法
+  "newCommandTimeout": 6000,
+  "noReset": true                       #保存session状态,不重置app
+'''
+
+driver=webdriver.Remote('http://127.0.0.1:4723/wd/hub',app_dict)
+driver.update_settings({'waitForIdleTimeout': 100})
+
+# 设置缺省等待时间
+driver.implicitly_wait(10)
+
+# driver.find_element_by_accessibility_id('外卖').click()
+driver.find_element(AppiumBy.ACCESSIBILITY_ID,'外卖').click()
+
+try:
+    # driver.find_element_by_accessibility_id('关闭').click()
+    driver.find_element (AppiumBy.ACCESSIBILITY_ID, '关闭').click ()
+except:
+    pass
+# driver.find_element_by_accessibility_id('全部分类').click()
+# driver.find_element_by_accessibility_id('com.sankuai.meituan:id/actionbar_txt').click()
+#点击顶部 定位
+driver.find_element(AppiumBy.XPATH,'/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.widget.RelativeLayout/android.widget.RelativeLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.widget.LinearLayout/android.widget.TextView').click()
+#点击收货地址搜索
+driver.find_element(AppiumBy.XPATH,'/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.view.ViewGroup/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.LinearLayout/android.widget.RelativeLayout/android.widget.LinearLayout/android.widget.EditText').click()
+#点击城市定位
+driver.find_element(AppiumBy.XPATH,'/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.view.ViewGroup/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.LinearLayout/android.widget.LinearLayout/android.widget.TextView[2]').click()
+#点击城市搜索框并输入城市关键词
+driver.find_element(AppiumBy.XPATH,'/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.EditText').click()
+driver.find_element(AppiumBy.XPATH,'/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.EditText').send_keys(city)
+#选择首个匹配的城市
+driver.find_element(AppiumBy.XPATH,'/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.view.ViewGroup[3]/android.view.ViewGroup[1]/android.widget.ScrollView/android.view.ViewGroup/android.view.ViewGroup[2]/android.widget.TextView').click()
+#点击收货地址搜索并输入具体地址
+driver.find_element(AppiumBy.XPATH,'/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.view.ViewGroup/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.LinearLayout/android.widget.RelativeLayout/android.widget.LinearLayout/android.widget.EditText').click()
+driver.find_element(AppiumBy.XPATH,'/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.view.ViewGroup/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.LinearLayout/android.widget.RelativeLayout/android.widget.LinearLayout/android.widget.EditText').send_keys(addr)
+#选择首个匹配的地址
+driver.find_element(AppiumBy.XPATH,'/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.view.ViewGroup/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.support.v7.widget.RecyclerView/android.widget.LinearLayout[1]/android.widget.LinearLayout').click()
+
+#选择美食
+try:
+    # driver.find_element_by_accessibility_id('美食').click()
+    driver.find_element (AppiumBy.ACCESSIBILITY_ID, '美食').click ()
+except:
+    driver.find_element(AppiumBy.XPATH,'//android.widget.RelativeLayout[@content-desc="美食"]').click()
+
+#点击综合排序
+driver.find_element(AppiumBy.XPATH,'/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.view.ViewGroup/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.view.ViewGroup/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.support.v7.widget.RecyclerView/android.widget.LinearLayout/android.support.v4.view.ViewPager/android.widget.FrameLayout/android.support.v7.widget.RecyclerView/android.widget.FrameLayout[1]/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.LinearLayout/android.widget.LinearLayout[1]/android.widget.LinearLayout[1]/android.widget.TextView').click()
+
+#点击距离优先
+driver.find_element(AppiumBy.XPATH,'/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.view.ViewGroup/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.view.ViewGroup/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.support.v7.widget.RecyclerView/android.widget.LinearLayout/android.support.v4.view.ViewPager/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout[2]/android.widget.RelativeLayout/android.widget.RelativeLayout/android.widget.FrameLayout[2]/android.widget.RelativeLayout/android.widget.LinearLayout/android.widget.ListView/android.widget.RelativeLayout[3]').click()
+long = 0
+page = 1
+while long <= 2:
+    print(f'-------{page}页--------')
+    y_p = 2044
+    for n in range(1,8):
+        try:
+            # n = 2
+            main_path = f'/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.view.ViewGroup/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.view.ViewGroup/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.support.v7.widget.RecyclerView/android.widget.LinearLayout/android.support.v4.view.ViewPager/android.widget.FrameLayout/android.support.v7.widget.RecyclerView/android.widget.FrameLayout[{n}]'
+                        #'/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.view.ViewGroup/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.view.ViewGroup/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.support.v7.widget.RecyclerView/android.widget.LinearLayout/android.support.v4.view.ViewPager/android.widget.FrameLayout/android.support.v7.widget.RecyclerView/android.widget.FrameLayout[2]
+            fix_path = '/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.FrameLayout[3]'
+
+            title = main_path + fix_path + '/android.widget.FrameLayout[1]/android.widget.TextView'
+            mark = main_path + fix_path + '/android.widget.FrameLayout[2]/android.widget.FrameLayout[1]/android.widget.FrameLayout/android.widget.TextView'
+            month_order = main_path + fix_path + '/android.widget.FrameLayout[2]/android.widget.FrameLayout[1]/android.widget.TextView[1]'
+            per_pp = main_path + fix_path + '/android.widget.FrameLayout[2]/android.widget.FrameLayout[1]/android.widget.TextView[2]'
+            qisongfei = main_path + fix_path + '/android.widget.FrameLayout[3]/android.widget.FrameLayout/android.widget.TextView[1]'
+            peisongfei = main_path + fix_path + '/android.widget.FrameLayout[3]/android.widget.FrameLayout/android.widget.TextView[2]'
+            peisongTime = main_path + fix_path + '/android.widget.FrameLayout[3]/android.widget.TextView[1]'
+            peisongDistent = main_path + fix_path + '/android.widget.FrameLayout[3]/android.widget.TextView[2]'
+            tips = main_path + fix_path + '/android.widget.FrameLayout[4]/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.TextView'
+            title1 = driver.find_element(AppiumBy.XPATH,title).text
+            peisongDistent1 = driver.find_element(AppiumBy.XPATH,peisongDistent).text
+            if n == 6:
+                img = main_path
+                elem = driver.find_element(AppiumBy.XPATH,tips)
+                height = elem.size['height']
+                y_p = elem.location['y'] + height
+
+
+        except:
+            title1 = '未知'
+            peisongDistent1 = '未知'
+
+
+        print('序号',n,'店名:',title1,'配送距离:',peisongDistent1,'Y轴:',y_p)
+
+    try:
+        long =  int(peisongDistent1.split('.')[0])
+    except:
+        long = 0
+
+    swipeDown(driver,y_p)
+    page += 1
+
+'''
+import frida
+import sys
+
+
+def on_message(message, data):
+    if message['type'] == 'send':
+        print("[*] {0}".format(message['payload']))
+    else:
+        print(message)
+
+
+hookcode = """
+Java.perform(function () {
+    var SwitchConfig = Java.use('mtopsdk.mtop.global.SwitchConfig')
+    SwitchConfig.isGlobalSpdySwitchOpen.implementation = function () {
+        return false;
+    }
+});
+"""
+process = frida.get_usb_device().attach('com.taobao.taobao')
+script = process.create_script(hookcode)
+script.on('message', on_message)
+script.load()
+sys.stdin.read()
+'''

+ 147 - 0
cppc_py10_project/frida_demo.py

@@ -0,0 +1,147 @@
+# -*- codeing = utf-8 -*-
+# @Time : 2022/9/30 15:36
+# @Author : Clown
+# @File : frida_demo.py
+# @Software : PyCharm
+import frida
+import pprint
+import frida_dexdump
+import sys
+if 1==0:
+    def on_message(message, data):
+        print ("[on_message] message:", message, "data:", data)
+
+
+    rdev = frida.get_usb_device ()
+    process = rdev.enumerate_processes ()  # 获取手机所有进程
+    pprint.pprint (process)
+    session = rdev.attach ("美团")  # frida-ps -U 查看到的app名字
+    print (session)
+
+    script = session.create_script ("""
+    rpc.exports.enumerateModules=function(){
+    return Process.enumerateModules();
+    };
+    """)
+
+    script.on ("message", on_message)
+    script.load ()
+    # 获取进程使用的所有模块
+    pprint.pprint ([m["name"] for m in script.exports.enumerate_modules ()])
+
+if 1==1:
+    jscode = """
+
+    Java.perform(function () {
+
+    var SwitchConfig = Java.use('mtopsdk.mtop.global.SwitchConfig');
+
+        SwitchConfig.isGlobalSpdySwitchOpen.overload().implementation = function(){
+
+            var ret = this.isGlobalSpdySwitchOpen.apply(this, arguments);
+
+            console.log("isGlobalSpdySwitchOpenl "+ret)
+
+            return false
+
+        }
+
+    })
+
+    """
+
+
+    def on_message(message, data):
+
+        if message['type'] == 'send':
+
+            print ("[*] {0}".format (message['payload']))
+
+        else:
+
+            print (message)
+
+
+    process = frida.get_usb_device ().attach ('美团')
+
+    script = process.create_script (jscode)
+
+    script.on ('message', on_message)
+
+    script.load ()
+
+    sys.stdin.read ()
+if 1 == 0:
+    import os
+    import zipfile
+    import argparse
+
+
+    def rename_class(path):
+        files = os.listdir (path)
+        dex_index = 0
+        if path.endswith ('/'):
+            path = path[:-1]
+            print (path)
+        for i in range (len (files)):
+            if files[i].endswith ('.dex'):
+                old_name = path + '/' + files[i]
+                if dex_index == 0:
+                    new_name = path + '/' + 'classes.dex'
+                else:
+                    new_name = path + '/' + 'classes%d.dex' % dex_index
+                dex_index += 1
+                if os.path.exists (new_name):
+                    continue
+                os.rename (old_name, new_name)
+        print ('[*] 重命名完毕')
+
+
+    def extract_META_INF_from_apk(apk_path, target_path):
+        r = zipfile.is_zipfile (apk_path)
+        if r:
+            fz = zipfile.ZipFile (apk_path, 'r')
+            for file in fz.namelist ():
+                if file.startswith ('META-INF'):
+                    fz.extract (file, target_path)
+        else:
+            print ('[-] %s 不是一个APK文件' % apk_path)
+
+
+    def zip_dir(dirname, zipfilename):
+        filelist = []
+        if os.path.isfile (dirname):
+            if dirname.endswith ('.dex'):
+                filelist.append (dirname)
+        else:
+            for root, dirs, files in os.walk (dirname):
+                for dir in dirs:
+                    # if dir == 'META-INF':
+                    # print('dir:', os.path.join(root, dir))
+                    filelist.append (os.path.join (root, dir))
+                for name in files:
+                    # print('file:', os.path.join(root, name))
+
+                    filelist.append (os.path.join (root, name))
+
+        z = zipfile.ZipFile (zipfilename, 'w', zipfile.ZIP_DEFLATED)
+        for tar in filelist:
+            arcname = tar[len (dirname):]
+
+            if ('META-INF' in arcname or arcname.endswith ('.dex')) and '.DS_Store' not in arcname:
+                # print(tar + " -->rar: " + arcname)
+                z.write (tar, arcname)
+        print ('[*] APK打包成功,你可以拖入APK进行分析啦!')
+        z.close ()
+
+
+    if __name__ == '__main__':
+        args = {
+            'dex_path': '脱壳后dex路径',
+            'apk_path': '原始带壳apk路径',
+            'output': '脱壳后apk路径'
+        }
+
+        rename_class (args['dex_path'])
+        extract_META_INF_from_apk (args['apk_path'], args['dex_path'])
+        zip_dir (args['dex_path'], args['output'])

+ 16 - 0
cppc_py10_project/main.py

@@ -0,0 +1,16 @@
+# 这是一个示例 Python 脚本。
+
+# 按 Shift+F10 执行或将其替换为您的代码。
+# 按 双击 Shift 在所有地方搜索类、文件、工具窗口、操作和设置。
+
+
+def print_hi(name):
+    # 在下面的代码行中使用断点来调试脚本。
+    print(f'Hi, {name}')  # 按 Ctrl+F8 切换断点。
+
+
+# 按间距中的绿色按钮以运行脚本。
+if __name__ == '__main__':
+    print_hi('PyCharm')
+
+# 访问 https://www.jetbrains.com/help/pycharm/ 获取 PyCharm 帮助

+ 21 - 0
cppc_py10_project/反编译工具/dex2jar-2.0/d2j-baksmali.bat

@@ -0,0 +1,21 @@
+@echo off
+
+REM
+REM dex2jar - Tools to work with android .dex and java .class files
+REM Copyright (c) 2009-2013 Panxiaobo
+REM 
+REM Licensed under the Apache License, Version 2.0 (the "License");
+REM you may not use this file except in compliance with the License.
+REM You may obtain a copy of the License at
+REM 
+REM      http://www.apache.org/licenses/LICENSE-2.0
+REM 
+REM Unless required by applicable law or agreed to in writing, software
+REM distributed under the License is distributed on an "AS IS" BASIS,
+REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+REM See the License for the specific language governing permissions and
+REM limitations under the License.
+REM
+
+REM call d2j_invoke.bat to setup java environment
+@"%~dp0d2j_invoke.bat" com.googlecode.d2j.smali.BaksmaliCmd %*

+ 36 - 0
cppc_py10_project/反编译工具/dex2jar-2.0/d2j-baksmali.sh

@@ -0,0 +1,36 @@
+#!/bin/sh
+
+#
+# dex2jar - Tools to work with android .dex and java .class files
+# Copyright (c) 2009-2013 Panxiaobo
+# 
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# 
+#      http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+# copy from $Tomcat/bin/startup.sh
+# resolve links - $0 may be a softlink
+PRG="$0"
+while [ -h "$PRG" ] ; do
+  ls=`ls -ld "$PRG"`
+  link=`expr "$ls" : '.*-> \(.*\)$'`
+  if expr "$link" : '/.*' > /dev/null; then
+    PRG="$link"
+  else
+    PRG=`dirname "$PRG"`/"$link"
+  fi
+done
+PRGDIR=`dirname "$PRG"`
+#
+
+# call d2j_invoke.sh to setup java environment
+"$PRGDIR/d2j_invoke.sh" "com.googlecode.d2j.smali.BaksmaliCmd" "$@"

+ 21 - 0
cppc_py10_project/反编译工具/dex2jar-2.0/d2j-dex-recompute-checksum.bat

@@ -0,0 +1,21 @@
+@echo off
+
+REM
+REM dex2jar - Tools to work with android .dex and java .class files
+REM Copyright (c) 2009-2013 Panxiaobo
+REM 
+REM Licensed under the Apache License, Version 2.0 (the "License");
+REM you may not use this file except in compliance with the License.
+REM You may obtain a copy of the License at
+REM 
+REM      http://www.apache.org/licenses/LICENSE-2.0
+REM 
+REM Unless required by applicable law or agreed to in writing, software
+REM distributed under the License is distributed on an "AS IS" BASIS,
+REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+REM See the License for the specific language governing permissions and
+REM limitations under the License.
+REM
+
+REM call d2j_invoke.bat to setup java environment
+@"%~dp0d2j_invoke.bat" com.googlecode.dex2jar.tools.DexRecomputeChecksum %*

+ 36 - 0
cppc_py10_project/反编译工具/dex2jar-2.0/d2j-dex-recompute-checksum.sh

@@ -0,0 +1,36 @@
+#!/bin/sh
+
+#
+# dex2jar - Tools to work with android .dex and java .class files
+# Copyright (c) 2009-2013 Panxiaobo
+# 
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# 
+#      http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+# copy from $Tomcat/bin/startup.sh
+# resolve links - $0 may be a softlink
+PRG="$0"
+while [ -h "$PRG" ] ; do
+  ls=`ls -ld "$PRG"`
+  link=`expr "$ls" : '.*-> \(.*\)$'`
+  if expr "$link" : '/.*' > /dev/null; then
+    PRG="$link"
+  else
+    PRG=`dirname "$PRG"`/"$link"
+  fi
+done
+PRGDIR=`dirname "$PRG"`
+#
+
+# call d2j_invoke.sh to setup java environment
+"$PRGDIR/d2j_invoke.sh" "com.googlecode.dex2jar.tools.DexRecomputeChecksum" "$@"

+ 21 - 0
cppc_py10_project/反编译工具/dex2jar-2.0/d2j-dex2jar.bat

@@ -0,0 +1,21 @@
+@echo off
+
+REM
+REM dex2jar - Tools to work with android .dex and java .class files
+REM Copyright (c) 2009-2013 Panxiaobo
+REM 
+REM Licensed under the Apache License, Version 2.0 (the "License");
+REM you may not use this file except in compliance with the License.
+REM You may obtain a copy of the License at
+REM 
+REM      http://www.apache.org/licenses/LICENSE-2.0
+REM 
+REM Unless required by applicable law or agreed to in writing, software
+REM distributed under the License is distributed on an "AS IS" BASIS,
+REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+REM See the License for the specific language governing permissions and
+REM limitations under the License.
+REM
+
+REM call d2j_invoke.bat to setup java environment
+@"%~dp0d2j_invoke.bat" com.googlecode.dex2jar.tools.Dex2jarCmd %*

+ 36 - 0
cppc_py10_project/反编译工具/dex2jar-2.0/d2j-dex2jar.sh

@@ -0,0 +1,36 @@
+#!/bin/sh
+
+#
+# dex2jar - Tools to work with android .dex and java .class files
+# Copyright (c) 2009-2013 Panxiaobo
+# 
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# 
+#      http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+# copy from $Tomcat/bin/startup.sh
+# resolve links - $0 may be a softlink
+PRG="$0"
+while [ -h "$PRG" ] ; do
+  ls=`ls -ld "$PRG"`
+  link=`expr "$ls" : '.*-> \(.*\)$'`
+  if expr "$link" : '/.*' > /dev/null; then
+    PRG="$link"
+  else
+    PRG=`dirname "$PRG"`/"$link"
+  fi
+done
+PRGDIR=`dirname "$PRG"`
+#
+
+# call d2j_invoke.sh to setup java environment
+"$PRGDIR/d2j_invoke.sh" "com.googlecode.dex2jar.tools.Dex2jarCmd" "$@"

+ 21 - 0
cppc_py10_project/反编译工具/dex2jar-2.0/d2j-dex2smali.bat

@@ -0,0 +1,21 @@
+@echo off
+
+REM
+REM dex2jar - Tools to work with android .dex and java .class files
+REM Copyright (c) 2009-2013 Panxiaobo
+REM 
+REM Licensed under the Apache License, Version 2.0 (the "License");
+REM you may not use this file except in compliance with the License.
+REM You may obtain a copy of the License at
+REM 
+REM      http://www.apache.org/licenses/LICENSE-2.0
+REM 
+REM Unless required by applicable law or agreed to in writing, software
+REM distributed under the License is distributed on an "AS IS" BASIS,
+REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+REM See the License for the specific language governing permissions and
+REM limitations under the License.
+REM
+
+REM call d2j_invoke.bat to setup java environment
+@"%~dp0d2j_invoke.bat" com.googlecode.d2j.smali.BaksmaliCmd %*

+ 36 - 0
cppc_py10_project/反编译工具/dex2jar-2.0/d2j-dex2smali.sh

@@ -0,0 +1,36 @@
+#!/bin/sh
+
+#
+# dex2jar - Tools to work with android .dex and java .class files
+# Copyright (c) 2009-2013 Panxiaobo
+# 
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# 
+#      http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+# copy from $Tomcat/bin/startup.sh
+# resolve links - $0 may be a softlink
+PRG="$0"
+while [ -h "$PRG" ] ; do
+  ls=`ls -ld "$PRG"`
+  link=`expr "$ls" : '.*-> \(.*\)$'`
+  if expr "$link" : '/.*' > /dev/null; then
+    PRG="$link"
+  else
+    PRG=`dirname "$PRG"`/"$link"
+  fi
+done
+PRGDIR=`dirname "$PRG"`
+#
+
+# call d2j_invoke.sh to setup java environment
+"$PRGDIR/d2j_invoke.sh" "com.googlecode.d2j.smali.BaksmaliCmd" "$@"

+ 21 - 0
cppc_py10_project/反编译工具/dex2jar-2.0/d2j-jar2dex.bat

@@ -0,0 +1,21 @@
+@echo off
+
+REM
+REM dex2jar - Tools to work with android .dex and java .class files
+REM Copyright (c) 2009-2013 Panxiaobo
+REM 
+REM Licensed under the Apache License, Version 2.0 (the "License");
+REM you may not use this file except in compliance with the License.
+REM You may obtain a copy of the License at
+REM 
+REM      http://www.apache.org/licenses/LICENSE-2.0
+REM 
+REM Unless required by applicable law or agreed to in writing, software
+REM distributed under the License is distributed on an "AS IS" BASIS,
+REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+REM See the License for the specific language governing permissions and
+REM limitations under the License.
+REM
+
+REM call d2j_invoke.bat to setup java environment
+@"%~dp0d2j_invoke.bat" com.googlecode.dex2jar.tools.Jar2Dex %*

+ 36 - 0
cppc_py10_project/反编译工具/dex2jar-2.0/d2j-jar2dex.sh

@@ -0,0 +1,36 @@
+#!/bin/sh
+
+#
+# dex2jar - Tools to work with android .dex and java .class files
+# Copyright (c) 2009-2013 Panxiaobo
+# 
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# 
+#      http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+# copy from $Tomcat/bin/startup.sh
+# resolve links - $0 may be a softlink
+PRG="$0"
+while [ -h "$PRG" ] ; do
+  ls=`ls -ld "$PRG"`
+  link=`expr "$ls" : '.*-> \(.*\)$'`
+  if expr "$link" : '/.*' > /dev/null; then
+    PRG="$link"
+  else
+    PRG=`dirname "$PRG"`/"$link"
+  fi
+done
+PRGDIR=`dirname "$PRG"`
+#
+
+# call d2j_invoke.sh to setup java environment
+"$PRGDIR/d2j_invoke.sh" "com.googlecode.dex2jar.tools.Jar2Dex" "$@"

+ 21 - 0
cppc_py10_project/反编译工具/dex2jar-2.0/d2j-jar2jasmin.bat

@@ -0,0 +1,21 @@
+@echo off
+
+REM
+REM dex2jar - Tools to work with android .dex and java .class files
+REM Copyright (c) 2009-2013 Panxiaobo
+REM 
+REM Licensed under the Apache License, Version 2.0 (the "License");
+REM you may not use this file except in compliance with the License.
+REM You may obtain a copy of the License at
+REM 
+REM      http://www.apache.org/licenses/LICENSE-2.0
+REM 
+REM Unless required by applicable law or agreed to in writing, software
+REM distributed under the License is distributed on an "AS IS" BASIS,
+REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+REM See the License for the specific language governing permissions and
+REM limitations under the License.
+REM
+
+REM call d2j_invoke.bat to setup java environment
+@"%~dp0d2j_invoke.bat" com.googlecode.d2j.jasmin.Jar2JasminCmd %*

+ 36 - 0
cppc_py10_project/反编译工具/dex2jar-2.0/d2j-jar2jasmin.sh

@@ -0,0 +1,36 @@
+#!/bin/sh
+
+#
+# dex2jar - Tools to work with android .dex and java .class files
+# Copyright (c) 2009-2013 Panxiaobo
+# 
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# 
+#      http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+# copy from $Tomcat/bin/startup.sh
+# resolve links - $0 may be a softlink
+PRG="$0"
+while [ -h "$PRG" ] ; do
+  ls=`ls -ld "$PRG"`
+  link=`expr "$ls" : '.*-> \(.*\)$'`
+  if expr "$link" : '/.*' > /dev/null; then
+    PRG="$link"
+  else
+    PRG=`dirname "$PRG"`/"$link"
+  fi
+done
+PRGDIR=`dirname "$PRG"`
+#
+
+# call d2j_invoke.sh to setup java environment
+"$PRGDIR/d2j_invoke.sh" "com.googlecode.d2j.jasmin.Jar2JasminCmd" "$@"

+ 21 - 0
cppc_py10_project/反编译工具/dex2jar-2.0/d2j-jasmin2jar.bat

@@ -0,0 +1,21 @@
+@echo off
+
+REM
+REM dex2jar - Tools to work with android .dex and java .class files
+REM Copyright (c) 2009-2013 Panxiaobo
+REM 
+REM Licensed under the Apache License, Version 2.0 (the "License");
+REM you may not use this file except in compliance with the License.
+REM You may obtain a copy of the License at
+REM 
+REM      http://www.apache.org/licenses/LICENSE-2.0
+REM 
+REM Unless required by applicable law or agreed to in writing, software
+REM distributed under the License is distributed on an "AS IS" BASIS,
+REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+REM See the License for the specific language governing permissions and
+REM limitations under the License.
+REM
+
+REM call d2j_invoke.bat to setup java environment
+@"%~dp0d2j_invoke.bat" com.googlecode.d2j.jasmin.Jasmin2JarCmd %*

+ 36 - 0
cppc_py10_project/反编译工具/dex2jar-2.0/d2j-jasmin2jar.sh

@@ -0,0 +1,36 @@
+#!/bin/sh
+
+#
+# dex2jar - Tools to work with android .dex and java .class files
+# Copyright (c) 2009-2013 Panxiaobo
+# 
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# 
+#      http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+# copy from $Tomcat/bin/startup.sh
+# resolve links - $0 may be a softlink
+PRG="$0"
+while [ -h "$PRG" ] ; do
+  ls=`ls -ld "$PRG"`
+  link=`expr "$ls" : '.*-> \(.*\)$'`
+  if expr "$link" : '/.*' > /dev/null; then
+    PRG="$link"
+  else
+    PRG=`dirname "$PRG"`/"$link"
+  fi
+done
+PRGDIR=`dirname "$PRG"`
+#
+
+# call d2j_invoke.sh to setup java environment
+"$PRGDIR/d2j_invoke.sh" "com.googlecode.d2j.jasmin.Jasmin2JarCmd" "$@"

+ 21 - 0
cppc_py10_project/反编译工具/dex2jar-2.0/d2j-smali.bat

@@ -0,0 +1,21 @@
+@echo off
+
+REM
+REM dex2jar - Tools to work with android .dex and java .class files
+REM Copyright (c) 2009-2013 Panxiaobo
+REM 
+REM Licensed under the Apache License, Version 2.0 (the "License");
+REM you may not use this file except in compliance with the License.
+REM You may obtain a copy of the License at
+REM 
+REM      http://www.apache.org/licenses/LICENSE-2.0
+REM 
+REM Unless required by applicable law or agreed to in writing, software
+REM distributed under the License is distributed on an "AS IS" BASIS,
+REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+REM See the License for the specific language governing permissions and
+REM limitations under the License.
+REM
+
+REM call d2j_invoke.bat to setup java environment
+@"%~dp0d2j_invoke.bat" com.googlecode.d2j.smali.SmaliCmd %*

+ 36 - 0
cppc_py10_project/反编译工具/dex2jar-2.0/d2j-smali.sh

@@ -0,0 +1,36 @@
+#!/bin/sh
+
+#
+# dex2jar - Tools to work with android .dex and java .class files
+# Copyright (c) 2009-2013 Panxiaobo
+# 
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# 
+#      http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+# copy from $Tomcat/bin/startup.sh
+# resolve links - $0 may be a softlink
+PRG="$0"
+while [ -h "$PRG" ] ; do
+  ls=`ls -ld "$PRG"`
+  link=`expr "$ls" : '.*-> \(.*\)$'`
+  if expr "$link" : '/.*' > /dev/null; then
+    PRG="$link"
+  else
+    PRG=`dirname "$PRG"`/"$link"
+  fi
+done
+PRGDIR=`dirname "$PRG"`
+#
+
+# call d2j_invoke.sh to setup java environment
+"$PRGDIR/d2j_invoke.sh" "com.googlecode.d2j.smali.SmaliCmd" "$@"

+ 21 - 0
cppc_py10_project/反编译工具/dex2jar-2.0/d2j-std-apk.bat

@@ -0,0 +1,21 @@
+@echo off
+
+REM
+REM dex2jar - Tools to work with android .dex and java .class files
+REM Copyright (c) 2009-2013 Panxiaobo
+REM 
+REM Licensed under the Apache License, Version 2.0 (the "License");
+REM you may not use this file except in compliance with the License.
+REM You may obtain a copy of the License at
+REM 
+REM      http://www.apache.org/licenses/LICENSE-2.0
+REM 
+REM Unless required by applicable law or agreed to in writing, software
+REM distributed under the License is distributed on an "AS IS" BASIS,
+REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+REM See the License for the specific language governing permissions and
+REM limitations under the License.
+REM
+
+REM call d2j_invoke.bat to setup java environment
+@"%~dp0d2j_invoke.bat" com.googlecode.dex2jar.tools.StdApkCmd %*

+ 36 - 0
cppc_py10_project/反编译工具/dex2jar-2.0/d2j-std-apk.sh

@@ -0,0 +1,36 @@
+#!/bin/sh
+
+#
+# dex2jar - Tools to work with android .dex and java .class files
+# Copyright (c) 2009-2013 Panxiaobo
+# 
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# 
+#      http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+# copy from $Tomcat/bin/startup.sh
+# resolve links - $0 may be a softlink
+PRG="$0"
+while [ -h "$PRG" ] ; do
+  ls=`ls -ld "$PRG"`
+  link=`expr "$ls" : '.*-> \(.*\)$'`
+  if expr "$link" : '/.*' > /dev/null; then
+    PRG="$link"
+  else
+    PRG=`dirname "$PRG"`/"$link"
+  fi
+done
+PRGDIR=`dirname "$PRG"`
+#
+
+# call d2j_invoke.sh to setup java environment
+"$PRGDIR/d2j_invoke.sh" "com.googlecode.dex2jar.tools.StdApkCmd" "$@"

+ 14 - 0
cppc_py10_project/反编译工具/dex2jar-2.0/d2j_invoke.bat

@@ -0,0 +1,14 @@
+@echo off
+REM better invocation scripts for windows from lanchon, release in public domain. thanks!
+REM https://code.google.com/p/dex2jar/issues/detail?id=192
+
+setlocal enabledelayedexpansion
+
+set LIB=%~dp0lib
+
+set CP=
+for %%X in ("%LIB%"\*.jar) do (
+    set CP=!CP!%%X;
+)
+
+java -Xms512m -Xmx1024m -cp "%CP%" %*

+ 48 - 0
cppc_py10_project/反编译工具/dex2jar-2.0/d2j_invoke.sh

@@ -0,0 +1,48 @@
+#!/bin/sh
+
+#
+# dex2jar - Tools to work with android .dex and java .class files
+# Copyright (c) 2009-2013 Panxiaobo
+# 
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# 
+#      http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+# copy from $Tomcat/bin/startup.sh
+# resolve links - $0 may be a softlink
+PRG="$0"
+while [ -h "$PRG" ] ; do
+  ls=`ls -ld "$PRG"`
+  link=`expr "$ls" : '.*-> \(.*\)$'`
+  if expr "$link" : '/.*' > /dev/null; then
+    PRG="$link"
+  else
+    PRG=`dirname "$PRG"`/"$link"
+  fi
+done
+PRGDIR=`dirname "$PRG"`
+#
+
+_classpath="."
+if [ `uname -a | grep -i -c cygwin` -ne 0 ]; then # Cygwin, translate the path
+    for k in "$PRGDIR"/lib/*.jar
+    do
+        _classpath="${_classpath};`cygpath -w ${k}`"
+    done
+else
+    for k in "$PRGDIR"/lib/*.jar
+    do
+        _classpath="${_classpath}:${k}"
+    done
+fi
+
+java -Xms512m -Xmx1024m -classpath "${_classpath}" "$@"

BIN
cppc_py10_project/反编译工具/dex2jar-2.0/lib/antlr-runtime-3.5.jar


BIN
cppc_py10_project/反编译工具/dex2jar-2.0/lib/asm-debug-all-4.1.jar


BIN
cppc_py10_project/反编译工具/dex2jar-2.0/lib/d2j-base-cmd-2.0.jar


BIN
cppc_py10_project/反编译工具/dex2jar-2.0/lib/d2j-jasmin-2.0.jar


BIN
cppc_py10_project/反编译工具/dex2jar-2.0/lib/d2j-smali-2.0.jar


BIN
cppc_py10_project/反编译工具/dex2jar-2.0/lib/dex-ir-2.0.jar


BIN
cppc_py10_project/反编译工具/dex2jar-2.0/lib/dex-reader-2.0.jar


BIN
cppc_py10_project/反编译工具/dex2jar-2.0/lib/dex-reader-api-2.0.jar


BIN
cppc_py10_project/反编译工具/dex2jar-2.0/lib/dex-tools-2.0.jar


BIN
cppc_py10_project/反编译工具/dex2jar-2.0/lib/dex-translator-2.0.jar


BIN
cppc_py10_project/反编译工具/dex2jar-2.0/lib/dex-writer-2.0.jar


BIN
cppc_py10_project/反编译工具/dex2jar-2.0/lib/dx-1.7.jar


BIN
cppc_py10_project/反编译工具/美团.zip


+ 27 - 0
python_scripts/批量执行每日数据获取脚本.py

@@ -0,0 +1,27 @@
+# -*- codeing = utf-8 -*-
+# @Time : 2022/6/16 13:21
+# @Author : Clown
+# @File : 批量执行每日数据获取脚本.py
+# @Software : PyCharm
+
+import os
+import threading
+import time
+
+def run_script(script_name):
+    os.system(f'python {script_name}')
+
+if __name__ == '__main__':
+    start_time = time.time()
+    ts = []
+    script_names = ['']
+    for script_name in script_names:
+        t = threading.Thread(target=run_script,args=script_name)
+        t.start()
+        ts.append(t)
+    for t in ts:
+        t.join()
+    end_time = time.time() -start_time
+    print(f'执行完毕,耗时{end_time/60}min')
+
+

+ 104 - 0
python_scripts/食亨菜单导出.py

@@ -0,0 +1,104 @@
+# Author:Clown
+# -*- codeing = utf-8 -*-
+# @Time :2022/3/16 14:17
+# @File: 食亨菜单导出.py
+
+
+import requests
+import pandas as pd
+import time
+import xlrd
+from datetime import date, timedelta
+import os
+import shutil
+
+def submit(startTime,endTime,headers,brandId):
+    url_submit = "https://bi.shihengtech.com/api/excel/order/detail/export/submit"
+    params_submit = {
+            "brandId":brandId,
+            "endTime":endTime,
+            "labelIds":[],
+            "orderStatusEnum":"VALID",
+            "startTime":startTime,
+            "platforms":[0,1],
+            "provinces":None,
+            "cities":None,
+            "shopIds":None,
+            "taskBizTypeEnum":"ORDER_DETAIL_DETAIL"}
+    resp_submit = requests.post(url_submit,json = params_submit,headers = headers)
+    if resp_submit.json()['code'] == 200:
+        submit_result = 1
+        print("成功提交请求")
+        return submit_result
+    else:
+        submit_result = 0
+        print("请求失败")
+        return submit_result
+
+def queryTasks(headers):
+    url_queryTasks = "https://bi.shihengtech.com/api/shtask/queryTasks"
+    params_queryTasks = {
+        "pageNo":1,
+        "pageSize":20
+    }
+    resp_queryTasks = requests.post(url_queryTasks,json = params_queryTasks,headers = headers)
+    data_queryTasks = resp_queryTasks.json()['result']['result']
+    df_link = data_queryTasks[0]["resultUrl"]
+    df_name = data_queryTasks[0]["name"]
+    return  df_link,df_name
+
+def excel2parts(excel_file,save_path):
+    # 打开excel文件
+    for a,b,files in os.walk(excel_file,topdown = False):
+        for file in files:
+            path = str(excel_file)+'/'+str(file)
+            workbook=xlrd.open_workbook(r'%s'%str(path))
+            sheet_names=workbook.sheet_names()
+            print(file, '正在拆分')
+            for worksheet_name in sheet_names:
+                data_xls=pd.read_excel(path,worksheet_name,dtype=str)
+                data_xls.to_excel(save_path+'/'+str(file)[:-5]+worksheet_name+'.xlsx',index=0,encoding='utf-8-sig')
+                print(file, worksheet_name, '已拆出')
+
+if __name__ == '__main__':
+    startTime = (date.today() + timedelta(days=-1)).strftime("%Y-%m-%d")
+    endTime = (date.today() + timedelta(days=-1)).strftime("%Y-%m-%d")
+    save_path = r'C:\Users\浆小白_何\Desktop\订单详情'
+    out_path = r'C:\Users\浆小白_何\Desktop\订单明细拆分'
+    brandId = '102073'#浆小白
+    user_token = "eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ7XCJ1c2VySWRcIjoyNDYyfSIsImV4cCI6MTY0ODAxNjI5MH0.jTbLT1MrLzyBleTp5jZjnvJzXG7NqSgo5ve_csbXohofdpXyvdxIpZE4POl3jp80T4wqHDwMHGglzfcvze4Byg"
+    # save_path = r'C:\Users\浆小白_何\Desktop\订单详情粥'
+    # out_path  = r'C:\Users\浆小白_何\Desktop\订单明细拆分粥'
+    # brandId = '105541'#粥小鲜
+    # user_token = "eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ7XCJ1c2VySWRcIjo1MDAyfSIsImV4cCI6MTY0ODA4NzY1NX0.BgZuyoVkZU5y732blbRKmx9oswPUBnNqZJPk_34VxbFEJJlpyzEvoReaVMcXx-H0qJP8_Ry52CaE6uRscNzGhg"
+    Cookie = "_ga=GA1.2.725502531.1618630729; " \
+             "Hm_lvt_eaa57ca47dacb4ad4f5a257001a3457c=1625040492,1625123277,1625293351,1625448933; " \
+             "_gid=GA1.2.296614433.1647229990; " \
+             "acw_tc=76b20f6a16474114899837204e57f03f3766bf1b4d60819fca83da136ed7e6; " \
+             "user-token=%s; " % str(user_token) + "_gat_gtag_UA_127759150_3=1"
+    headers = {
+        "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.51 Safari/537.36",
+        "Content-Type": "application/json;charset=UTF-8",
+        "Accept": "application/json",
+        "Accept-Encoding": "gzip, deflate, br",
+        "user-token": user_token,
+        "Cookie": Cookie}
+    shutil.rmtree(save_path)
+    os.mkdir(save_path)
+    print('已清空文件夹')
+    if submit(startTime, endTime, headers,brandId) == 1 :#提交请求成功执信
+        s = 2
+        df_link,df_name = queryTasks(headers)
+        while df_link == None:
+            time.sleep(2)
+            print("\rloading %d"%(s),end='')
+            s += 2
+            df_link, df_name = queryTasks(headers)
+        df_data = requests.get(df_link).content
+        with open(save_path+r'/%s.xlsx' % str(df_name),mode='wb') as f:
+            f.write(df_data)
+        print("\n",df_name,'下载成功')
+        excel2parts(save_path, out_path)
+
+    else:
+        print("有未知错误,请检查")