forked from 0x101-Cyber-Security/NetLock-RMM
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApplication_Paths.cs
More file actions
52 lines (42 loc) · 2.12 KB
/
Application_Paths.cs
File metadata and controls
52 lines (42 loc) · 2.12 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
using System.Runtime.InteropServices;
namespace NetLock_RMM_Web_Console
{
public class Application_Paths
{
//public static string logs_dir = @"C:\ProgramData\0x101 Cyber Security\NetLock RMM\Web Console\Logs";
public static string logs_dir = Path.Combine(GetBasePath(), "0x101 Cyber Security", "NetLock RMM", "Web Console", "Logs");
public static string _private_files_devices = "devices";
public static string internal_dir = Path.Combine(GetCurrentDirectory(), "internal");
public static string internal_temp_dir = Path.Combine(GetCurrentDirectory(), "internal", "temp");
public static string internal_recordings_dir = Path.Combine(GetCurrentDirectory(), "internal", "recordings");
public static string internal_recordings_zipped_dir = Path.Combine(GetCurrentDirectory(), "internal", "recordings_zipped");
//OSSCH_START 9379e8fd-61ba-4090-91d4-9c37664dc53d //OSSCH_END
public static string certificates_path = Path.Combine(GetCurrentDirectory(), "certificates");
private static string GetBasePath()
{
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
return Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData);
}
else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux) && Application_Settings.IsLiveEnvironment)
{
return "/var";
}
else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux) && !Application_Settings.IsLiveEnvironment)
{
return "/home/nico-mak/.local/share";
}
else
{
throw new NotSupportedException("Unsupported OS");
}
}
private static string GetCurrentDirectory()
{
return AppContext.BaseDirectory;
}
//public static string debug_txt_path = @"C:\ProgramData\0x101 Cyber Security\NetLock RMM\Web Console\debug.txt";
//URLs
public static string redirect_path = "/redirect";
}
}