@@ -46,8 +46,11 @@ private extension BrightSide {
4646
4747 /// Method will return true, if any of the files or dir, typical for the jailbreak, exists
4848 static func isJailbreakDirectoriesExist( ) -> Bool {
49- let jailbreakDirectories = suspiciousAppsPathToCheck + suspiciousSystemPathsToCheck
50- return jailbreakDirectories. map { FileManager . default. fileExists ( atPath: $0) } . reduce ( false , { $0 || $1 } )
49+ let jailbreakRelativelyFilesAndPaths = suspiciousSystemFiles
50+ + suspiciousAppsDir
51+ + suspiciousSystemDir
52+ return jailbreakRelativelyFilesAndPaths
53+ . allSatisfy ( FileManager . default. fileExists ( atPath: ) )
5154 }
5255
5356 /// Method will return true if we can open cydia package
@@ -67,8 +70,8 @@ private extension BrightSide {
6770
6871// MARK: - Suspicious dir
6972
70- private extension BrightSide {
71-
73+ extension BrightSide {
74+
7275 static var suspiciousAppsDir : [ String ] {
7376 return [
7477 " /Applications/Cydia.app " ,
@@ -84,26 +87,31 @@ private extension BrightSide {
8487 " /Applications/WinterBoard.app "
8588 ]
8689 }
87-
90+
8891 static var suspiciousSystemDir : [ String ] {
8992 return [
90- " /Library/MobileSubstrate/DynamicLibraries/LiveClock.plist " ,
91- " /Library/MobileSubstrate/DynamicLibraries/Veency.plist " ,
9293 " /private/var/lib/apt " ,
9394 " /private/var/lib/apt/ " ,
9495 " /private/var/lib/cydia " ,
9596 " /private/var/mobile/Library/SBSettings/Themes " ,
9697 " /private/var/stash " ,
97- " /private/var/tmp/cydia.log " ,
98- " /System/Library/LaunchDaemons/com.ikey.bbot.plist " ,
99- " /System/Library/LaunchDaemons/com.saurik.Cydia.Startup.plist " ,
10098 " /usr/bin/sshd " ,
10199 " /usr/libexec/sftp-server " ,
102100 " /usr/sbin/sshd " ,
103101 " /etc/apt " ,
104- " /bin/bash " ,
102+ " /bin/bash "
103+ ]
104+ }
105+
106+ static var suspiciousSystemFiles : [ String ] {
107+ return [
108+ " /Library/MobileSubstrate/DynamicLibraries/LiveClock.plist " ,
109+ " /Library/MobileSubstrate/DynamicLibraries/Veency.plist " ,
110+ " /private/var/tmp/cydia.log " ,
111+ " /System/Library/LaunchDaemons/com.ikey.bbot.plist " ,
112+ " /System/Library/LaunchDaemons/com.saurik.Cydia.Startup.plist " ,
105113 " /Library/MobileSubstrate/MobileSubstrate.dylib "
106114 ]
107115 }
108-
116+
109117}
0 commit comments