Giter VIP home page Giter VIP logo

guoyu07 / ios-private-api-checker Goto Github PK

View Code? Open in Web Editor NEW

This project forked from neteasegame/ios-private-api-checker

0.0 0.0 0.0 35.73 MB

iOS-private-api-checker 苹果iOS私有API检查工具 Developer tool to scan iOS apps for private API usage before submitting to Apple

Home Page: https://github.com/hustcc/iOS-private-api-checker

License: GNU General Public License v2.0

Python 89.73% CSS 1.96% JavaScript 7.43% HTML 0.88%

ios-private-api-checker's Introduction

iOS私有API检查工具

私有API检查的原因在于:苹果在app提审的时候,会检查app使用私有api的情况,对于使用了私有api的app,不予通过,这个工具的目地就是在提审之前检查一下,提高通过率。

PS:代码写的一般,主要是在做工具功能,欢迎PR。

一、功能

目前功能主要有以下:

  1. 从ipa中提取一些基本信息,例如app名字,sdk版本,包名等,可以辅助QA日常工作。
  2. ipa架构检查,可以看出是否支持64位架构,可以辅助AppStore提审。
  3. ipa使用私有api情况,可以辅助AppStore提审。
  4. ipa info和provision配置项的检查,获得授权设备udid(参考项目iOS-checkIPA)。
  5. 获取签名信息。
  6. 批量检查APP,并生成excel报告,截图见下方。

二、如何使用

1. 构建私有api库

  • db/dsidx_dbs.py文件为解析docSet.dsidx的库,请实现将docSet.dsidx内容导出到sqlite中。docSet.dsidx是xcode作为代码提示的数据库,表示是apple公开的公有api。

  • 修改config.py中sdks_config字典,增加各个version的sdk路径,然后运行build_api_db.py,会自动解析私有api,存存储到sqlite中。

  • (项目中的数据库内容是我编译sdk7.0的数据,可以直接用。)

2. 检查ipa私有api

运行方式有二,建议第二种web方式:

  1. 修改iOS_private.py main方法中的ipa路径,运行即可。

  2. 使用Web上传运行的方式,运行python run_web.py(请先配置flask运行环境),然后浏览器输入127.0.0.1:9527 将ipa拖入上传框等待即可看到检查结果。

  3. 使用batch_check方法批量运行目录中的ipa,并生成excel报告。

三、Screenshot

  • 网页检查展示

web_screenshot

  • 批量检测生成excel报告概要

excel_report_outline

  • excel报告详细页

excel_report_detail

四、参考项目

五、Note

  1. 私有的api = (class-dump Framework下的库生成的头文件中的api - (Framework下的头文件里的api = 有文档的api + 没有文档的api)) + PrivateFramework下的api
  2. 私有api在公开的Framework及私有的PrivateFramework都有。
  3. 请暂时暂mac上运行,linux上暂时没有找到合适的、代替otool的工具,求推荐^^!

License

This code is distributed under the terms and conditions of the GPL v2 license.

ios-private-api-checker's People

Contributors

hustcc avatar uniwang avatar bensonhome avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.