Skip to content

Commit

Permalink
Update directory name
Browse files Browse the repository at this point in the history
  • Loading branch information
Stampoo committed Mar 18, 2022
1 parent 23efd05 commit a44aa3c
Showing 1 changed file with 20 additions and 12 deletions.
32 changes: 20 additions & 12 deletions Utils/Utils/BrightSide/BrightSide.swift
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,11 @@ private extension BrightSide {

/// Method will return true, if any of the files or dir, typical for the jailbreak, exists
static func isJailbreakDirectoriesExist() -> Bool {
let jailbreakDirectories = suspiciousAppsPathToCheck + suspiciousSystemPathsToCheck
return jailbreakDirectories.map { FileManager.default.fileExists(atPath: $0) }.reduce(false, { $0 || $1 })
let jailbreakRelativelyFilesAndPaths = suspiciousSystemFiles
+ suspiciousAppsDir
+ suspiciousSystemDir
return jailbreakRelativelyFilesAndPaths
.allSatisfy(FileManager.default.fileExists(atPath:))
}

/// Method will return true if we can open cydia package
Expand All @@ -67,8 +70,8 @@ private extension BrightSide {

// MARK: - Suspicious dir

private extension BrightSide {
extension BrightSide {

static var suspiciousAppsDir: [String] {
return [
"/Applications/Cydia.app",
Expand All @@ -84,26 +87,31 @@ private extension BrightSide {
"/Applications/WinterBoard.app"
]
}

static var suspiciousSystemDir: [String] {
return [
"/Library/MobileSubstrate/DynamicLibraries/LiveClock.plist",
"/Library/MobileSubstrate/DynamicLibraries/Veency.plist",
"/private/var/lib/apt",
"/private/var/lib/apt/",
"/private/var/lib/cydia",
"/private/var/mobile/Library/SBSettings/Themes",
"/private/var/stash",
"/private/var/tmp/cydia.log",
"/System/Library/LaunchDaemons/com.ikey.bbot.plist",
"/System/Library/LaunchDaemons/com.saurik.Cydia.Startup.plist",
"/usr/bin/sshd",
"/usr/libexec/sftp-server",
"/usr/sbin/sshd",
"/etc/apt",
"/bin/bash",
"/bin/bash"
]
}

static var suspiciousSystemFiles: [String] {
return [
"/Library/MobileSubstrate/DynamicLibraries/LiveClock.plist",
"/Library/MobileSubstrate/DynamicLibraries/Veency.plist",
"/private/var/tmp/cydia.log",
"/System/Library/LaunchDaemons/com.ikey.bbot.plist",
"/System/Library/LaunchDaemons/com.saurik.Cydia.Startup.plist",
"/Library/MobileSubstrate/MobileSubstrate.dylib"
]
}

}

0 comments on commit a44aa3c

Please sign in to comment.