npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

cordova-plugin-verityapksignature

v0.0.5

Published

Android验证apk签名;iOS重签名检测

Downloads

2

Readme

cordova-plugin-verityapksignature

安全修复的 Cordova 插件,包含的功能有:1. Android 下载 apk 安装包后验证其签名; 2. iOS 验证 bundleId 是否被篡改; 3. 检测 iOS 网络代理

支持平台

  • Android
  • iOS

安装插件


# 通过 npm 安装插件

cordova plugin cordova-plugin-verityapksignature

# 通过 github 安装

cordova plugin add https://github.com/HZYou/cordova-plugin-verityapksignature.git

# 通过本地文件路径安装

cordova plugin add 文件路径

说明: ionic 项目命令前加上 ionic,即 ionic cordova plugin xxxxx

API Reference

  • verityAppIsValid : function
  • isProxy : function

VerityApkSignature.verityApkSignature(packageName,apkPath,successCallback,errorCallback)

Android 校验下载的 apk 包的签名与已知的包是否相同;iOS 校验 bundle ID 是否被篡改

Supported Platforms

  • Android
  • iOS

参数说明

  1. packageName: Android 已安装应用的包名 / iOS 的 BundleID

  2. apkPath: Android: 下载 apk 存放的路径,Android 9 请使用内部存储(getExternalFilesDir); / iOS 此参数忽略

  3. successCallback: 成功回调

  4. errorCallback: 失败回调

  5. successCallback 的结果: {valid:boolean|1|0}

Example

declare const VerityApkSignature;
/**
  * 验证包是否被篡改
  * @param packageName 安卓包名/iOS bundleID
  * @param apkPath 安卓下载包存放的路径
  * @returns
  */
 verityAppIsValid(packageName: string, apkPath?: string) {
   return new Promise((resolve, reject) => {
     VerityApkSignature.verityApkSignature(packageName, apkPath, (res) => {
       resolve(res)
       // android res:{valid:true}
       // ios: {valid: 1}
     }, (e) => {
       reject(e)
     })
   })
 }

VerityApkSignature.isProxy()

检测 iOS 是否代理网络

Supported Platforms

  • iOS

Example

declare const VerityApkSignature;

isProxyIos(){
  return new Promise((resolve, reject) => {
    VerityApkSignature.isProxy(res => resolve(res), e =>reject(e))
    // res: {isProxy: 1} or {isProxy: 0}
  })
}

isProxy 暂只支持 iOS。Android 待开发

说明:使用 ts 进行开发时,需要在文件上变声明下 declare const VerityApkSignature;