|
@@ -9,7 +9,7 @@
|
|
|
import Foundation
|
|
|
import MCareFramework
|
|
|
|
|
|
-class McareCrackCheck {
|
|
|
+class TGfgWLPFSsedkMjVFwzECGIJlWLmXNHA {
|
|
|
|
|
|
private let bundlePath:String = Bundle.main.bundlePath
|
|
|
private var mcareLog:MCareLogger?
|
|
@@ -18,43 +18,54 @@ class McareCrackCheck {
|
|
|
mcareLog = MCareLogger.sharedInstance()
|
|
|
}
|
|
|
|
|
|
- func isCrack() -> String {
|
|
|
+ func RrSysWIEJNXJSjLdLYdkUhuSZCTsCzYc() -> String {
|
|
|
|
|
|
var isCrack = false
|
|
|
var result:String = ""
|
|
|
|
|
|
- if self.checkInfoFile() {
|
|
|
+ if self.xFpMfiaKAJMDOeAxjLRgTogsUThgmSuV() {
|
|
|
isCrack = true
|
|
|
- result = result.appending(", ").appending(CommonConstants.CRACK_CODE_1002)
|
|
|
+ result = result.appending(", ").appending(McareConstants.CRACK_CODE_1002)
|
|
|
}
|
|
|
|
|
|
- if self.checkPid() {
|
|
|
+ if self.emnbnWQtsROzpyBctpbxmXnFWVnYxWjK() {
|
|
|
isCrack = true
|
|
|
- result = result.appending(", ").appending(CommonConstants.CRACK_CODE_1003)
|
|
|
+ result = result.appending(", ").appending(McareConstants.CRACK_CODE_1003)
|
|
|
}
|
|
|
|
|
|
- if self.checkPiratNameCodeSignature() {
|
|
|
+ if self.oeylBwEWeIBxFIgKTodTecITfvuGKssm() {
|
|
|
isCrack = true
|
|
|
- result = result.appending(", ").appending(CommonConstants.CRACK_CODE_1004)
|
|
|
+ result = result.appending(", ").appending(McareConstants.CRACK_CODE_1004)
|
|
|
}
|
|
|
|
|
|
- if self.checkPiratNameCodeResource() {
|
|
|
+ if self.EzfgObvemSSLKMuULiAFTLaLdNXhXTGf() {
|
|
|
isCrack = true
|
|
|
- result = result.appending(", ").appending(CommonConstants.CRACK_CODE_1005)
|
|
|
+ result = result.appending(", ").appending(McareConstants.CRACK_CODE_1005)
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
+ // if self.checkInfoFileDate() {
|
|
|
+ // isCrack = true
|
|
|
+ // result = result.appending(", ").appending(McareConstants.CRACK_CODE_1006)
|
|
|
+ // }
|
|
|
+ //
|
|
|
+ // if self.checkAppNameDate() {
|
|
|
+ // isCrack = true
|
|
|
+ // result = result.appending(", ").appending(McareConstants.CRACK_CODE_1007)
|
|
|
+ // }
|
|
|
+
|
|
|
if isCrack {
|
|
|
result = result.substring(from: result.index(result.startIndex, offsetBy: 2))
|
|
|
}
|
|
|
else {
|
|
|
- result = result.appending(CommonConstants.CRACK_CODE_1001)
|
|
|
+ result = result.appending(McareConstants.CRACK_CODE_1001)
|
|
|
}
|
|
|
|
|
|
return result
|
|
|
}
|
|
|
|
|
|
- func checkInfoFile() -> Bool {
|
|
|
+ func xFpMfiaKAJMDOeAxjLRgTogsUThgmSuV() -> Bool {
|
|
|
let path:String = self.bundlePath.appending("/Info.plist")
|
|
|
+
|
|
|
let fileInfo:NSDictionary = Bundle.main.infoDictionary! as NSDictionary
|
|
|
let fileManager:FileManager = FileManager.default
|
|
|
var fileAttr:NSDictionary!
|
|
@@ -73,31 +84,92 @@ class McareCrackCheck {
|
|
|
return true
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
return false
|
|
|
}
|
|
|
|
|
|
- func checkPid() -> Bool {
|
|
|
+ func emnbnWQtsROzpyBctpbxmXnFWVnYxWjK() -> Bool {
|
|
|
+
|
|
|
let root:Int = Int(getpid())
|
|
|
+
|
|
|
if root <= 10 {
|
|
|
return true
|
|
|
}
|
|
|
+
|
|
|
return false
|
|
|
}
|
|
|
|
|
|
- func checkPiratNameCodeSignature() -> Bool {
|
|
|
+ func oeylBwEWeIBxFIgKTodTecITfvuGKssm() -> Bool {
|
|
|
+
|
|
|
let fileExists:Bool = FileManager.default.fileExists(atPath: bundlePath.appending("/_CodeSignature"))
|
|
|
+
|
|
|
if !fileExists {
|
|
|
return true
|
|
|
}
|
|
|
+
|
|
|
return false
|
|
|
}
|
|
|
|
|
|
- func checkPiratNameCodeResource() -> Bool {
|
|
|
+ func EzfgObvemSSLKMuULiAFTLaLdNXhXTGf() -> Bool {
|
|
|
+
|
|
|
let fileExists:Bool = FileManager.default.fileExists(atPath: bundlePath.appending("/_CodeSignature/CodeResources"))
|
|
|
+
|
|
|
if !fileExists {
|
|
|
return true
|
|
|
}
|
|
|
+
|
|
|
return false
|
|
|
}
|
|
|
|
|
|
+ // func checkInfoFileDate() -> Bool {
|
|
|
+ //
|
|
|
+ // let infoPath:String = self.bundlePath.appending("/Info.plist")
|
|
|
+ // var infoModifiedDate:Date? = nil
|
|
|
+ // var pkgModifiedDate:Date? = nil
|
|
|
+ // do {
|
|
|
+ // infoModifiedDate = try FileManager.default.attributesOfItem(atPath: infoPath)[FileAttributeKey.modificationDate] as? Date
|
|
|
+ // } catch {
|
|
|
+ // mcareLog?.error(output: "infoModifiedDate Error")
|
|
|
+ // }
|
|
|
+ //
|
|
|
+ // do {
|
|
|
+ // pkgModifiedDate = try FileManager.default.attributesOfItem(atPath: (Bundle.main.resourcePath?.appending("/PkgInfo"))!)[FileAttributeKey.modificationDate] as? Date
|
|
|
+ // } catch {
|
|
|
+ // mcareLog?.error(output: "pkgModifiedDate Error")
|
|
|
+ // }
|
|
|
+ //
|
|
|
+ // if fabs(infoModifiedDate!.timeIntervalSinceReferenceDate - pkgModifiedDate!.timeIntervalSinceReferenceDate) > 600 {
|
|
|
+ // return true
|
|
|
+ // }
|
|
|
+ //
|
|
|
+ // return true
|
|
|
+ // }
|
|
|
+ //
|
|
|
+ // func checkAppNameDate() -> Bool {
|
|
|
+ // let infoPath:String = self.bundlePath.appending("/mcare-pnuh")
|
|
|
+ // mcareLog?.error(output: infoPath)
|
|
|
+ // var infoModifiedDate:Date? = nil
|
|
|
+ // var pkgModifiedDate:Date? = nil
|
|
|
+ //
|
|
|
+ // do {
|
|
|
+ // infoModifiedDate = try FileManager.default.attributesOfItem(atPath: infoPath)[FileAttributeKey.modificationDate] as? Date
|
|
|
+ // } catch {
|
|
|
+ // mcareLog?.error(output: "infoModifiedDate Error")
|
|
|
+ // return false
|
|
|
+ // }
|
|
|
+ //
|
|
|
+ // do {
|
|
|
+ // pkgModifiedDate = try FileManager.default.attributesOfItem(atPath: (Bundle.main.resourcePath?.appending("/PkgInfo"))!)[FileAttributeKey.modificationDate] as? Date
|
|
|
+ // } catch {
|
|
|
+ // mcareLog?.error(output: "pkgModifiedDate Error")
|
|
|
+ // return false
|
|
|
+ // }
|
|
|
+ //
|
|
|
+ // if fabs(infoModifiedDate!.timeIntervalSinceReferenceDate - pkgModifiedDate!.timeIntervalSinceReferenceDate) > 600 {
|
|
|
+ // return true
|
|
|
+ // }
|
|
|
+ //
|
|
|
+ // return true
|
|
|
+ // }
|
|
|
+
|
|
|
}
|