- 5月前1 #
- 5月前2 #
檢測越狱的電话就像檢查
/private/var/lib/apt/
的存在一樣容易。 夹.尽管這不能檢測到仅安裝程式的使用者,但是到目前為止,大多數使用者已经安裝了Cydia,Icy或RockyourPhone(所有這些都使用apt)要檢測盗版使用者,最簡單的方法是檢查是否存在
SignerIdentity
键入應用程式的"Info.plist
" .由於高級饼干可以轻松找到標準的[[[NSBundle mainBundle] infoDictionary] objectForKey: @"SignerIdentity"]
檢查,最好使用可通過#import <objc/runtime.h>
获得的Objective C執行時来掩盖這些呼叫 或使用替代等效項。 - 5月前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.
- 5月前4 #
要擴充套件上述yonel和Benjie的評論:
1)Landon Fuller依靠加密檢查的方法(上面由yonel鏈接)似乎是唯一仍未被自動破解工具击败的方法.我不会為Apple很快更改LC_ENCRyPTION_INFO標頭的狀態而過分担心.它似乎確實對越狱的iPhone产生了一些不可預測的影响(即使使用者购买了副本...)
無論如何,我不会基於该代碼對使用者采取任何轻率的行動...
2)為了補充本杰的評論.混淆(處理反盗版代碼中的任何字元串值時绝對必要):一種類似但甚至更簡單的方法是始终檢查该版本的salttedhashed版本 您想要的value.例如(即使该檢查不再有效),您仍要根据適当的常量將每个MainBundle的键名作為md5(keyName +" some secret salt")进行檢查.字元串。
当然,這要求您能够間接查詢要比较的值(例如,通過包含它的陣列).但這是最常见的情况。
相似問題
- iphone:如何在iOS的MKAnnotation中添加更多详细資訊iphoneobjectiveciosmkannotation2021-01-12 01:29
- objective c:在iPhone上查詢已安裝應用的列表iphoneobjectivecios2021-01-11 06:27
- iphone:如何排序包含NSDictionaries的NSArray?iphoneobjectiveciosnsarraynsdictionary2021-01-10 21:25
- objective c:仅限某些iOS目標設備进行App Store提交iosobjectiveciphoneappstore2021-01-11 03:24
- objective c:如何从iPhone應用程式發送郵件而不顯示MFMailComposeViewController?iphoneobjectiveciossendmailmfmailcomposeviewcontroller2021-01-10 20:28
這是檢測您的應用程式是否被破解的方法之一。
簡而言之:破解通常需要更改Info.plist.由於它是您可以訪問的常規檔案,因此很容易確定此類更改。