capacitor-freerasp 2.2.2 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +57 -0
- package/CapacitorFreerasp.podspec +1 -1
- package/README.md +8 -8
- package/android/build.gradle +1 -1
- package/android/src/main/java/com/aheaditec/freerasp/FreeraspPlugin.kt +39 -18
- package/android/src/main/java/com/aheaditec/freerasp/ScreenProtector.kt +24 -2
- package/android/src/main/java/com/aheaditec/freerasp/ThreatHandler.kt +36 -18
- package/android/src/main/java/com/aheaditec/freerasp/events/BaseRaspEvent.kt +7 -0
- package/android/src/main/java/com/aheaditec/freerasp/events/RaspExecutionStateEvent.kt +22 -0
- package/android/src/main/java/com/aheaditec/freerasp/events/ThreatEvent.kt +69 -0
- package/android/src/main/java/com/aheaditec/freerasp/models/CapSuspiciousAppInfo.kt +1 -0
- package/android/src/main/java/com/aheaditec/freerasp/utils/Extensions.kt +1 -0
- package/android/src/main/java/com/aheaditec/freerasp/utils/RandomGenerator.kt +24 -0
- package/android/src/main/java/com/aheaditec/freerasp/utils/Utils.kt +3 -5
- package/dist/esm/api/listeners/raspExecutionState.d.ts +2 -0
- package/dist/esm/api/listeners/raspExecutionState.js +23 -0
- package/dist/esm/api/listeners/raspExecutionState.js.map +1 -0
- package/dist/esm/api/listeners/threat.d.ts +2 -0
- package/dist/esm/api/listeners/threat.js +84 -0
- package/dist/esm/api/listeners/threat.js.map +1 -0
- package/dist/esm/api/methods/capacitor.d.ts +4 -0
- package/dist/esm/api/methods/capacitor.js +11 -0
- package/dist/esm/api/methods/capacitor.js.map +1 -0
- package/dist/esm/api/methods/native.d.ts +6 -0
- package/dist/esm/api/methods/native.js +32 -0
- package/dist/esm/api/methods/native.js.map +1 -0
- package/dist/esm/api/nativeModules.d.ts +2 -0
- package/dist/esm/api/nativeModules.js +3 -0
- package/dist/esm/api/nativeModules.js.map +1 -0
- package/dist/esm/channels/raspExecutionState.d.ts +3 -0
- package/dist/esm/channels/raspExecutionState.js +27 -0
- package/dist/esm/channels/raspExecutionState.js.map +1 -0
- package/dist/esm/channels/threat.d.ts +3 -0
- package/dist/esm/channels/threat.js +34 -0
- package/dist/esm/channels/threat.js.map +1 -0
- package/dist/esm/index.d.ts +7 -12
- package/dist/esm/index.js +7 -158
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/models/raspExecutionState.d.ts +6 -0
- package/dist/esm/models/raspExecutionState.js +10 -0
- package/dist/esm/models/raspExecutionState.js.map +1 -0
- package/dist/esm/models/threat.d.ts +26 -0
- package/dist/esm/{definitions.js → models/threat.js} +7 -3
- package/dist/esm/models/threat.js.map +1 -0
- package/dist/esm/{definitions.d.ts → types/types.d.ts} +37 -44
- package/dist/esm/types/types.js +2 -0
- package/dist/esm/types/types.js.map +1 -0
- package/dist/esm/utils/malware.d.ts +3 -0
- package/dist/esm/utils/malware.js +22 -0
- package/dist/esm/utils/malware.js.map +1 -0
- package/dist/esm/utils/utils.d.ts +3 -0
- package/dist/esm/utils/utils.js +12 -0
- package/dist/esm/utils/utils.js.map +1 -0
- package/dist/plugin.cjs.js +153 -78
- package/dist/plugin.cjs.js.map +1 -1
- package/dist/plugin.js +153 -78
- package/dist/plugin.js.map +1 -1
- package/ios/Plugin/FreeraspPlugin.m +2 -0
- package/ios/Plugin/FreeraspPlugin.swift +50 -75
- package/ios/Plugin/Info.plist +1 -1
- package/ios/Plugin/TalsecRuntime.xcframework/_CodeSignature/CodeDirectory +0 -0
- package/ios/Plugin/TalsecRuntime.xcframework/_CodeSignature/CodeResources +100 -298
- package/ios/Plugin/TalsecRuntime.xcframework/_CodeSignature/CodeSignature +0 -0
- package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/CurlWrapper.h +1 -1
- package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/TalsecRuntime-Swift.h +7 -2
- package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/curl.h +380 -281
- package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/curlver.h +5 -6
- package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/easy.h +4 -4
- package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/header.h +1 -1
- package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/mprintf.h +11 -4
- package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/multi.h +62 -22
- package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/options.h +2 -2
- package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/system.h +76 -164
- package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/typecheck-gcc.h +947 -0
- package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/urlapi.h +5 -4
- package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/websockets.h +17 -3
- package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Info.plist +0 -0
- package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios.abi.json +233 -528
- package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios.private.swiftinterface +7 -3
- package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
- package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios.swiftinterface +7 -3
- package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/TalsecRuntime +0 -0
- package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/CurlWrapper.h +1 -1
- package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/TalsecRuntime-Swift.h +14 -4
- package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/curl.h +380 -281
- package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/curlver.h +5 -6
- package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/easy.h +4 -4
- package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/header.h +1 -1
- package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/mprintf.h +11 -4
- package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/multi.h +62 -22
- package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/options.h +2 -2
- package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/system.h +76 -164
- package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/typecheck-gcc.h +947 -0
- package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/urlapi.h +5 -4
- package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/websockets.h +17 -3
- package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Info.plist +0 -0
- package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios-simulator.abi.json +233 -528
- package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +7 -3
- package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
- package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios-simulator.swiftinterface +7 -3
- package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/x86_64-apple-ios-simulator.abi.json +233 -528
- package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +7 -3
- package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
- package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +7 -3
- package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/TalsecRuntime +0 -0
- package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/_CodeSignature/CodeResources +56 -45
- package/ios/Plugin/models/RaspExecutionStates.swift +15 -0
- package/ios/Plugin/models/SecurityThreat.swift +40 -0
- package/ios/Plugin/utils/EventIdentifiers.swift +17 -0
- package/ios/Plugin/utils/RandomGenerator.swift +23 -0
- package/ios/Plugin/utils/Utils.swift +32 -0
- package/package.json +15 -10
- package/android/src/main/java/com/aheaditec/freerasp/Threat.kt +0 -58
- package/dist/esm/definitions.js.map +0 -1
- package/dist/esm/utils.d.ts +0 -2
- package/dist/esm/utils.js +0 -8
- package/dist/esm/utils.js.map +0 -1
- package/ios/Plugin/TalsecRuntime.xcframework/_CodeSignature/CodeRequirements-1 +0 -0
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// swift-interface-format-version: 1.0
|
|
2
|
-
// swift-compiler-version: Apple Swift version 5.10 (swiftlang-
|
|
3
|
-
// swift-module-flags: -target x86_64-apple-ios13.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -enable-bare-slash-regex -module-name TalsecRuntime
|
|
2
|
+
// swift-compiler-version: Apple Swift version 6.1.2 effective-5.10 (swiftlang-6.1.2.1.2 clang-1700.0.13.5)
|
|
3
|
+
// swift-module-flags: -target x86_64-apple-ios13.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -enable-experimental-feature DebugDescriptionMacro -enable-bare-slash-regex -module-name TalsecRuntime
|
|
4
|
+
// swift-module-flags-ignorable: -no-verify-emitted-module-interface -interface-compiler-version 6.1.2
|
|
4
5
|
import CryptoKit
|
|
5
6
|
import Foundation
|
|
6
7
|
import LocalAuthentication
|
|
@@ -16,6 +17,9 @@ import zlib
|
|
|
16
17
|
public protocol SecurityThreatHandler {
|
|
17
18
|
func threatDetected(_ securityThreat: TalsecRuntime.SecurityThreat)
|
|
18
19
|
}
|
|
20
|
+
public protocol RaspExecutionState {
|
|
21
|
+
func onAllChecksFinished()
|
|
22
|
+
}
|
|
19
23
|
@_hasMissingDesignatedInitializers public class SecurityThreatCenter {
|
|
20
24
|
@objc deinit
|
|
21
25
|
}
|
|
@@ -51,7 +55,7 @@ public enum SecurityThreat : Swift.String, Swift.Codable, Swift.CaseIterable, Sw
|
|
|
51
55
|
public init?(rawValue: Swift.String)
|
|
52
56
|
public typealias AllCases = [TalsecRuntime.SecurityThreat]
|
|
53
57
|
public typealias RawValue = Swift.String
|
|
54
|
-
public static var allCases: [TalsecRuntime.SecurityThreat] {
|
|
58
|
+
nonisolated public static var allCases: [TalsecRuntime.SecurityThreat] {
|
|
55
59
|
get
|
|
56
60
|
}
|
|
57
61
|
public var rawValue: Swift.String {
|
|
Binary file
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// swift-interface-format-version: 1.0
|
|
2
|
-
// swift-compiler-version: Apple Swift version 5.10 (swiftlang-
|
|
3
|
-
// swift-module-flags: -target x86_64-apple-ios13.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -enable-bare-slash-regex -module-name TalsecRuntime
|
|
2
|
+
// swift-compiler-version: Apple Swift version 6.1.2 effective-5.10 (swiftlang-6.1.2.1.2 clang-1700.0.13.5)
|
|
3
|
+
// swift-module-flags: -target x86_64-apple-ios13.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -enable-experimental-feature DebugDescriptionMacro -enable-bare-slash-regex -module-name TalsecRuntime
|
|
4
|
+
// swift-module-flags-ignorable: -no-verify-emitted-module-interface -interface-compiler-version 6.1.2
|
|
4
5
|
import CryptoKit
|
|
5
6
|
import Foundation
|
|
6
7
|
import LocalAuthentication
|
|
@@ -16,6 +17,9 @@ import zlib
|
|
|
16
17
|
public protocol SecurityThreatHandler {
|
|
17
18
|
func threatDetected(_ securityThreat: TalsecRuntime.SecurityThreat)
|
|
18
19
|
}
|
|
20
|
+
public protocol RaspExecutionState {
|
|
21
|
+
func onAllChecksFinished()
|
|
22
|
+
}
|
|
19
23
|
@_hasMissingDesignatedInitializers public class SecurityThreatCenter {
|
|
20
24
|
@objc deinit
|
|
21
25
|
}
|
|
@@ -51,7 +55,7 @@ public enum SecurityThreat : Swift.String, Swift.Codable, Swift.CaseIterable, Sw
|
|
|
51
55
|
public init?(rawValue: Swift.String)
|
|
52
56
|
public typealias AllCases = [TalsecRuntime.SecurityThreat]
|
|
53
57
|
public typealias RawValue = Swift.String
|
|
54
|
-
public static var allCases: [TalsecRuntime.SecurityThreat] {
|
|
58
|
+
nonisolated public static var allCases: [TalsecRuntime.SecurityThreat] {
|
|
55
59
|
get
|
|
56
60
|
}
|
|
57
61
|
public var rawValue: Swift.String {
|
|
Binary file
|
|
@@ -10,11 +10,11 @@
|
|
|
10
10
|
</data>
|
|
11
11
|
<key>Headers/CurlWrapper.h</key>
|
|
12
12
|
<data>
|
|
13
|
-
|
|
13
|
+
WA1JyO7KWSoJGy5fxmELyR1IkWE=
|
|
14
14
|
</data>
|
|
15
15
|
<key>Headers/TalsecRuntime-Swift.h</key>
|
|
16
16
|
<data>
|
|
17
|
-
|
|
17
|
+
MqWD2qxGFZS4IS6VVlbeFOu4/zo=
|
|
18
18
|
</data>
|
|
19
19
|
<key>Headers/TalsecRuntime_iOS.h</key>
|
|
20
20
|
<data>
|
|
@@ -22,31 +22,31 @@
|
|
|
22
22
|
</data>
|
|
23
23
|
<key>Headers/curl.h</key>
|
|
24
24
|
<data>
|
|
25
|
-
|
|
25
|
+
ts72n1gggDFqWROsijjd2V5bmnk=
|
|
26
26
|
</data>
|
|
27
27
|
<key>Headers/curlver.h</key>
|
|
28
28
|
<data>
|
|
29
|
-
|
|
29
|
+
HHHy97I1HcqyKicFHd1AcLT9vM0=
|
|
30
30
|
</data>
|
|
31
31
|
<key>Headers/easy.h</key>
|
|
32
32
|
<data>
|
|
33
|
-
|
|
33
|
+
uxwAQyNkdidRGYBKGD8Jg+yqKEU=
|
|
34
34
|
</data>
|
|
35
35
|
<key>Headers/header.h</key>
|
|
36
36
|
<data>
|
|
37
|
-
|
|
37
|
+
iyvygbRon3G0sWEVV5hAyuEsRf8=
|
|
38
38
|
</data>
|
|
39
39
|
<key>Headers/mprintf.h</key>
|
|
40
40
|
<data>
|
|
41
|
-
|
|
41
|
+
6kuUNhttGSIGElxfaS4YXSI6QjA=
|
|
42
42
|
</data>
|
|
43
43
|
<key>Headers/multi.h</key>
|
|
44
44
|
<data>
|
|
45
|
-
|
|
45
|
+
ghjOT/nVae583cGGQSS51MEGYz0=
|
|
46
46
|
</data>
|
|
47
47
|
<key>Headers/options.h</key>
|
|
48
48
|
<data>
|
|
49
|
-
|
|
49
|
+
jgKjZkIB4sAKRVgNpzwrJ5R6BnI=
|
|
50
50
|
</data>
|
|
51
51
|
<key>Headers/stdcheaders.h</key>
|
|
52
52
|
<data>
|
|
@@ -54,59 +54,63 @@
|
|
|
54
54
|
</data>
|
|
55
55
|
<key>Headers/system.h</key>
|
|
56
56
|
<data>
|
|
57
|
-
|
|
57
|
+
CbSdtGUOwipRo+mywhFc1XyX4hk=
|
|
58
|
+
</data>
|
|
59
|
+
<key>Headers/typecheck-gcc.h</key>
|
|
60
|
+
<data>
|
|
61
|
+
J/BOIcuabDNAyRWHX7SeqGm9B2k=
|
|
58
62
|
</data>
|
|
59
63
|
<key>Headers/urlapi.h</key>
|
|
60
64
|
<data>
|
|
61
|
-
|
|
65
|
+
wmwxqoTKiFpUxhiWu43uFpMfnfc=
|
|
62
66
|
</data>
|
|
63
67
|
<key>Headers/websockets.h</key>
|
|
64
68
|
<data>
|
|
65
|
-
|
|
69
|
+
dacrFuMoBK+Ue7nlMiklKjPkmWc=
|
|
66
70
|
</data>
|
|
67
71
|
<key>Info.plist</key>
|
|
68
72
|
<data>
|
|
69
|
-
|
|
73
|
+
Dzja35wc+f4Y/yJuzktrj1qsCU0=
|
|
70
74
|
</data>
|
|
71
75
|
<key>Modules/TalsecRuntime.swiftmodule/arm64-apple-ios-simulator.abi.json</key>
|
|
72
76
|
<data>
|
|
73
|
-
|
|
77
|
+
NTg7yIg8Nc6VPtjx/jY/XQPV0vI=
|
|
74
78
|
</data>
|
|
75
79
|
<key>Modules/TalsecRuntime.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface</key>
|
|
76
80
|
<data>
|
|
77
|
-
|
|
81
|
+
11Zc3FvUFlGp8W//MH4jQcKagKE=
|
|
78
82
|
</data>
|
|
79
83
|
<key>Modules/TalsecRuntime.swiftmodule/arm64-apple-ios-simulator.swiftdoc</key>
|
|
80
84
|
<data>
|
|
81
|
-
|
|
85
|
+
mJlKnjUfSE3Y8ZQ2INnAMyMsm2g=
|
|
82
86
|
</data>
|
|
83
87
|
<key>Modules/TalsecRuntime.swiftmodule/arm64-apple-ios-simulator.swiftinterface</key>
|
|
84
88
|
<data>
|
|
85
|
-
|
|
89
|
+
11Zc3FvUFlGp8W//MH4jQcKagKE=
|
|
86
90
|
</data>
|
|
87
91
|
<key>Modules/TalsecRuntime.swiftmodule/arm64-apple-ios-simulator.swiftmodule</key>
|
|
88
92
|
<data>
|
|
89
|
-
|
|
93
|
+
MVPc1jR0r9jmgDhs8qwBMtHslWc=
|
|
90
94
|
</data>
|
|
91
95
|
<key>Modules/TalsecRuntime.swiftmodule/x86_64-apple-ios-simulator.abi.json</key>
|
|
92
96
|
<data>
|
|
93
|
-
|
|
97
|
+
NTg7yIg8Nc6VPtjx/jY/XQPV0vI=
|
|
94
98
|
</data>
|
|
95
99
|
<key>Modules/TalsecRuntime.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface</key>
|
|
96
100
|
<data>
|
|
97
|
-
|
|
101
|
+
a6CNCiaS16+juFzV//lEYSGIMy4=
|
|
98
102
|
</data>
|
|
99
103
|
<key>Modules/TalsecRuntime.swiftmodule/x86_64-apple-ios-simulator.swiftdoc</key>
|
|
100
104
|
<data>
|
|
101
|
-
|
|
105
|
+
T/DL4bHXKHHe/fV93pC4+qoSee4=
|
|
102
106
|
</data>
|
|
103
107
|
<key>Modules/TalsecRuntime.swiftmodule/x86_64-apple-ios-simulator.swiftinterface</key>
|
|
104
108
|
<data>
|
|
105
|
-
|
|
109
|
+
a6CNCiaS16+juFzV//lEYSGIMy4=
|
|
106
110
|
</data>
|
|
107
111
|
<key>Modules/TalsecRuntime.swiftmodule/x86_64-apple-ios-simulator.swiftmodule</key>
|
|
108
112
|
<data>
|
|
109
|
-
|
|
113
|
+
0Jl8w1Z9Inj43WuxzmskBXEEHCg=
|
|
110
114
|
</data>
|
|
111
115
|
<key>Modules/module.modulemap</key>
|
|
112
116
|
<data>
|
|
@@ -138,14 +142,14 @@
|
|
|
138
142
|
<dict>
|
|
139
143
|
<key>hash2</key>
|
|
140
144
|
<data>
|
|
141
|
-
|
|
145
|
+
lwrSTYcdtuUGVDgaHIbe1bbQ7VFkbd2gC004O1j6TPc=
|
|
142
146
|
</data>
|
|
143
147
|
</dict>
|
|
144
148
|
<key>Headers/TalsecRuntime-Swift.h</key>
|
|
145
149
|
<dict>
|
|
146
150
|
<key>hash2</key>
|
|
147
151
|
<data>
|
|
148
|
-
|
|
152
|
+
eOzpjk/89xuYLUDhpP29sxMdg2xIQkS6YODFqKKBMTk=
|
|
149
153
|
</data>
|
|
150
154
|
</dict>
|
|
151
155
|
<key>Headers/TalsecRuntime_iOS.h</key>
|
|
@@ -159,49 +163,49 @@
|
|
|
159
163
|
<dict>
|
|
160
164
|
<key>hash2</key>
|
|
161
165
|
<data>
|
|
162
|
-
|
|
166
|
+
J1Rdz0xMEsZElJMEzlfqhQWF8ySsbbPGdNEKFh+kanw=
|
|
163
167
|
</data>
|
|
164
168
|
</dict>
|
|
165
169
|
<key>Headers/curlver.h</key>
|
|
166
170
|
<dict>
|
|
167
171
|
<key>hash2</key>
|
|
168
172
|
<data>
|
|
169
|
-
|
|
173
|
+
SBdVCzOTQRM9zdA83gcE5nj2Wg/Pp61W60/5cpTqa1I=
|
|
170
174
|
</data>
|
|
171
175
|
</dict>
|
|
172
176
|
<key>Headers/easy.h</key>
|
|
173
177
|
<dict>
|
|
174
178
|
<key>hash2</key>
|
|
175
179
|
<data>
|
|
176
|
-
|
|
180
|
+
9trJcD4NSwkeDS48x9QwCRdL5FO6EmB/l84qdDFz1AQ=
|
|
177
181
|
</data>
|
|
178
182
|
</dict>
|
|
179
183
|
<key>Headers/header.h</key>
|
|
180
184
|
<dict>
|
|
181
185
|
<key>hash2</key>
|
|
182
186
|
<data>
|
|
183
|
-
|
|
187
|
+
ff8703r7WMAJ8HVcwbN0AffECeWBcurtSSyBkYGobj8=
|
|
184
188
|
</data>
|
|
185
189
|
</dict>
|
|
186
190
|
<key>Headers/mprintf.h</key>
|
|
187
191
|
<dict>
|
|
188
192
|
<key>hash2</key>
|
|
189
193
|
<data>
|
|
190
|
-
|
|
194
|
+
p5ZX+hXbcecyvLWLxGRatlvbMiJ2fzS+W6tWqg1PTMk=
|
|
191
195
|
</data>
|
|
192
196
|
</dict>
|
|
193
197
|
<key>Headers/multi.h</key>
|
|
194
198
|
<dict>
|
|
195
199
|
<key>hash2</key>
|
|
196
200
|
<data>
|
|
197
|
-
|
|
201
|
+
0u/8fnvcek6E8pW9l9eCVQLDoE6wVE6xNqaEuecr2vY=
|
|
198
202
|
</data>
|
|
199
203
|
</dict>
|
|
200
204
|
<key>Headers/options.h</key>
|
|
201
205
|
<dict>
|
|
202
206
|
<key>hash2</key>
|
|
203
207
|
<data>
|
|
204
|
-
|
|
208
|
+
W9BWyD70kT34RsuOOuud+qqZ6emBkskEHCutDRcBuVk=
|
|
205
209
|
</data>
|
|
206
210
|
</dict>
|
|
207
211
|
<key>Headers/stdcheaders.h</key>
|
|
@@ -215,91 +219,98 @@
|
|
|
215
219
|
<dict>
|
|
216
220
|
<key>hash2</key>
|
|
217
221
|
<data>
|
|
218
|
-
|
|
222
|
+
ZD/MnzVjEDHSR5BJTpdA6400CFVfLp1Zwwy//38+McQ=
|
|
223
|
+
</data>
|
|
224
|
+
</dict>
|
|
225
|
+
<key>Headers/typecheck-gcc.h</key>
|
|
226
|
+
<dict>
|
|
227
|
+
<key>hash2</key>
|
|
228
|
+
<data>
|
|
229
|
+
3O4L8PutuQJQhnbdj9CodR7KtBtmMbcTP5Z/QZTUop0=
|
|
219
230
|
</data>
|
|
220
231
|
</dict>
|
|
221
232
|
<key>Headers/urlapi.h</key>
|
|
222
233
|
<dict>
|
|
223
234
|
<key>hash2</key>
|
|
224
235
|
<data>
|
|
225
|
-
|
|
236
|
+
nh6/67Z3VU2snFQmgki0ooYpXB+aA4hL+RMtsurfPPk=
|
|
226
237
|
</data>
|
|
227
238
|
</dict>
|
|
228
239
|
<key>Headers/websockets.h</key>
|
|
229
240
|
<dict>
|
|
230
241
|
<key>hash2</key>
|
|
231
242
|
<data>
|
|
232
|
-
|
|
243
|
+
5W0gmdKOy+tbjQl4qBjg3XaiUsXkfmFKGoZDVCRBMxQ=
|
|
233
244
|
</data>
|
|
234
245
|
</dict>
|
|
235
246
|
<key>Modules/TalsecRuntime.swiftmodule/arm64-apple-ios-simulator.abi.json</key>
|
|
236
247
|
<dict>
|
|
237
248
|
<key>hash2</key>
|
|
238
249
|
<data>
|
|
239
|
-
|
|
250
|
+
smJ7d6OZeqWFeidhNPmMvWfZN2+tQ1l1DsAsqzgQt7w=
|
|
240
251
|
</data>
|
|
241
252
|
</dict>
|
|
242
253
|
<key>Modules/TalsecRuntime.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface</key>
|
|
243
254
|
<dict>
|
|
244
255
|
<key>hash2</key>
|
|
245
256
|
<data>
|
|
246
|
-
|
|
257
|
+
NXBc0P8JjFwBaIgivJQNz7nosY48UZBIGOPTf/bYewI=
|
|
247
258
|
</data>
|
|
248
259
|
</dict>
|
|
249
260
|
<key>Modules/TalsecRuntime.swiftmodule/arm64-apple-ios-simulator.swiftdoc</key>
|
|
250
261
|
<dict>
|
|
251
262
|
<key>hash2</key>
|
|
252
263
|
<data>
|
|
253
|
-
|
|
264
|
+
WobhDnDJimDFi4H93t4PHKChXKRdUDJ9mD4INAfhNA0=
|
|
254
265
|
</data>
|
|
255
266
|
</dict>
|
|
256
267
|
<key>Modules/TalsecRuntime.swiftmodule/arm64-apple-ios-simulator.swiftinterface</key>
|
|
257
268
|
<dict>
|
|
258
269
|
<key>hash2</key>
|
|
259
270
|
<data>
|
|
260
|
-
|
|
271
|
+
NXBc0P8JjFwBaIgivJQNz7nosY48UZBIGOPTf/bYewI=
|
|
261
272
|
</data>
|
|
262
273
|
</dict>
|
|
263
274
|
<key>Modules/TalsecRuntime.swiftmodule/arm64-apple-ios-simulator.swiftmodule</key>
|
|
264
275
|
<dict>
|
|
265
276
|
<key>hash2</key>
|
|
266
277
|
<data>
|
|
267
|
-
|
|
278
|
+
+/yfulAGiTOzQ3P/qKQ49L5Vw5hptKlDnWjUl+o+Tyk=
|
|
268
279
|
</data>
|
|
269
280
|
</dict>
|
|
270
281
|
<key>Modules/TalsecRuntime.swiftmodule/x86_64-apple-ios-simulator.abi.json</key>
|
|
271
282
|
<dict>
|
|
272
283
|
<key>hash2</key>
|
|
273
284
|
<data>
|
|
274
|
-
|
|
285
|
+
smJ7d6OZeqWFeidhNPmMvWfZN2+tQ1l1DsAsqzgQt7w=
|
|
275
286
|
</data>
|
|
276
287
|
</dict>
|
|
277
288
|
<key>Modules/TalsecRuntime.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface</key>
|
|
278
289
|
<dict>
|
|
279
290
|
<key>hash2</key>
|
|
280
291
|
<data>
|
|
281
|
-
|
|
292
|
+
FOrAekhc36NfqLLe4rlbHttfKoRbiuV3L9+WnC24NBc=
|
|
282
293
|
</data>
|
|
283
294
|
</dict>
|
|
284
295
|
<key>Modules/TalsecRuntime.swiftmodule/x86_64-apple-ios-simulator.swiftdoc</key>
|
|
285
296
|
<dict>
|
|
286
297
|
<key>hash2</key>
|
|
287
298
|
<data>
|
|
288
|
-
|
|
299
|
+
rS8E9vR/8aKK2wuSIY7Q2qIZtlLtddvnA4i3d6ZQPi8=
|
|
289
300
|
</data>
|
|
290
301
|
</dict>
|
|
291
302
|
<key>Modules/TalsecRuntime.swiftmodule/x86_64-apple-ios-simulator.swiftinterface</key>
|
|
292
303
|
<dict>
|
|
293
304
|
<key>hash2</key>
|
|
294
305
|
<data>
|
|
295
|
-
|
|
306
|
+
FOrAekhc36NfqLLe4rlbHttfKoRbiuV3L9+WnC24NBc=
|
|
296
307
|
</data>
|
|
297
308
|
</dict>
|
|
298
309
|
<key>Modules/TalsecRuntime.swiftmodule/x86_64-apple-ios-simulator.swiftmodule</key>
|
|
299
310
|
<dict>
|
|
300
311
|
<key>hash2</key>
|
|
301
312
|
<data>
|
|
302
|
-
|
|
313
|
+
fNFd8NVDp1XDXnMlkDAOFZA+TaFohGaVwMp0uIwiSwM=
|
|
303
314
|
</data>
|
|
304
315
|
</dict>
|
|
305
316
|
<key>Modules/module.modulemap</key>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
enum RaspExecutionStates : String, Codable, CaseIterable, Equatable {
|
|
2
|
+
|
|
3
|
+
case allChecksFinished
|
|
4
|
+
|
|
5
|
+
public static var allCases: [RaspExecutionStates] {
|
|
6
|
+
return [.allChecksFinished]
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
var callbackIdentifier: Int {
|
|
10
|
+
switch self {
|
|
11
|
+
case .allChecksFinished:
|
|
12
|
+
return EventIdentifiers.raspExecutionStateIdentifierList[0]
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import TalsecRuntime
|
|
2
|
+
|
|
3
|
+
extension SecurityThreat {
|
|
4
|
+
|
|
5
|
+
var callbackIdentifier: Int {
|
|
6
|
+
switch self {
|
|
7
|
+
case .signature:
|
|
8
|
+
return EventIdentifiers.threatIdentifierList[0]
|
|
9
|
+
case .jailbreak:
|
|
10
|
+
return EventIdentifiers.threatIdentifierList[1]
|
|
11
|
+
case .debugger:
|
|
12
|
+
return EventIdentifiers.threatIdentifierList[2]
|
|
13
|
+
case .runtimeManipulation:
|
|
14
|
+
return EventIdentifiers.threatIdentifierList[3]
|
|
15
|
+
case .passcode:
|
|
16
|
+
return EventIdentifiers.threatIdentifierList[4]
|
|
17
|
+
case .passcodeChange:
|
|
18
|
+
return EventIdentifiers.threatIdentifierList[5]
|
|
19
|
+
case .simulator:
|
|
20
|
+
return EventIdentifiers.threatIdentifierList[6]
|
|
21
|
+
case .missingSecureEnclave:
|
|
22
|
+
return EventIdentifiers.threatIdentifierList[7]
|
|
23
|
+
case .systemVPN:
|
|
24
|
+
return EventIdentifiers.threatIdentifierList[8]
|
|
25
|
+
case .deviceChange:
|
|
26
|
+
return EventIdentifiers.threatIdentifierList[9]
|
|
27
|
+
case .deviceID:
|
|
28
|
+
return EventIdentifiers.threatIdentifierList[10]
|
|
29
|
+
case .unofficialStore:
|
|
30
|
+
return EventIdentifiers.threatIdentifierList[11]
|
|
31
|
+
case .screenshot:
|
|
32
|
+
return EventIdentifiers.threatIdentifierList[12]
|
|
33
|
+
case .screenRecording:
|
|
34
|
+
return EventIdentifiers.threatIdentifierList[13]
|
|
35
|
+
@unknown default:
|
|
36
|
+
abort()
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
struct EventIdentifiers {
|
|
2
|
+
static var generatedNumbers: [Int] = {
|
|
3
|
+
var numbers = [Int]()
|
|
4
|
+
for _ in 0..<19 {
|
|
5
|
+
numbers.append(RandomGenerator.next())
|
|
6
|
+
}
|
|
7
|
+
return numbers
|
|
8
|
+
}()
|
|
9
|
+
|
|
10
|
+
static let threatChannelKey: String = String(generatedNumbers[0])
|
|
11
|
+
static let threatChannelName: String = String(generatedNumbers[1])
|
|
12
|
+
static let raspExecutionStateChannelKey: String = String(generatedNumbers[2])
|
|
13
|
+
static let raspExecutionStateChannelName: String = String(generatedNumbers[3])
|
|
14
|
+
|
|
15
|
+
static let raspExecutionStateIdentifierList: [Int] = [generatedNumbers[4]]
|
|
16
|
+
static let threatIdentifierList: [Int] = generatedNumbers.suffix(14)
|
|
17
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import Foundation
|
|
2
|
+
|
|
3
|
+
internal class RandomGenerator {
|
|
4
|
+
|
|
5
|
+
private static var generatedNumbers = Set<Int>()
|
|
6
|
+
private static let lock = NSLock()
|
|
7
|
+
|
|
8
|
+
internal static func next() -> Int {
|
|
9
|
+
lock.lock()
|
|
10
|
+
defer { lock.unlock() }
|
|
11
|
+
|
|
12
|
+
let min = 10_000_000
|
|
13
|
+
let max = 999_999_999
|
|
14
|
+
|
|
15
|
+
var nextNumber = Int.random(in: min...max)
|
|
16
|
+
|
|
17
|
+
while !generatedNumbers.insert(nextNumber).inserted {
|
|
18
|
+
nextNumber = Int.random(in: min...max)
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
return nextNumber
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import TalsecRuntime
|
|
2
|
+
|
|
3
|
+
internal func getProtectedWindow(completion: @escaping (UIWindow?) -> Void) {
|
|
4
|
+
DispatchQueue.main.async {
|
|
5
|
+
if let windowScene = UIApplication.shared.connectedScenes.first as? UIWindowScene {
|
|
6
|
+
if let window = windowScene.windows.first {
|
|
7
|
+
completion(window)
|
|
8
|
+
} else {
|
|
9
|
+
completion(nil)
|
|
10
|
+
}
|
|
11
|
+
} else {
|
|
12
|
+
completion(nil)
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
internal func getThreatIdentifiersList() -> [Int] {
|
|
18
|
+
return SecurityThreat.allCases
|
|
19
|
+
.filter {
|
|
20
|
+
threat in threat.rawValue != "passcodeChange"
|
|
21
|
+
}
|
|
22
|
+
.map {
|
|
23
|
+
threat in threat.callbackIdentifier
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
internal func getRaspExecutionStateIdentifiersList() -> [Int] {
|
|
28
|
+
return RaspExecutionStates.allCases
|
|
29
|
+
.map {
|
|
30
|
+
event in event.callbackIdentifier
|
|
31
|
+
}
|
|
32
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "capacitor-freerasp",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.3.0",
|
|
4
4
|
"description": "Capacitor plugin for improving app security and threat monitoring on Android and iOS mobile devices",
|
|
5
5
|
"main": "dist/plugin.cjs.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
"bugs": {
|
|
16
16
|
"url": "https://github.com/talsec/Free-RASP-Capacitor/issues"
|
|
17
17
|
},
|
|
18
|
+
"homepage": "https://docs.talsec.app/freerasp",
|
|
18
19
|
"keywords": [
|
|
19
20
|
"capacitor",
|
|
20
21
|
"plugin",
|
|
@@ -38,7 +39,7 @@
|
|
|
38
39
|
"verify:android": "cd android && ./gradlew clean build test && cd ..",
|
|
39
40
|
"lint": "npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint",
|
|
40
41
|
"fmt": "npm run eslint -- --fix && npm run prettier -- --write && npm run swiftlint -- --fix --format",
|
|
41
|
-
"eslint": "eslint
|
|
42
|
+
"eslint": "eslint \"src/**/*.{ts,tsx,js,jsx}\"",
|
|
42
43
|
"prettier": "prettier \"**/*.{ts, js, jsx, tsx}\"",
|
|
43
44
|
"typecheck": "tsc --noEmit",
|
|
44
45
|
"swiftlint": "node-swiftlint",
|
|
@@ -53,25 +54,29 @@
|
|
|
53
54
|
"@capacitor/android": "^5.0.0",
|
|
54
55
|
"@capacitor/core": "^5.0.0",
|
|
55
56
|
"@capacitor/ios": "^5.0.0",
|
|
56
|
-
"@
|
|
57
|
-
"@ionic/prettier-config": "^
|
|
57
|
+
"@eslint/eslintrc": "^3.0.0",
|
|
58
|
+
"@ionic/prettier-config": "^4.0.0",
|
|
58
59
|
"@ionic/swiftlint-config": "^1.1.2",
|
|
59
|
-
"eslint": "^
|
|
60
|
-
"
|
|
60
|
+
"@typescript-eslint/eslint-plugin": "^8.48.1",
|
|
61
|
+
"@typescript-eslint/parser": "^8.48.1",
|
|
62
|
+
"eslint": "^8.57.0",
|
|
63
|
+
"eslint-config-prettier": "^10.1.8",
|
|
64
|
+
"eslint-import-resolver-typescript": "^4.4.4",
|
|
65
|
+
"eslint-plugin-import": "^2.32.0",
|
|
66
|
+
"prettier": "^3.7.4",
|
|
61
67
|
"prettier-plugin-java": "~1.0.2",
|
|
62
68
|
"rimraf": "^3.0.2",
|
|
63
69
|
"rollup": "^2.32.0",
|
|
64
70
|
"swiftlint": "^1.0.1",
|
|
65
|
-
"typescript": "
|
|
71
|
+
"typescript": "^5.0.0",
|
|
72
|
+
"typescript-eslint": "^8.0.0",
|
|
73
|
+
"yaml": "^2.8.2"
|
|
66
74
|
},
|
|
67
75
|
"peerDependencies": {
|
|
68
76
|
"@capacitor/core": "*"
|
|
69
77
|
},
|
|
70
78
|
"prettier": "@ionic/prettier-config",
|
|
71
79
|
"swiftlint": "@ionic/swiftlint-config",
|
|
72
|
-
"eslintConfig": {
|
|
73
|
-
"extends": "@ionic/eslint-config/recommended"
|
|
74
|
-
},
|
|
75
80
|
"capacitor": {
|
|
76
81
|
"ios": {
|
|
77
82
|
"src": "ios"
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
package com.aheaditec.freerasp
|
|
2
|
-
|
|
3
|
-
import org.json.JSONArray
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Sealed class to represent the error codes.
|
|
7
|
-
*
|
|
8
|
-
* Sealed classes are used because of obfuscation - enums classes are not obfuscated well enough.
|
|
9
|
-
*
|
|
10
|
-
* @property value integer value of the error code.
|
|
11
|
-
*/
|
|
12
|
-
internal sealed class Threat(val value: Int) {
|
|
13
|
-
object AppIntegrity : Threat((10000..999999999).random())
|
|
14
|
-
object PrivilegedAccess : Threat((10000..999999999).random())
|
|
15
|
-
object Debug : Threat((10000..999999999).random())
|
|
16
|
-
object Hooks : Threat((10000..999999999).random())
|
|
17
|
-
object Passcode : Threat((10000..999999999).random())
|
|
18
|
-
object Simulator : Threat((10000..999999999).random())
|
|
19
|
-
object SecureHardwareNotAvailable : Threat((10000..999999999).random())
|
|
20
|
-
object DeviceBinding : Threat((10000..999999999).random())
|
|
21
|
-
object UnofficialStore : Threat((10000..999999999).random())
|
|
22
|
-
object Overlay : Threat((10000..999999999).random())
|
|
23
|
-
object ObfuscationIssues : Threat((10000..999999999).random())
|
|
24
|
-
object SystemVPN : Threat((10000..999999999).random())
|
|
25
|
-
object DevMode : Threat((10000..999999999).random())
|
|
26
|
-
object Malware : Threat((10000..999999999).random())
|
|
27
|
-
object ADBEnabled : Threat((10000..999999999).random())
|
|
28
|
-
object Screenshot : Threat((10000..999999999).random())
|
|
29
|
-
object ScreenRecording : Threat((10000..999999999).random())
|
|
30
|
-
object MultiInstance : Threat((10000..999999999).random())
|
|
31
|
-
|
|
32
|
-
companion object {
|
|
33
|
-
internal fun getThreatValues(): JSONArray {
|
|
34
|
-
return JSONArray(
|
|
35
|
-
(listOf(
|
|
36
|
-
AppIntegrity.value,
|
|
37
|
-
PrivilegedAccess.value,
|
|
38
|
-
Debug.value,
|
|
39
|
-
Hooks.value,
|
|
40
|
-
Passcode.value,
|
|
41
|
-
Simulator.value,
|
|
42
|
-
SecureHardwareNotAvailable.value,
|
|
43
|
-
SystemVPN.value,
|
|
44
|
-
DeviceBinding.value,
|
|
45
|
-
UnofficialStore.value,
|
|
46
|
-
Overlay.value,
|
|
47
|
-
ObfuscationIssues.value,
|
|
48
|
-
DevMode.value,
|
|
49
|
-
Malware.value,
|
|
50
|
-
ADBEnabled.value,
|
|
51
|
-
Screenshot.value,
|
|
52
|
-
ScreenRecording.value,
|
|
53
|
-
MultiInstance.value
|
|
54
|
-
))
|
|
55
|
-
)
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAiF5C,MAAM,OAAO,MAAM;IAuBjB,YAAY,KAAa;QACvB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;IAED,MAAM,CAAC,SAAS;QACd,OAAO,SAAS,CAAC,WAAW,EAAE,KAAK,SAAS;YAC1C,CAAC,CAAC;gBACE,IAAI,CAAC,YAAY;gBACjB,IAAI,CAAC,gBAAgB;gBACrB,IAAI,CAAC,KAAK;gBACV,IAAI,CAAC,KAAK;gBACV,IAAI,CAAC,QAAQ;gBACb,IAAI,CAAC,SAAS;gBACd,IAAI,CAAC,0BAA0B;gBAC/B,IAAI,CAAC,SAAS;gBACd,IAAI,CAAC,aAAa;gBAClB,IAAI,CAAC,eAAe;gBACpB,IAAI,CAAC,OAAO;gBACZ,IAAI,CAAC,iBAAiB;gBACtB,IAAI,CAAC,OAAO;gBACZ,IAAI,CAAC,OAAO;gBACZ,IAAI,CAAC,UAAU;gBACf,IAAI,CAAC,UAAU;gBACf,IAAI,CAAC,eAAe;gBACpB,IAAI,CAAC,aAAa;aACnB;YACH,CAAC,CAAC;gBACE,IAAI,CAAC,YAAY;gBACjB,IAAI,CAAC,gBAAgB;gBACrB,IAAI,CAAC,KAAK;gBACV,IAAI,CAAC,KAAK;gBACV,IAAI,CAAC,QAAQ;gBACb,IAAI,CAAC,SAAS;gBACd,IAAI,CAAC,0BAA0B;gBAC/B,IAAI,CAAC,SAAS;gBACd,IAAI,CAAC,aAAa;gBAClB,IAAI,CAAC,QAAQ;gBACb,IAAI,CAAC,eAAe;gBACpB,IAAI,CAAC,UAAU;gBACf,IAAI,CAAC,eAAe;aACrB,CAAC;IACR,CAAC;;AA7DM,mBAAY,GAAG,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC;AAC7B,uBAAgB,GAAG,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC;AACjC,YAAK,GAAG,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC;AACtB,YAAK,GAAG,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC;AACtB,eAAQ,GAAG,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC;AACzB,gBAAS,GAAG,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC;AAC1B,iCAA0B,GAAG,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC;AAC3C,gBAAS,GAAG,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC;AAC1B,oBAAa,GAAG,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC;AAC9B,eAAQ,GAAG,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC;AACzB,sBAAe,GAAG,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC;AAChC,cAAO,GAAG,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC;AACxB,wBAAiB,GAAG,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC;AAClC,cAAO,GAAG,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC;AACxB,cAAO,GAAG,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC;AACxB,iBAAU,GAAG,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC;AAC3B,iBAAU,GAAG,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC;AAC3B,sBAAe,GAAG,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC;AAChC,oBAAa,GAAG,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC","sourcesContent":["import { Capacitor } from '@capacitor/core';\n\nexport interface FreeraspPlugin {\n addListener(listener: string, callback: (event: any) => void): any;\n talsecStart(options: {\n config: FreeraspConfig;\n }): Promise<{ started: boolean }>;\n onInvalidCallback(): void;\n getThreatIdentifiers(): Promise<{ ids: number[] }>;\n getThreatChannelData(): Promise<{ ids: [string, string, string] }>;\n addToWhitelist(options: {\n packageName: string;\n }): Promise<{ result: boolean }>;\n getAppIcon(options: { packageName: string }): Promise<{ result: string }>;\n blockScreenCapture(options: {\n enable: boolean;\n }): Promise<{ result: boolean }>;\n isScreenCaptureBlocked(): Promise<{ result: boolean }>;\n storeExternalId(options: { data: string }): Promise<{ result: boolean }>;\n}\n\nexport type FreeraspConfig = {\n androidConfig?: AndroidConfig;\n iosConfig?: IOSConfig;\n watcherMail: string;\n isProd?: boolean;\n};\n\nexport type AndroidConfig = {\n packageName: string;\n certificateHashes: string[];\n supportedAlternativeStores?: string[];\n malwareConfig?: MalwareConfig;\n};\n\nexport type IOSConfig = {\n appBundleId: string;\n appTeamId: string;\n};\n\nexport type MalwareConfig = {\n blacklistedHashes?: string[];\n blacklistedPackageNames?: string[];\n suspiciousPermissions?: string[][];\n whitelistedInstallationSources?: string[];\n};\n\nexport type SuspiciousAppInfo = {\n packageInfo: PackageInfo;\n reason: string;\n};\n\nexport type PackageInfo = {\n packageName: string;\n appName?: string;\n version?: string;\n appIcon?: string;\n installerStore?: string;\n};\n\nexport type NativeEventEmitterActions = {\n privilegedAccess?: () => any;\n debug?: () => any;\n simulator?: () => any;\n appIntegrity?: () => any;\n unofficialStore?: () => any;\n hooks?: () => any;\n deviceBinding?: () => any;\n deviceID?: () => any;\n passcode?: () => any;\n secureHardwareNotAvailable?: () => any;\n obfuscationIssues?: () => any;\n devMode?: () => any;\n systemVPN?: () => any;\n malware?: (suspiciousApps: SuspiciousAppInfo[]) => any;\n adbEnabled?: () => any;\n screenshot?: () => any;\n screenRecording?: () => any;\n multiInstance?: () => any;\n};\n\nexport class Threat {\n value: number;\n\n static AppIntegrity = new Threat(0);\n static PrivilegedAccess = new Threat(0);\n static Debug = new Threat(0);\n static Hooks = new Threat(0);\n static Passcode = new Threat(0);\n static Simulator = new Threat(0);\n static SecureHardwareNotAvailable = new Threat(0);\n static SystemVPN = new Threat(0);\n static DeviceBinding = new Threat(0);\n static DeviceID = new Threat(0);\n static UnofficialStore = new Threat(0);\n static Overlay = new Threat(0);\n static ObfuscationIssues = new Threat(0);\n static DevMode = new Threat(0);\n static Malware = new Threat(0);\n static ADBEnabled = new Threat(0);\n static Screenshot = new Threat(0);\n static ScreenRecording = new Threat(0);\n static MultiInstance = new Threat(0);\n\n constructor(value: number) {\n this.value = value;\n }\n\n static getValues(): Threat[] {\n return Capacitor.getPlatform() === 'android'\n ? [\n this.AppIntegrity,\n this.PrivilegedAccess,\n this.Debug,\n this.Hooks,\n this.Passcode,\n this.Simulator,\n this.SecureHardwareNotAvailable,\n this.SystemVPN,\n this.DeviceBinding,\n this.UnofficialStore,\n this.Overlay,\n this.ObfuscationIssues,\n this.DevMode,\n this.Malware,\n this.ADBEnabled,\n this.Screenshot,\n this.ScreenRecording,\n this.MultiInstance,\n ]\n : [\n this.AppIntegrity,\n this.PrivilegedAccess,\n this.Debug,\n this.Hooks,\n this.Passcode,\n this.Simulator,\n this.SecureHardwareNotAvailable,\n this.SystemVPN,\n this.DeviceBinding,\n this.DeviceID,\n this.UnofficialStore,\n this.Screenshot,\n this.ScreenRecording,\n ];\n }\n}\n"]}
|
package/dist/esm/utils.d.ts
DELETED
package/dist/esm/utils.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Threat } from './definitions';
|
|
2
|
-
export const getThreatCount = () => {
|
|
3
|
-
return Threat.getValues().length;
|
|
4
|
-
};
|
|
5
|
-
export const itemsHaveType = (data, desiredType) => {
|
|
6
|
-
return data.every(item => typeof item === desiredType);
|
|
7
|
-
};
|
|
8
|
-
//# sourceMappingURL=utils.js.map
|