From 20f4a21e2a8e489b5e859a11ad76f77582f6650b Mon Sep 17 00:00:00 2001
From: JLChen <551775569@qq.com>
Date: 星期五, 08 一月 2021 10:23:26 +0800
Subject: [PATCH] 2021-01-08 1.IOS越狱检测库,移植打包成DLL

---
 .gitignore                                                                              |  196 +++++++++++++++
 libJailBreak.a                                                                          |    0 
 JLJailBreak.dll                                                                         |    0 
 JLJailBreakXamarin/JLJailBreak/JLJailBreak/Structs.cs                                   |    6 
 JailBreak/JailBreak.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist |    8 
 JLJailBreakXamarin/JLJailBreak/JLJailBreak/lib/libJailBreak.a                           |    0 
 JLJailBreakXamarin/JLJailBreak/JLJailBreak.sln                                          |   17 +
 JLJailBreakXamarin/JLJailBreak/JLJailBreak/ApiDefinition.cs                             |   21 +
 JailBreak/JailBreak.xcodeproj/project.pbxproj                                           |  291 ++++++++++++++++++++++
 JLJailBreakXamarin/JLJailBreak/JLJailBreak/Properties/AssemblyInfo.cs                   |   34 ++
 JLJailBreakXamarin/JLJailBreak/JLJailBreak/JLJailBreak.csproj                           |   56 ++++
 JailBreak/JailBreak/JLJailBreak.h                                                       |   18 +
 JailBreak/JailBreak.xcodeproj/project.xcworkspace/contents.xcworkspacedata              |    7 
 JailBreak/JailBreak/JLJailBreak.m                                                       |  116 ++++++++
 14 files changed, 770 insertions(+), 0 deletions(-)

diff --git a/.gitignore b/.gitignore
index a3cd143..8005e27 100644
--- a/.gitignore
+++ b/.gitignore
@@ -24,3 +24,199 @@
 # http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control
 #
 # Pods/
+
+## Ignore Visual Studio temporary files, build results, and
+## files generated by popular Visual Studio add-ons.
+
+# User-specific files
+*.suo
+*.user
+*.sln.docstates
+
+# Build results
+[Dd]ebug/
+[Dd]ebugPublic/
+[Rr]elease/
+[Rr]eleases/
+x64/
+build/
+bld/
+[Bb]in/
+[Oo]bj/
+.vs/
+.gitignore
+packages/
+ZigBee.Ios/
+ZigBee.Droid/
+Shared.IOS/
+.DS_Store
+.gitignore
+
+# Roslyn cache directories
+*.ide/
+
+# MSTest test Results
+[Tt]est[Rr]esult*/
+[Bb]uild[Ll]og.*
+
+#NUNIT
+*.VisualState.xml
+TestResult.xml
+
+# Build Results of an ATL Project
+[Dd]ebugPS/
+[Rr]eleasePS/
+dlldata.c
+
+*_i.c
+*_p.c
+*_i.h
+*.ilk
+*.meta
+*.obj
+*.pch
+*.pdb
+*.pgc
+*.pgd
+*.rsp
+*.sbr
+*.tlb
+*.tli
+*.tlh
+*.tmp
+*.tmp_proj
+*.log
+*.vspscc
+*.vssscc
+.builds
+*.pidb
+*.svclog
+*.scc
+
+# Chutzpah Test files
+_Chutzpah*
+
+# Visual C++ cache files
+ipch/
+*.aps
+*.ncb
+*.opensdf
+*.sdf
+*.cachefile
+
+# Visual Studio profiler
+*.psess
+*.vsp
+*.vspx
+
+# TFS 2012 Local Workspace
+$tf/
+
+# Guidance Automation Toolkit
+*.gpState
+
+# ReSharper is a .NET coding add-in
+_ReSharper*/
+*.[Rr]e[Ss]harper
+*.DotSettings.user
+
+# JustCode is a .NET coding addin-in
+.JustCode
+
+# TeamCity is a build add-in
+_TeamCity*
+
+# DotCover is a Code Coverage Tool
+*.dotCover
+
+# NCrunch
+_NCrunch_*
+.*crunch*.local.xml
+
+# MightyMoose
+*.mm.*
+AutoTest.Net/
+
+# Web workbench (sass)
+.sass-cache/
+
+# Installshield output folder
+[Ee]xpress/
+
+# DocProject is a documentation generator add-in
+DocProject/buildhelp/
+DocProject/Help/*.HxT
+DocProject/Help/*.HxC
+DocProject/Help/*.hhc
+DocProject/Help/*.hhk
+DocProject/Help/*.hhp
+DocProject/Help/Html2
+DocProject/Help/html
+
+# Click-Once directory
+publish/
+
+# Publish Web Output
+*.[Pp]ublish.xml
+*.azurePubxml
+## TODO: Comment the next line if you want to checkin your
+## web deploy settings but do note that will include unencrypted
+## passwords
+*.pubxml
+
+# NuGet Packages
+packages/*
+*.nupkg
+## TODO: If the tool you use requires repositories.config
+## uncomment the next line
+#!packages/repositories.config
+
+# Enable "build/" folder in the NuGet Packages folder since
+# NuGet packages use it for MSBuild targets.
+# This line needs to be after the ignore of the build folder
+# (and the packages folder if the line above has been uncommented)
+!packages/build/
+
+# Windows Azure Build Output
+csx/
+*.build.csdef
+
+# Windows Store app package directory
+AppPackages/
+
+# Others
+sql/
+*.Cache
+ClientBin/
+[Ss]tyle[Cc]op.*
+~$*
+*~
+*.dbmdl
+*.dbproj.schemaview
+*.pfx
+*.publishsettings
+node_modules/
+
+# RIA/Silverlight projects
+Generated_Code/
+
+# Backup & report files from converting an old project file
+# to a newer Visual Studio version. Backup files are not needed,
+# because we have git ;-)
+_UpgradeReport_Files/
+Backup*/
+UpgradeLog*.XML
+UpgradeLog*.htm
+
+# SQL Server files
+*.mdf
+*.ldf
+
+# Business Intelligence projects
+*.rdl.data
+*.bim.layout
+*.bim_*.settings
+
+# Microsoft Fakes
+FakesAssemblies/
+
diff --git a/JLJailBreak.dll b/JLJailBreak.dll
new file mode 100644
index 0000000..e1956e8
--- /dev/null
+++ b/JLJailBreak.dll
Binary files differ
diff --git a/JLJailBreakXamarin/JLJailBreak/JLJailBreak.sln b/JLJailBreakXamarin/JLJailBreak/JLJailBreak.sln
new file mode 100644
index 0000000..cbc9f2a
--- /dev/null
+++ b/JLJailBreakXamarin/JLJailBreak/JLJailBreak.sln
@@ -0,0 +1,17 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 15
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "JLJailBreak", "JLJailBreak\JLJailBreak.csproj", "{1711F8FA-D53D-4D11-AC0D-F83FD903AE18}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Any CPU = Debug|Any CPU
+		Release|Any CPU = Release|Any CPU
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{1711F8FA-D53D-4D11-AC0D-F83FD903AE18}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{1711F8FA-D53D-4D11-AC0D-F83FD903AE18}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{1711F8FA-D53D-4D11-AC0D-F83FD903AE18}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{1711F8FA-D53D-4D11-AC0D-F83FD903AE18}.Release|Any CPU.Build.0 = Release|Any CPU
+	EndGlobalSection
+EndGlobal
diff --git a/JLJailBreakXamarin/JLJailBreak/JLJailBreak/ApiDefinition.cs b/JLJailBreakXamarin/JLJailBreak/JLJailBreak/ApiDefinition.cs
new file mode 100644
index 0000000..ff21c1a
--- /dev/null
+++ b/JLJailBreakXamarin/JLJailBreak/JLJailBreak/ApiDefinition.cs
@@ -0,0 +1,21 @@
+锘縰sing System;
+
+using ObjCRuntime;
+using Foundation;
+using UIKit;
+
+namespace JLJailBreak
+{
+    // @interface JLJailBreak : NSObject
+    [BaseType(typeof(NSObject))]
+    interface JLJailBreak
+    {
+        // +(BOOL)isJailBreak;
+        [Static]
+        [Export("isJailBreak")]
+        //[Verify(MethodToProperty)]
+        bool IsJailBreak { get; }
+    }
+
+}
+
diff --git a/JLJailBreakXamarin/JLJailBreak/JLJailBreak/JLJailBreak.csproj b/JLJailBreakXamarin/JLJailBreak/JLJailBreak/JLJailBreak.csproj
new file mode 100644
index 0000000..353fba8
--- /dev/null
+++ b/JLJailBreakXamarin/JLJailBreak/JLJailBreak/JLJailBreak.csproj
@@ -0,0 +1,56 @@
+锘�<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProjectTypeGuids>{8FFB629D-F513-41CE-95D2-7ECE97B6EEEC};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+    <ProjectGuid>{1711F8FA-D53D-4D11-AC0D-F83FD903AE18}</ProjectGuid>
+    <TemplateGuid>{b6f3ff35-79b2-4f25-a2fc-60a7cf61013b}</TemplateGuid>
+    <OutputType>Library</OutputType>
+    <RootNamespace>JLJailBreak</RootNamespace>
+    <IPhoneResourcePrefix>Resources</IPhoneResourcePrefix>
+    <AssemblyName>JLJailBreak</AssemblyName>
+    <RestoreProjectStyle>PackageReference</RestoreProjectStyle>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug</OutputPath>
+    <DefineConstants>DEBUG;</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>full</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release</OutputPath>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="Xamarin.iOS" />
+  </ItemGroup>
+  <ItemGroup>
+    <Folder Include="Resources\" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="Properties\AssemblyInfo.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <ObjcBindingApiDefinition Include="ApiDefinition.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <ObjcBindingCoreSource Include="Structs.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <NativeReference Include="lib\libJailBreak.a">
+      <Kind>Static</Kind>
+      <SmartLink>False</SmartLink>
+    </NativeReference>
+  </ItemGroup>
+  <Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.ObjCBinding.CSharp.targets" />
+</Project>
\ No newline at end of file
diff --git a/JLJailBreakXamarin/JLJailBreak/JLJailBreak/Properties/AssemblyInfo.cs b/JLJailBreakXamarin/JLJailBreak/JLJailBreak/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..85a7982
--- /dev/null
+++ b/JLJailBreakXamarin/JLJailBreak/JLJailBreak/Properties/AssemblyInfo.cs
@@ -0,0 +1,34 @@
+锘縰sing System.Reflection;
+using System.Runtime.CompilerServices;
+
+using Foundation;
+
+// This attribute allows you to mark your assemblies as 鈥渟afe to link鈥�.
+// When the attribute is present, the linker鈥攊f enabled鈥攚ill process the assembly
+// even if you鈥檙e using the 鈥淟ink SDK assemblies only鈥� option, which is the default for device builds.
+
+[assembly: LinkerSafe]
+
+// Information about this assembly is defined by the following attributes.
+// Change them to the values specific to your project.
+
+[assembly: AssemblyTitle("JLJailBreak")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("JLJailBreak")]
+[assembly: AssemblyCopyright("Copyright 漏  2020")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
+// The form "{Major}.{Minor}.*" will automatically update the build and revision,
+// and "{Major}.{Minor}.{Build}.*" will update just the revision.
+
+[assembly: AssemblyVersion("1.0.2")]
+
+// The following attributes are used to specify the signing key for the assembly,
+// if desired. See the Mono documentation for more information about signing.
+
+//[assembly: AssemblyDelaySign(false)]
+//[assembly: AssemblyKeyFile("")]
diff --git a/JLJailBreakXamarin/JLJailBreak/JLJailBreak/Structs.cs b/JLJailBreakXamarin/JLJailBreak/JLJailBreak/Structs.cs
new file mode 100644
index 0000000..da3aad8
--- /dev/null
+++ b/JLJailBreakXamarin/JLJailBreak/JLJailBreak/Structs.cs
@@ -0,0 +1,6 @@
+锘縰sing System;
+
+namespace JLJailBreak
+{
+}
+
diff --git a/JLJailBreakXamarin/JLJailBreak/JLJailBreak/lib/libJailBreak.a b/JLJailBreakXamarin/JLJailBreak/JLJailBreak/lib/libJailBreak.a
new file mode 100644
index 0000000..a2a572a
--- /dev/null
+++ b/JLJailBreakXamarin/JLJailBreak/JLJailBreak/lib/libJailBreak.a
Binary files differ
diff --git a/JailBreak/JailBreak.xcodeproj/project.pbxproj b/JailBreak/JailBreak.xcodeproj/project.pbxproj
new file mode 100644
index 0000000..2b979b6
--- /dev/null
+++ b/JailBreak/JailBreak.xcodeproj/project.pbxproj
@@ -0,0 +1,291 @@
+// !$*UTF8*$!
+{
+	archiveVersion = 1;
+	classes = {
+	};
+	objectVersion = 50;
+	objects = {
+
+/* Begin PBXBuildFile section */
+		B921D98A2546C3FF008F120B /* JLJailBreak.m in Sources */ = {isa = PBXBuildFile; fileRef = B921D9892546C3FF008F120B /* JLJailBreak.m */; };
+		B921D98B2546C3FF008F120B /* JLJailBreak.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = B921D9882546C3FF008F120B /* JLJailBreak.h */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXCopyFilesBuildPhase section */
+		B921D9832546C3FF008F120B /* CopyFiles */ = {
+			isa = PBXCopyFilesBuildPhase;
+			buildActionMask = 2147483647;
+			dstPath = "include/$(PRODUCT_NAME)";
+			dstSubfolderSpec = 16;
+			files = (
+				B921D98B2546C3FF008F120B /* JLJailBreak.h in CopyFiles */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXCopyFilesBuildPhase section */
+
+/* Begin PBXFileReference section */
+		B921D9852546C3FF008F120B /* libJailBreak.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libJailBreak.a; sourceTree = BUILT_PRODUCTS_DIR; };
+		B921D9882546C3FF008F120B /* JLJailBreak.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = JLJailBreak.h; sourceTree = "<group>"; };
+		B921D9892546C3FF008F120B /* JLJailBreak.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = JLJailBreak.m; sourceTree = "<group>"; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+		B921D9822546C3FF008F120B /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+		B921D97C2546C3FF008F120B = {
+			isa = PBXGroup;
+			children = (
+				B921D9872546C3FF008F120B /* JailBreak */,
+				B921D9862546C3FF008F120B /* Products */,
+			);
+			sourceTree = "<group>";
+		};
+		B921D9862546C3FF008F120B /* Products */ = {
+			isa = PBXGroup;
+			children = (
+				B921D9852546C3FF008F120B /* libJailBreak.a */,
+			);
+			name = Products;
+			sourceTree = "<group>";
+		};
+		B921D9872546C3FF008F120B /* JailBreak */ = {
+			isa = PBXGroup;
+			children = (
+				B921D9882546C3FF008F120B /* JLJailBreak.h */,
+				B921D9892546C3FF008F120B /* JLJailBreak.m */,
+			);
+			path = JailBreak;
+			sourceTree = "<group>";
+		};
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+		B921D9842546C3FF008F120B /* JailBreak */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = B921D98E2546C3FF008F120B /* Build configuration list for PBXNativeTarget "JailBreak" */;
+			buildPhases = (
+				B921D9812546C3FF008F120B /* Sources */,
+				B921D9822546C3FF008F120B /* Frameworks */,
+				B921D9832546C3FF008F120B /* CopyFiles */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+			);
+			name = JailBreak;
+			productName = JailBreak;
+			productReference = B921D9852546C3FF008F120B /* libJailBreak.a */;
+			productType = "com.apple.product-type.library.static";
+		};
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+		B921D97D2546C3FF008F120B /* Project object */ = {
+			isa = PBXProject;
+			attributes = {
+				LastUpgradeCheck = 1120;
+				ORGANIZATIONNAME = "闄堝槈涔�";
+				TargetAttributes = {
+					B921D9842546C3FF008F120B = {
+						CreatedOnToolsVersion = 11.2.1;
+					};
+				};
+			};
+			buildConfigurationList = B921D9802546C3FF008F120B /* Build configuration list for PBXProject "JailBreak" */;
+			compatibilityVersion = "Xcode 9.3";
+			developmentRegion = en;
+			hasScannedForEncodings = 0;
+			knownRegions = (
+				en,
+				Base,
+			);
+			mainGroup = B921D97C2546C3FF008F120B;
+			productRefGroup = B921D9862546C3FF008F120B /* Products */;
+			projectDirPath = "";
+			projectRoot = "";
+			targets = (
+				B921D9842546C3FF008F120B /* JailBreak */,
+			);
+		};
+/* End PBXProject section */
+
+/* Begin PBXSourcesBuildPhase section */
+		B921D9812546C3FF008F120B /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				B921D98A2546C3FF008F120B /* JLJailBreak.m in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXSourcesBuildPhase section */
+
+/* Begin XCBuildConfiguration section */
+		B921D98C2546C3FF008F120B /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				CLANG_ANALYZER_NONNULL = YES;
+				CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
+				CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
+				CLANG_CXX_LIBRARY = "libc++";
+				CLANG_ENABLE_MODULES = YES;
+				CLANG_ENABLE_OBJC_ARC = YES;
+				CLANG_ENABLE_OBJC_WEAK = YES;
+				CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+				CLANG_WARN_BOOL_CONVERSION = YES;
+				CLANG_WARN_COMMA = YES;
+				CLANG_WARN_CONSTANT_CONVERSION = YES;
+				CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+				CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
+				CLANG_WARN_EMPTY_BODY = YES;
+				CLANG_WARN_ENUM_CONVERSION = YES;
+				CLANG_WARN_INFINITE_RECURSION = YES;
+				CLANG_WARN_INT_CONVERSION = YES;
+				CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+				CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+				CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+				CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+				CLANG_WARN_STRICT_PROTOTYPES = YES;
+				CLANG_WARN_SUSPICIOUS_MOVE = YES;
+				CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
+				CLANG_WARN_UNREACHABLE_CODE = YES;
+				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+				COPY_PHASE_STRIP = NO;
+				DEBUG_INFORMATION_FORMAT = dwarf;
+				ENABLE_STRICT_OBJC_MSGSEND = YES;
+				ENABLE_TESTABILITY = YES;
+				GCC_C_LANGUAGE_STANDARD = gnu11;
+				GCC_DYNAMIC_NO_PIC = NO;
+				GCC_NO_COMMON_BLOCKS = YES;
+				GCC_OPTIMIZATION_LEVEL = 0;
+				GCC_PREPROCESSOR_DEFINITIONS = (
+					"DEBUG=1",
+					"$(inherited)",
+				);
+				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+				GCC_WARN_UNDECLARED_SELECTOR = YES;
+				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+				GCC_WARN_UNUSED_FUNCTION = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				IPHONEOS_DEPLOYMENT_TARGET = 10.0;
+				MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
+				MTL_FAST_MATH = YES;
+				ONLY_ACTIVE_ARCH = YES;
+				SDKROOT = iphoneos;
+			};
+			name = Debug;
+		};
+		B921D98D2546C3FF008F120B /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				CLANG_ANALYZER_NONNULL = YES;
+				CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
+				CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
+				CLANG_CXX_LIBRARY = "libc++";
+				CLANG_ENABLE_MODULES = YES;
+				CLANG_ENABLE_OBJC_ARC = YES;
+				CLANG_ENABLE_OBJC_WEAK = YES;
+				CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+				CLANG_WARN_BOOL_CONVERSION = YES;
+				CLANG_WARN_COMMA = YES;
+				CLANG_WARN_CONSTANT_CONVERSION = YES;
+				CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+				CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
+				CLANG_WARN_EMPTY_BODY = YES;
+				CLANG_WARN_ENUM_CONVERSION = YES;
+				CLANG_WARN_INFINITE_RECURSION = YES;
+				CLANG_WARN_INT_CONVERSION = YES;
+				CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+				CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+				CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+				CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+				CLANG_WARN_STRICT_PROTOTYPES = YES;
+				CLANG_WARN_SUSPICIOUS_MOVE = YES;
+				CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
+				CLANG_WARN_UNREACHABLE_CODE = YES;
+				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+				COPY_PHASE_STRIP = NO;
+				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+				ENABLE_NS_ASSERTIONS = NO;
+				ENABLE_STRICT_OBJC_MSGSEND = YES;
+				GCC_C_LANGUAGE_STANDARD = gnu11;
+				GCC_NO_COMMON_BLOCKS = YES;
+				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+				GCC_WARN_UNDECLARED_SELECTOR = YES;
+				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+				GCC_WARN_UNUSED_FUNCTION = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				IPHONEOS_DEPLOYMENT_TARGET = 10.0;
+				MTL_ENABLE_DEBUG_INFO = NO;
+				MTL_FAST_MATH = YES;
+				SDKROOT = iphoneos;
+				VALIDATE_PRODUCT = YES;
+			};
+			name = Release;
+		};
+		B921D98F2546C3FF008F120B /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				CODE_SIGN_STYLE = Automatic;
+				DEVELOPMENT_TEAM = 259RU5K4MU;
+				OTHER_LDFLAGS = "-ObjC";
+				PRODUCT_NAME = "$(TARGET_NAME)";
+				SKIP_INSTALL = YES;
+				TARGETED_DEVICE_FAMILY = "1,2";
+			};
+			name = Debug;
+		};
+		B921D9902546C3FF008F120B /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				CODE_SIGN_STYLE = Automatic;
+				DEVELOPMENT_TEAM = 259RU5K4MU;
+				OTHER_LDFLAGS = "-ObjC";
+				PRODUCT_NAME = "$(TARGET_NAME)";
+				SKIP_INSTALL = YES;
+				TARGETED_DEVICE_FAMILY = "1,2";
+			};
+			name = Release;
+		};
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+		B921D9802546C3FF008F120B /* Build configuration list for PBXProject "JailBreak" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				B921D98C2546C3FF008F120B /* Debug */,
+				B921D98D2546C3FF008F120B /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+		B921D98E2546C3FF008F120B /* Build configuration list for PBXNativeTarget "JailBreak" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				B921D98F2546C3FF008F120B /* Debug */,
+				B921D9902546C3FF008F120B /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+/* End XCConfigurationList section */
+	};
+	rootObject = B921D97D2546C3FF008F120B /* Project object */;
+}
diff --git a/JailBreak/JailBreak.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/JailBreak/JailBreak.xcodeproj/project.xcworkspace/contents.xcworkspacedata
new file mode 100644
index 0000000..adac02f
--- /dev/null
+++ b/JailBreak/JailBreak.xcodeproj/project.xcworkspace/contents.xcworkspacedata
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Workspace
+   version = "1.0">
+   <FileRef
+      location = "self:JailBreak.xcodeproj">
+   </FileRef>
+</Workspace>
diff --git a/JailBreak/JailBreak.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/JailBreak/JailBreak.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
new file mode 100644
index 0000000..18d9810
--- /dev/null
+++ b/JailBreak/JailBreak.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>IDEDidComputeMac32BitWarning</key>
+	<true/>
+</dict>
+</plist>
diff --git a/JailBreak/JailBreak/JLJailBreak.h b/JailBreak/JailBreak/JLJailBreak.h
new file mode 100644
index 0000000..fc1af3c
--- /dev/null
+++ b/JailBreak/JailBreak/JLJailBreak.h
@@ -0,0 +1,18 @@
+//
+//  JLJailBreak.h
+//  JLJailBreak
+//
+//  Created by 闄堝槈涔� on 2020/10/26.
+//  Copyright 漏 2020 闄堝槈涔�. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+@interface JLJailBreak : NSObject
+
+/**
+ * 鍒ゆ柇璁惧鏄惁瓒婄嫳
+ */
++ (BOOL)isJailBreak;
+
+@end
diff --git a/JailBreak/JailBreak/JLJailBreak.m b/JailBreak/JailBreak/JLJailBreak.m
new file mode 100644
index 0000000..bf3fea6
--- /dev/null
+++ b/JailBreak/JailBreak/JLJailBreak.m
@@ -0,0 +1,116 @@
+//
+//  JLJailBreak.m
+//  JLJailBreak
+//
+//  Created by 闄堝槈涔� on 2020/10/26.
+//  Copyright 漏 2020 闄堝槈涔�. All rights reserved.
+//
+
+#import "JLJailBreak.h"
+#import "stdlib.h"
+
+@implementation JLJailBreak
+
+
+/**
+ * 鍒ゆ柇璁惧鏄惁瓒婄嫳
+ */
++ (BOOL)isJailBreak
+{
+    return  [JLJailBreak isHasReadAppFileAuthority] || [JLJailBreak isHasJailBreakAppOrFile] || [JLJailBreak isHasDyldInsertLibraries];
+}
+
+/**
+ * 绗竴绉嶏細鍒ゆ柇鏄惁鏈夎幏鍙栧叾瀹傾pp鏉冮檺
+ */
++ (BOOL) isHasReadAppFileAuthority
+{
+    if ([[NSFileManager defaultManager] fileExistsAtPath:@"User/Applications/"]) {
+        return YES;
+    }else{
+        return NO;
+    }
+}
+
+/**
+ * 绗簩绉嶏細鍒ゆ柇鏄惁瀛樺湪apt鍜孋ydia.app鎴栬�呰秺鐙辨枃浠�
+ */
++(BOOL) isHasJailBreakAppOrFile{
+    BOOL isJailBreak = NO;
+    NSString *cydiaPath = @"/Applications/Cydia.app";
+    NSString *aptPath = @"/private/var/lib/apt/";
+    if ([[NSFileManager defaultManager] fileExistsAtPath:cydiaPath]||[[NSFileManager defaultManager] fileExistsAtPath:aptPath]) {
+        isJailBreak = YES;
+    }else{
+        NSFileManager *fileManager=[NSFileManager defaultManager];
+        NSArray *pathArray = @[@"/etc/ssh/sshd_config",
+                               @"/usr/libexec/ssh-keysign",
+                               @"/usr/sbin/sshd",
+                               @"/usr/sbin/sshd",
+                               @"/bin/sh",
+                               @"/bin/bash",
+                               @"/etc/apt",
+                               @"/Application/Cydia.app/",
+                               @"/Library/MobileSubstrate/MobileSubstrate.dylib"
+                               ];
+        for (NSString *path in pathArray) {
+            isJailBreak = [fileManager fileExistsAtPath:path];
+            // 濡傛灉瀛樺湪杩欎簺鐩綍锛屽氨鏄凡缁忚秺鐙�
+            if (isJailBreak) {
+                break;
+            }
+        }
+    }
+    return isJailBreak;
+}
+
+
+
+/**
+ * 绗笁绉嶏細鍒ゆ柇鐜鍙橀噺DYLD_INSERT_LIBRARIES
+ */
++ (BOOL) isHasDyldInsertLibraries
+{
+    char *env = getenv("DYLD_INSERT_LIBRARIES");
+    
+    if (env != NULL) {
+        return YES;
+    }else{
+        return NO;
+    }
+}
+
+
+//+ (void)exitApplicationWhenJailBreak{
+//
+//    if ([JLJailBreak isJailBreak]) {
+//
+//        AppDelegate *app = (AppDelegate *)[UIApplication sharedApplication].delegate;
+//
+//        UIAlertController *alertVc = [UIAlertController alertControllerWithTitle:@"鎻愮ず" message:@"鏈簲鐢ㄦ殏涓嶆敮鎸佸湪瓒婄嫳璁惧涓婅繍琛岋紝璇蜂娇鐢ㄦ湭瓒婄嫳璁惧杩涜閲嶆柊瀹夎" preferredStyle:UIAlertControllerStyleAlert];
+//        UIAlertAction *sureAction = [UIAlertAction actionWithTitle:@"纭畾" style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) {
+//            [JLJailBreak exitWithAnimation];
+//        }];
+//        [alertVc addAction:sureAction];
+//
+//        [app.window.rootViewController presentViewController:alertVc animated:YES completion:nil];
+//
+//    }
+//
+//}
+//
+//
+//+ (void)exitWithAnimation{
+//
+//    AppDelegate *app = (AppDelegate *)[UIApplication sharedApplication].delegate;
+//    UIWindow *window = app.window;
+//
+//    [UIView animateWithDuration:.35 animations:^{
+//        window.alpha = 0;
+//        window.frame = CGRectMake(window.frame.size.width/2, window.frame.size.height/2, 0, 0);
+//    } completion:^(BOOL finished) {
+//        exit(0);
+//    }];
+//}
+
+@end
diff --git a/libJailBreak.a b/libJailBreak.a
new file mode 100644
index 0000000..a2a572a
--- /dev/null
+++ b/libJailBreak.a
Binary files differ

--
Gitblit v1.8.0