-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathGame.cs
More file actions
121 lines (98 loc) · 3.04 KB
/
Game.cs
File metadata and controls
121 lines (98 loc) · 3.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
using System;
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public class Game : MonoBehaviour, ThreatDetectedCallback
{
// Start is called once before the first execution of Update after the MonoBehaviour is created
void Start()
{
// Create unified TalsecConfig with all settings
var config = new TalsecConfig
{
watcherMailAddress = "security@example.com",
isProd = true,
androidConfig = new AndroidConfig
{
packageName = "com.unity.freeRASP",
signingCertificateHashBase64 = new string[] { "Tmac/QIomCqEGS1jYqy9cMMrqaitVoZLpjXzCMnt55Q=" },
supportedAlternativeStores = new string[] { "com.sec.android.app.samsungapps" }
}
};
// set callback
TalsecPlugin.Instance.setThreatDetectedCallback(this);
// initialize talsec with new unified config
TalsecPlugin.Instance.initTalsec(config);
}
// Implementation of ThreatDetectedCallback interface
public void onPrivilegedAccess()
{
Debug.Log("Unity - Root detected");
}
public void onAppIntegrity()
{
Debug.Log("Unity - Tamper detected");
}
public void onDebug()
{
Debug.Log("Unity - Debugger detected");
}
public void onSimulator()
{
Debug.Log("Unity - Emulator detected");
}
public void onObfuscationIssues()
{
Debug.Log("Unity - Obfuscation issues detected");
}
public void onScreenshot()
{
Debug.Log("Unity - Screenshot detected");
}
public void onScreenRecording()
{
Debug.Log("Unity - Screen recording detected");
}
public void onUnofficialStore() {
Debug.Log("Unity - Untrusted installation source detected");
}
public void onHooks() {
Debug.Log("Unity - Hook detected");
}
public void onDeviceBinding() {
Debug.Log("Unity - Device binding detected");
}
public void onPasscode() {
Debug.Log("Unity - Unlocked device detected");
}
public void onPasscodeChange() {
Debug.Log("Unity - Passcode change detected");
}
public void onDeviceID() {
Debug.Log("Unity - Device ID detected");
}
public void onSecureHardwareNotAvailable() {
Debug.Log("Unity - Hardware backed keystore not available detected");
}
public void onDevMode() {
Debug.Log("Unity - Developer mode detected");
}
public void onADBEnabled() {
Debug.Log("Unity - ADB enabled detected");
}
public void onSystemVPN() {
Debug.Log("Unity - System VPN detected");
}
public void onMultiInstance() {
Debug.Log("Unity - Multi instance detected");
}
public void onUnsecureWiFi() {
Debug.Log("Unity - Unsecure WiFi detected");
}
public void onTimeSpoofing() {
Debug.Log("Unity - Time spoofing detected");
}
public void onLocationSpoofing() {
Debug.Log("Unity - Location spoofing detected");
}
}