McareCrackCheck.swift 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. //
  2. // McareCrackCheck.swift
  3. // MCareSwift
  4. //
  5. // Created by heesungkim on 2017. 2. 14..
  6. // Copyright © 2017년 idatabank. All rights reserved.
  7. //
  8. import Foundation
  9. class TGfgWLPFSsedkMjVFwzECGIJlWLmXNHA1:TGfgWLPFSsedkMjVFwzECGIJlWLmXNHAProtocol {
  10. private let bundlePath:String = Bundle.main.bundlePath
  11. public init(){
  12. }
  13. func RrSysWIEJNXJSjLdLYdkUhuSZCTsCzYc() -> String {
  14. var isCrack = false
  15. var result:String = ""
  16. if self.xFpMfiaKAJMDOeAxjLRgTogsUThgmSuV() {
  17. isCrack = true
  18. result = result.appending(", ").appending(CommonConstants.CRACK_CODE_1002)
  19. }
  20. if self.emnbnWQtsROzpyBctpbxmXnFWVnYxWjK() {
  21. isCrack = true
  22. result = result.appending(", ").appending(CommonConstants.CRACK_CODE_1003)
  23. }
  24. if self.oeylBwEWeIBxFIgKTodTecITfvuGKssm() {
  25. isCrack = true
  26. result = result.appending(", ").appending(CommonConstants.CRACK_CODE_1004)
  27. }
  28. if self.EzfgObvemSSLKMuULiAFTLaLdNXhXTGf() {
  29. isCrack = true
  30. result = result.appending(", ").appending(CommonConstants.CRACK_CODE_1005)
  31. }
  32. if isCrack {
  33. result = result.substring(from: result.index(result.startIndex, offsetBy: 2))
  34. }
  35. else {
  36. result = result.appending(CommonConstants.CRACK_CODE_1001)
  37. }
  38. return result
  39. }
  40. func xFpMfiaKAJMDOeAxjLRgTogsUThgmSuV() -> Bool {
  41. let path:String = self.bundlePath.appending("/Info.plist")
  42. let fileInfo:NSDictionary = Bundle.main.infoDictionary! as NSDictionary
  43. let fileManager:FileManager = FileManager.default
  44. var fileAttr:NSDictionary!
  45. do {
  46. fileAttr = try fileManager.attributesOfItem(atPath: path) as NSDictionary
  47. } catch {
  48. }
  49. if fileAttr != nil {
  50. let cSIDArr = ["Si", "gne", "rIde", "ntity"]
  51. let cSID:String = cSIDArr.joined()
  52. if fileInfo.value(forKey: cSID) != nil {
  53. return true
  54. }
  55. }
  56. return false
  57. }
  58. func emnbnWQtsROzpyBctpbxmXnFWVnYxWjK() -> Bool {
  59. let root:Int = Int(getpid())
  60. if root <= 10 {
  61. return true
  62. }
  63. return false
  64. }
  65. func oeylBwEWeIBxFIgKTodTecITfvuGKssm() -> Bool {
  66. let fileExists:Bool = FileManager.default.fileExists(atPath: bundlePath.appending("/_CodeSignature"))
  67. if !fileExists {
  68. return true
  69. }
  70. return false
  71. }
  72. func EzfgObvemSSLKMuULiAFTLaLdNXhXTGf() -> Bool {
  73. let fileExists:Bool = FileManager.default.fileExists(atPath: bundlePath.appending("/_CodeSignature/CodeResources"))
  74. if !fileExists {
  75. return true
  76. }
  77. return false
  78. }
  79. }