首页>Program>source

您如何(以编程方式)确定iPhone / iPod是否为:

  1. 越狱
  2. 运行软件的破解副本

Pinch Media 可以检测电话是否被牢牢破坏或软件运行被破解,有人知道吗 他们这样做吗? 有图书馆吗?

最新回答
  • 2021-1-10
    1 #

    这是检测您的应用程序是否被破解的方法之一。

    简而言之:破解通常需要更改Info.plist.由于它是您可以访问的常规文件,因此很容易确定此类更改。

  • 2021-1-10
    2 #

    检测越狱的电话就像检查 /private/var/lib/apt/的存在一样容易。 夹.尽管这不能检测到仅安装程序的用户,但是到目前为止,大多数用户已经安装了Cydia,Icy或RockyourPhone(所有这些都使用apt)

    要检测盗版用户,最简单的方法是检查是否存在 SignerIdentity 键入应用程序的" Info.plist" .由于高级饼干可以轻松找到标准的 [[[NSBundle mainBundle] infoDictionary] objectForKey: @"SignerIdentity"] 检查,最好使用可通过 #import <objc/runtime.h>获得的Objective C运行时来掩盖这些调用 或使用替代等效项。

  • 2021-1-10
    3 #

    仅需扩展zakovyrya的回复即可,您可以使用以下代码:

    if ([[[NSBundle mainBundle] infoDictionary] objectForKey: @"SignerIdentity"] != nil) {
      // Jailbroken
    }
    

    但是,越狱您的应用程序的人可以对您的程序进行hexedit,因此,他们可以编辑字符串@" SignerIdentity"来读取@" siNGeridentity"或其他将返回nil并通过的东西。

    因此,如果您使用此方法(或http://thwart-ipa-cracks.blogspot.com/2008/11/detection.html中的任何其他建议):

      Don't expect it to work forever

      Don't use this information to break/hinder your app in any way (otherwise they'll have cause to hexedit it, so your app won't know it is jailbroken)

      Probably wise to obfuscate this bit of the code. For example, you could put the base64 encoded reversed string in your code, and then decode it in the app by reversing the process.

      Validate your validation later in your code (e.g. when I said SignerIdentity, did it actually say SignerIdentity or siNGeridentity?)

      Don't tell people on a public website like stackoverflow how you do it

      Keep in mind it is only a guide and is not fool-proof (nor cracker-proof!) - with great power comes great responsibility.

  • 2021-1-10
    4 #

    要扩展上述yonel和Benjie的评论:

    1)Landon Fuller依靠加密检查的方法(上面由yonel链接)似乎是唯一仍未被自动破解工具击败的方法.我不会为Apple很快更改LC_ENCRyPTION_INFO标头的状态而过分担心.它似乎确实对越狱的iPhone产生了一些不可预测的影响(即使用户购买了副本...)

    无论如何,我不会基于该代码对用户采取任何轻率的行动...

    2)为了补充本杰的评论.混淆(处理反盗版代码中的任何字符串值时绝对必要):一种类似但甚至更简单的方法是始终检查该版本的salttedhashed版本 您想要的value.例如(即使该检查不再有效),您仍要根据适当的常量将每个MainBundle的键名作为md5(keyName +" some secret salt")进行检查.字符串。

    当然,这要求您能够间接查询要比较的值(例如,通过包含它的数组).但这是最常见的情况。

  • 使用jQuery查找元素的类型
  • 单身人士进行单元测试