McareCrackCheck2.swift 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  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 TGfgWLPFSsedkMjVFwzECGIJlWLmXNHA2:TGfgWLPFSsedkMjVFwzECGIJlWLmXNHAProtocol {
  10. private var obf:Obfuscator = Obfuscator(withSalt: ["mcareplus" as AnyObject])
  11. private let bundlePath:String = Bundle.main.bundlePath
  12. public init(){
  13. }
  14. func RrSysWIEJNXJSjLdLYdkUhuSZCTsCzYc() -> String {
  15. var isCrack = false
  16. var result:String = ""
  17. if self.xFpMfiaKAJMDOeAxjLRgTogsUThgmSuV() {
  18. isCrack = true
  19. result = result.appending(", ").appending(CommonConstants.CRACK_CODE_1002)
  20. }
  21. if self.emnbnWQtsROzpyBctpbxmXnFWVnYxWjK() {
  22. isCrack = true
  23. result = result.appending(", ").appending(CommonConstants.CRACK_CODE_1003)
  24. }
  25. if self.oeylBwEWeIBxFIgKTodTecITfvuGKssm() {
  26. isCrack = true
  27. result = result.appending(", ").appending(CommonConstants.CRACK_CODE_1004)
  28. }
  29. if self.EzfgObvemSSLKMuULiAFTLaLdNXhXTGf() {
  30. isCrack = true
  31. result = result.appending(", ").appending(CommonConstants.CRACK_CODE_1005)
  32. }
  33. if isCrack {
  34. result = result.substring(from: result.index(result.startIndex, offsetBy: 2))
  35. }
  36. else {
  37. result = result.appending(CommonConstants.CRACK_CODE_1001)
  38. }
  39. return result
  40. }
  41. func xFpMfiaKAJMDOeAxjLRgTogsUThgmSuV() -> Bool {
  42. let path:String = self.bundlePath.appending(obf.reveal(key:[116, 36, 13, 7, 29, 75, 0, 0, 28, 0, 41]))
  43. let fileInfo:NSDictionary = Bundle.main.infoDictionary! as NSDictionary
  44. let fileManager:FileManager = FileManager.default
  45. var fileAttr:NSDictionary!
  46. do {
  47. fileAttr = try fileManager.attributesOfItem(atPath: path) as NSDictionary
  48. } catch {
  49. }
  50. if fileAttr != nil {
  51. let cSIDArr = [obf.reveal(key:[8, 4]), obf.reveal(key:[60, 3, 6]), obf.reveal(key:[41, 36, 7, 4]), obf.reveal(key:[53, 25, 10, 21, 11])]
  52. let cSID:String = cSIDArr.joined()
  53. if fileInfo.value(forKey: cSID) != nil {
  54. return true
  55. }
  56. }
  57. return false
  58. }
  59. func emnbnWQtsROzpyBctpbxmXnFWVnYxWjK() -> Bool {
  60. let root:Int = Int(getpid())
  61. if root <= 10 {
  62. return true
  63. }
  64. return false
  65. }
  66. func oeylBwEWeIBxFIgKTodTecITfvuGKssm() -> Bool {
  67. let fileExists:Bool = FileManager.default.fileExists(atPath: bundlePath.appending(obf.reveal(key:[116, 50, 32, 14, 22, 0, 35, 5, 18, 29, 60, 47, 24, 17, 4])))
  68. if !fileExists {
  69. return true
  70. }
  71. return false
  72. }
  73. func EzfgObvemSSLKMuULiAFTLaLdNXhXTGf() -> Bool {
  74. let fileExists:Bool = FileManager.default.fileExists(atPath: bundlePath.appending(obf.reveal(key:[116, 50, 32, 14, 22, 0, 35, 5, 18, 29, 60, 47, 24, 17, 4, 93, 38, 31, 8, 16, 33, 56, 40, 2, 22, 19, 17, 0, 3])))
  75. if !fileExists {
  76. return true
  77. }
  78. return false
  79. }
  80. }