Merge branch 'release/UpdateKeyGenProcess'

This commit is contained in:
Samuele Locatelli
2022-06-08 19:13:31 +02:00
46 changed files with 850 additions and 596 deletions
+7 -8
View File
@@ -7,13 +7,12 @@
#--------------------------------
# aree temp: log/bin/obj
#--------------------------------
/*/*/bin/*
/*/*/obj/*
/*/*/logs/*.txt
/*/*/logs/*.log
/*/*/logs/*.zip
/*/bin/*
/*/obj/*
/*/logs/*.txt
/*/logs/*.log
/*/logs/*.zip
/*/logs/*.json
# ---> VisualStudio
## Ignore Visual Studio temporary files, build results, and
@@ -346,4 +345,4 @@ UpgradeLog*.XML
.fake
.ionide
.ionide
+114 -52
View File
@@ -2,6 +2,7 @@ variables:
VERS_MAIN: '0.9'
NEW_REL: ''
APP_NAME: ''
APP_CONF: 'Release'
# Step esecuzione script powershell x code obfuscation (tool install + esecuzione)
.obfuscate: &obfuscate
@@ -59,8 +60,8 @@ variables:
mCurl -v -u GitLab:$NEXUS_PASSWD --upload-file "$env:APP_NAME\Resources\manifest.xml" https://nexus.steamware.net/repository/SWS/$env:APP_NAME/$version/LAST/manifest.xml
mCurl -v -u GitLab:$NEXUS_PASSWD --upload-file "$env:APP_NAME\Resources\ChangeLog.html" https://nexus.steamware.net/repository/SWS/$env:APP_NAME/$version/LAST/ChangeLog.html
# helper creazione files zip
.zipper: &zipper
# helper creazione files zip x app console
.artifactZipper: &artifactZipper
- |
$7zipPath = $env:ProgramFiles+"\7-Zip\7z.exe"
if (-not (Test-Path -Path $7zipPath -PathType Leaf)) {
@@ -68,41 +69,25 @@ variables:
}
Set-Alias 7zip $7zipPath
$Target = "$env:APP_NAME\Releases\" + $CI_COMMIT_BRANCH + "\" + $env:APP_NAME + ".zip"
$Source = "$env:APP_NAME\bin\publish\net6.0\*"
$Source = "$env:APP_NAME\bin\$env:APP_CONF\net6.0\*"
7zip a -tzip $Target $Source -xr!DATA
echo "called ZIP $Source --> $Target"
# helper copia pubblicati in dir x upload
.artifactMover: &artifactMover
- |
$Target = "$env:APP_NAME\Releases\" + $CI_COMMIT_BRANCH + "\"
$Source = "$env:APP_NAME\bin\publish\net6.0\"
ROBOCOPY $Source $Target /MIR
echo "called ROBOCOPY $Source --> $Target"
stages:
- build
- staging
- deploy
- release
UI:build:
stage: build
tags:
- win
variables:
APP_NAME: MP.MONO.UI
before_script:
- *nuget-fix
- dotnet restore MP.MONO.ALL.sln
script:
- dotnet build $env:APP_NAME/$env:APP_NAME.csproj
- pack
SIM:build:
stage: build
tags:
- win
variables:
APP_NAME: MP.MONO.SIM
before_script:
- *nuget-fix
- dotnet restore MP.MONO.ALL.sln
script:
- dotnet build $env:APP_NAME/$env:APP_NAME.csproj
DECODER:build:
stage: build
tags:
@@ -115,6 +100,30 @@ DECODER:build:
script:
- dotnet build $env:APP_NAME/$env:APP_NAME.csproj
SIM:build:
stage: build
tags:
- win
variables:
APP_NAME: MP.MONO.SIM
before_script:
- *nuget-fix
- dotnet restore MP.MONO.ALL.sln
script:
- dotnet build $env:APP_NAME/$env:APP_NAME.csproj
UI:build:
stage: build
tags:
- win
variables:
APP_NAME: MP.MONO.UI
before_script:
- *nuget-fix
- dotnet restore MP.MONO.ALL.sln
script:
- dotnet build $env:APP_NAME/$env:APP_NAME.csproj
UI:staging:
stage: staging
tags:
@@ -142,48 +151,101 @@ UI:deploy:
# IIS DEV
- dotnet publish -p:PublishProfile=IIS03.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=viadante16 -p:AllowUntrustedCertificate=true $env:APP_NAME/$env:APP_NAME.csproj
SIM:release:
stage: release
DECODER:packDebug:
stage: pack
tags:
- win
only:
- main
- develop
variables:
APP_NAME: MP.MONO.DECODER
APP_CONF: Debug
needs: ["DECODER:build"]
script:
- dotnet publish -p:PublishProfile=SingleFileX86.pubxml -p:RunCodeAnalysis=false -p:Configuration=$env:APP_CONF $env:APP_NAME/$env:APP_NAME.csproj
- *artifactZipper
- *hashBuild
- *nexusUpload
SIM:packDebug:
stage: pack
tags:
- win
only:
- develop
variables:
APP_NAME: MP.MONO.SIM
APP_CONF: Debug
needs: ["SIM:build"]
script:
- dotnet publish -p:PublishProfile=SingleFileX86.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release $env:APP_NAME/$env:APP_NAME.csproj
- *zipper
- dotnet publish -p:PublishProfile=SingleFileX86.pubxml -p:RunCodeAnalysis=false -p:Configuration=$env:APP_CONF $env:APP_NAME/$env:APP_NAME.csproj
- *artifactZipper
- *hashBuild
- *nexusUpload
DECODER:release:
stage: release
UI:packDebug:
stage: pack
tags:
- win
only:
- develop
variables:
APP_NAME: MP.MONO.UI
APP_CONF: Debug
needs: ["UI:build"]
script:
- dotnet publish -p:PublishProfile=IISProfile.pubxml -p:RunCodeAnalysis=false -p:Configuration=$env:APP_CONF $env:APP_NAME/$env:APP_NAME.csproj -o:publish
- *artifactMover
- *hashBuild
- *nexusUpload
DECODER:packRelease:
stage: pack
tags:
- win
only:
- main
variables:
APP_NAME: MP.MONO.DECODER
APP_CONF: Release
needs: ["DECODER:build"]
script:
- dotnet publish -p:PublishProfile=SingleFileX86.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release $env:APP_NAME/$env:APP_NAME.csproj
- *zipper
- dotnet publish -p:PublishProfile=SingleFileX86.pubxml -p:RunCodeAnalysis=false -p:Configuration=$env:APP_CONF $env:APP_NAME/$env:APP_NAME.csproj
- *artifactZipper
- *hashBuild
- *nexusUpload
# UI:release:
# stage: release
# tags:
# - win
# only:
# - main
# except:
# - branches
# needs: ["UI:build"]
# artifacts:
# paths:
# - publish/
# script:
# - dotnet publish -c Release -o ./publish $env:APP_NAME/$env:APP_NAME.csproj
SIM:packRelease:
stage: pack
tags:
- win
only:
- main
variables:
APP_NAME: MP.MONO.SIM
APP_CONF: Release
needs: ["SIM:build"]
script:
- dotnet publish -p:PublishProfile=SingleFileX86.pubxml -p:RunCodeAnalysis=false -p:Configuration=$env:APP_CONF $env:APP_NAME/$env:APP_NAME.csproj
- *artifactZipper
- *hashBuild
- *nexusUpload
UI:packRelease:
stage: pack
tags:
- win
only:
- main
variables:
APP_NAME: MP.MONO.UI
APP_CONF: Release
needs: ["UI:build"]
script:
- dotnet publish -p:PublishProfile=IISProfile.pubxml -p:RunCodeAnalysis=false -p:Configuration=$env:APP_CONF $env:APP_NAME/$env:APP_NAME.csproj -o:publish
- *artifactMover
- *hashBuild
- *nexusUpload
+1 -1
View File
@@ -5,7 +5,7 @@
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Version>1.12206.714</Version>
<Version>1.12206.819</Version>
</PropertyGroup>
<ItemGroup>
+1 -1
View File
@@ -1,6 +1,6 @@
<body>
<i>MAPO-MONO</i>
<h4>Version: 1.12206.714</h4>
<h4>Version: 1.12206.819</h4>
<br /> Release Note:
<ul>
<li>
+1 -1
View File
@@ -1 +1 @@
1.12206.714
1.12206.819
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>1.12206.714</version>
<version>1.12206.819</version>
<url>http://nexus.steamware.net/repository/SWS/MP.MONO.ADAPTER/stable/LAST/MP.Mon.zip</url>
<changelog>http://nexus.steamware.net/repository/SWS/MP.MONO.ADAPTER/stable/LAST/ChangeLog.html</changelog>
<mandatory>false</mandatory>
+1 -1
View File
@@ -6,7 +6,7 @@
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Platforms>AnyCPU;x86;x64</Platforms>
<Version>1.12206.714</Version>
<Version>1.12206.819</Version>
</PropertyGroup>
<ItemGroup>
+1 -1
View File
@@ -1,6 +1,6 @@
<body>
<i>MAPO-MONO</i>
<h4>Version: 1.12206.714</h4>
<h4>Version: 1.12206.819</h4>
<br /> Release Note:
<ul>
<li>
+1 -1
View File
@@ -1 +1 @@
1.12206.714
1.12206.819
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>1.12206.714</version>
<version>1.12206.819</version>
<url>http://nexus.steamware.net/repository/SWS/MP.MONO.ANALYZER/stable/LAST/MP.Mon.zip</url>
<changelog>http://nexus.steamware.net/repository/SWS/MP.MONO.ANALYZER/stable/LAST/ChangeLog.html</changelog>
<mandatory>false</mandatory>
+13
View File
@@ -0,0 +1,13 @@
// This file is used by Code Analysis to maintain SuppressMessage
// attributes that are applied to this project.
// Project-level suppressions either have no target or are given
// a specific target and scoped to a namespace, type, member, etc.
using System.Diagnostics.CodeAnalysis;
[assembly: SuppressMessage("Interoperability", "CA1416:Validate platform compatibility", Justification = "<Pending>", Scope = "member", Target = "~M:MP.MONO.Core.MachineInfo.GetBiosInfo~System.Threading.Tasks.Task{System.Collections.Generic.Dictionary{System.String,System.String}}")]
[assembly: SuppressMessage("Interoperability", "CA1416:Validate platform compatibility", Justification = "<Pending>", Scope = "member", Target = "~M:MP.MONO.Core.MachineInfo.searchWmiParam(System.Collections.Generic.Dictionary{System.String,System.String},System.Management.ManagementObject,System.String,System.String)")]
[assembly: SuppressMessage("Interoperability", "CA1416:Validate platform compatibility", Justification = "<Pending>", Scope = "member", Target = "~M:MP.MONO.Core.MachineInfo.GetCpuInfo~System.Threading.Tasks.Task{System.Collections.Generic.Dictionary{System.String,System.String}}")]
[assembly: SuppressMessage("Interoperability", "CA1416:Validate platform compatibility", Justification = "<Pending>", Scope = "member", Target = "~M:MP.MONO.Core.MachineInfo.GetNetInfo~System.Threading.Tasks.Task{System.Collections.Generic.Dictionary{System.String,System.String}}")]
[assembly: SuppressMessage("Interoperability", "CA1416:Validate platform compatibility", Justification = "<Pending>", Scope = "member", Target = "~M:MP.MONO.Core.MachineInfo.GetOsInfo~System.Threading.Tasks.Task{System.Collections.Generic.Dictionary{System.String,System.String}}")]
[assembly: SuppressMessage("Interoperability", "CA1416:Validate platform compatibility", Justification = "<Pending>", Scope = "member", Target = "~M:MP.MONO.Core.MachineInfo.GetRamInfo~System.Threading.Tasks.Task{System.Collections.Generic.Dictionary{System.String,System.String}}")]
+180
View File
@@ -0,0 +1,180 @@
using System.Security.Cryptography;
using System.Text;
namespace MP.MONO.Core
{
/// <summary>
/// Classe validazione valori
/// </summary>
public class MachineDataValidator
{
#region Public Constructors
/// <summary>
/// Init classe validatore
/// </summary>
/// <param name="currMachineData"></param>
public MachineDataValidator()
{
// inizializzo info di base
machTestData = setupData().Result;
}
#endregion Public Constructors
#region Public Properties
/// <summary>
/// Restituisce HASH del codice impiego = payload utente
/// </summary>
/// <returns></returns>
public string macHash
{
get => calcMachineHash();
}
#endregion Public Properties
#region Public Methods
/// <summary>
/// Verifica validità info correnti
/// </summary>
/// <returns></returns>
public static async Task<bool> testCurrInfo()
{
var cDV = new MachineDataValidator();
return await cDV.testInfo();
}
#endregion Public Methods
#region Private Fields
/// <summary>
/// Dati rispetto cui fare i calcoli di validazione
/// </summary>
private Dictionary<string, string> machTestData = new Dictionary<string, string>();
#endregion Private Fields
#region Private Methods
/// <summary>
/// Calcola HASH del codice impiego = payload utente
/// </summary>
/// <returns></returns>
private string calcMachineHash()
{
string hash = "";
string buffData = currBaseBuffer();
if (!string.IsNullOrEmpty(buffData))
{
// hashing!
using (var hAlgo = SHA512.Create())
//using (var hAlgo = MD5.Create())
{
byte[] InputBytes = Encoding.UTF8.GetBytes(buffData);
var byteHash = hAlgo.ComputeHash(InputBytes);
hash = BitConverter.ToString(byteHash).Replace("-", "").Replace("/", "").Replace("\\", "").ToLowerInvariant();
}
}
return hash;
}
/// <summary>
/// Calcola hash key da info PC
/// </summary>
/// <returns></returns>
private string currBaseBuffer()
{
string answ = "????????????????????????????????????????????";
StringBuilder sb = new StringBuilder();
try
{
// calcolo hashKey da alcuni valori solamente
sb.Append($"{machTestData["SystemName"]}|");
sb.Append($"{machTestData["ProcessorId"]}|");
sb.Append($"{machTestData["PartNumber"]}|");
sb.Append($"{machTestData["MACAddress"]}|");
sb.Append($"{machTestData["SerialNumber"]}|");
sb.Append($"{machTestData["OSArchitecture"]}|");
sb.Append($"{machTestData["SoftwareElementID"]}|");
sb.Append($"{machTestData["SystemBiosMajorVersion"]}|");
sb.Append($"{machTestData["SystemBiosMinorVersion"]}|");
sb.Append($"{machTestData["CpuVersion"]}|");
sb.Append($"{machTestData["BiosVersion"]}|");
if (sb.Length > 0)
{
answ = sb.ToString();
// lo uso 2 volte dritto e reverse...
answ += ReverseString(sb.ToString());
}
}
catch
{ }
return answ;
}
/// <summary>
/// Esegue reverse delal stringa
/// </summary>
/// <param name="myStr"></param>
/// <returns></returns>
private string ReverseString(string myStr)
{
char[] myArr = myStr.ToCharArray();
Array.Reverse(myArr);
return new string(myArr);
}
/// <summary>
/// Legge la hash key dal file licenza salvato
/// </summary>
/// <returns></returns>
/// <exception cref="NotImplementedException"></exception>
private async Task<string> getSavedHash()
{
string answ = "############################################################";
string filePath = "Conf/lic.file";
if (File.Exists(filePath))
{
answ = await File.ReadAllTextAsync(filePath);
}
return answ;
}
/// <summary>
/// Predispone elenco dati di test
/// </summary>
/// <returns></returns>
private async Task<Dictionary<string, string>> setupData()
{ // creo un unico array di info
Dictionary<string, string> testData = new Dictionary<string, string>();
var biosInfo = await MachineInfo.GetInfo("BIOS");
var cpuInfo = await MachineInfo.GetInfo("CPU");
var netInfo = await MachineInfo.GetInfo("NET");
var osInfo = await MachineInfo.GetInfo("OS");
var ramInfo = await MachineInfo.GetInfo("RAM");
testData = biosInfo.Concat(cpuInfo).Concat(netInfo).Concat(osInfo).Concat(ramInfo).GroupBy(ele => ele.Key).ToDictionary(ele => ele.Key, ele => ele.First().Value);
return testData;
}
/// <summary>
/// Effettua verifica putuale tra hash Key fornita ed hash key calcolata da info PC
/// </summary>
/// <returns></returns>
private async Task<bool> testInfo()
{
// recupero hash key da conf applicativo (licenza)
string fileHash = await getSavedHash();
/// recupero hash calcolata
string calcHash = calcMachineHash();
// confronto con hashKey calcolata da info PC + dati...
return fileHash.Equals(calcHash);
}
#endregion Private Methods
}
}
+158 -457
View File
@@ -10,11 +10,59 @@ namespace MP.MONO.Core
{
#region Public Methods
/// <summary>
/// Restitusice info richieste
/// </summary>
/// <param name="infoType"></param>
/// <returns></returns>
public static async Task<Dictionary<string, string>> GetInfo(string infoType)
{
var outInfo = new Dictionary<string, string>();
switch (infoType)
{
case "BIOS":
outInfo = await GetBiosInfo();
break;
case "CPU":
outInfo = await GetCpuInfo();
break;
case "NET":
outInfo = await GetNetInfo();
break;
case "OS":
outInfo = await GetOsInfo();
break;
case "RAM":
outInfo = await GetRamInfo();
break;
default:
break;
}
return outInfo;
}
#endregion Public Methods
#region Private Fields
private static Logger Log = LogManager.GetCurrentClassLogger();
#endregion Private Fields
#region Private Methods
/// <summary>
/// Info BIOS
/// </summary>
/// <returns></returns>
public static async Task<Dictionary<string, string>> GetBiosInfo()
private static async Task<Dictionary<string, string>> GetBiosInfo()
{
ManagementObjectCollection moc;
var Processor = new Dictionary<string, string>();
@@ -31,88 +79,46 @@ namespace MP.MONO.Core
foreach (ManagementObject obj in moc)
{
try
{
Processor.Add("Manufacturer", obj["Manufacturer"].ToString());
}
catch
{ }
try
{
Processor.Add("ReleaseDate", obj["ReleaseDate"].ToString());
}
catch
{ }
try
{
Processor.Add("SMBIOSBIOSVersion", obj["SMBIOSBIOSVersion"].ToString());
}
catch
{ }
try
{
Processor.Add("SMBIOSMajorVersion", obj["SMBIOSMajorVersion"].ToString());
}
catch
{ }
try
{
Processor.Add("SMBIOSMinorVersion", obj["SMBIOSMinorVersion"].ToString());
}
catch
{ }
try
{
Processor.Add("SoftwareElementID", obj["SoftwareElementID"].ToString());
}
catch
{ }
try
{
Processor.Add("SoftwareElementState", obj["SoftwareElementState"].ToString());
}
catch
{ }
try
{
Processor.Add("SystemBiosMajorVersion", obj["SystemBiosMajorVersion"].ToString());
}
catch
{ }
try
{
Processor.Add("SystemBiosMinorVersion", obj["SystemBiosMinorVersion"].ToString());
}
catch
{ }
try
{
Processor.Add("Version", obj["Version"].ToString());
}
catch
{ }
searchWmiParam(Processor, obj, "Manufacturer", "Manufacturer");
searchWmiParam(Processor, obj, "ReleaseDate", "ReleaseDate");
searchWmiParam(Processor, obj, "SMBIOSBIOSVersion", "SMBIOSBIOSVersion");
searchWmiParam(Processor, obj, "SMBIOSMajorVersion", "SMBIOSMajorVersion");
searchWmiParam(Processor, obj, "SMBIOSMinorVersion", "SMBIOSMinorVersion");
searchWmiParam(Processor, obj, "SoftwareElementID", "SoftwareElementID");
searchWmiParam(Processor, obj, "SoftwareElementState", "SoftwareElementState");
searchWmiParam(Processor, obj, "SystemBiosMajorVersion", "SystemBiosMajorVersion");
searchWmiParam(Processor, obj, "SystemBiosMajorVersion", "SystemBiosMajorVersion");
searchWmiParam(Processor, obj, "SystemBiosMinorVersion", "SystemBiosMinorVersion");
searchWmiParam(Processor, obj, "BiosVersion", "Version");
}
return Processor;
}
/// <summary>
/// Effettua estrazione parametri WMI da elenco recuperato
/// </summary>
/// <param name="Processor"></param>
/// <param name="obj"></param>
/// <param name="pName"></param>
/// <param name="pKey"></param>
private static void searchWmiParam(Dictionary<string, string> Processor, ManagementObject obj, string pName, string pKey)
{
try
{
var objVal = $"{obj[pKey]}";
string strVal = objVal != null ? objVal : "";
Processor.Add(pName, strVal);
}
catch
{ }
}
/// <summary>
/// Info processore
/// </summary>
/// <returns></returns>
public static async Task<Dictionary<string, string>> GetCpuInfo()
private static async Task<Dictionary<string, string>> GetCpuInfo()
{
ManagementObjectCollection moc;
var Processor = new Dictionary<string, string>();
@@ -129,159 +135,29 @@ namespace MP.MONO.Core
foreach (ManagementObject obj in moc)
{
try
{
Processor.Add("AddressWidth", obj["AddressWidth"].ToString());
}
catch
{ }
try
{
Processor.Add("Architecture", obj["Architecture"].ToString());
}
catch
{ }
try
{
Processor.Add("CurrentClockSpeed", obj["CurrentClockSpeed"].ToString());
}
catch
{ }
try
{
Processor.Add("CurrentVoltage", obj["CurrentVoltage"].ToString());
}
catch
{ }
try
{
Processor.Add("DataWidth", obj["DataWidth"].ToString());
}
catch
{ }
try
{
Processor.Add("Description", obj["Description"].ToString());
}
catch
{ }
try
{
Processor.Add("ExtClock", obj["ExtClock"].ToString());
}
catch
{ }
try
{
Processor.Add("Family", obj["Family"].ToString());
}
catch
{ }
try
{
Processor.Add("L2CacheSize", obj["L2CacheSize"].ToString());
}
catch
{ }
try
{
Processor.Add("L3CacheSize", obj["L3CacheSize"].ToString());
}
catch
{ }
try
{
Processor.Add("Level", obj["Level"].ToString());
}
catch
{ }
try
{
Processor.Add("LoadPercentage", obj["LoadPercentage"].ToString());
}
catch
{ }
try
{
Processor.Add("Manufacturer", obj["Manufacturer"].ToString());
}
catch
{ }
try
{
Processor.Add("NumberOfCores", obj["NumberOfCores"].ToString());
}
catch
{ }
try
{
Processor.Add("NumberOfLogicalProcessors", obj["NumberOfLogicalProcessors"].ToString());
}
catch
{ }
try
{
Processor.Add("ProcessorId", obj["Processorid"].ToString());
}
catch
{ }
try
{
Processor.Add("ProcessorType", obj["ProcessorType"].ToString());
}
catch
{ }
try
{
Processor.Add("Revision", obj["Revision"].ToString());
}
catch
{ }
try
{
Processor.Add("Role", obj["Role"].ToString());
}
catch
{ }
try
{
Processor.Add("SocketDesignation", obj["SocketDesignation"].ToString());
}
catch
{ }
try
{
Processor.Add("SystemName", obj["SystemName"].ToString());
}
catch
{ }
try
{
Processor.Add("Version", obj["Version"].ToString());
}
catch
{ }
searchWmiParam(Processor, obj, "AddressWidth", "AddressWidth");
searchWmiParam(Processor, obj, "Architecture", "Architecture");
searchWmiParam(Processor, obj, "CurrentClockSpeed", "CurrentClockSpeed");
searchWmiParam(Processor, obj, "CurrentVoltage", "CurrentVoltage");
searchWmiParam(Processor, obj, "DataWidth", "DataWidth");
searchWmiParam(Processor, obj, "Description", "Description");
searchWmiParam(Processor, obj, "ExtClock", "ExtClock");
searchWmiParam(Processor, obj, "Family", "Family");
searchWmiParam(Processor, obj, "L2CacheSize", "L2CacheSize");
searchWmiParam(Processor, obj, "L3CacheSize", "L3CacheSize");
searchWmiParam(Processor, obj, "Level", "Level");
searchWmiParam(Processor, obj, "LoadPercentage", "LoadPercentage");
searchWmiParam(Processor, obj, "Manufacturer", "Manufacturer");
searchWmiParam(Processor, obj, "NumberOfCores", "NumberOfCores");
searchWmiParam(Processor, obj, "NumberOfLogicalProcessors", "NumberOfLogicalProcessors");
searchWmiParam(Processor, obj, "ProcessorId", "ProcessorId");
searchWmiParam(Processor, obj, "ProcessorType", "ProcessorType");
searchWmiParam(Processor, obj, "Revision", "Revision");
searchWmiParam(Processor, obj, "Role", "Role");
searchWmiParam(Processor, obj, "SocketDesignation", "SocketDesignation");
searchWmiParam(Processor, obj, "SystemName", "SystemName");
searchWmiParam(Processor, obj, "CpuVersion", "Version");
}
return Processor;
@@ -291,7 +167,7 @@ namespace MP.MONO.Core
/// Info Networking
/// </summary>
/// <returns></returns>
public static async Task<Dictionary<string, string>> GetNetInfo()
private static async Task<Dictionary<string, string>> GetNetInfo()
{
ManagementObjectCollection moc;
var Processor = new Dictionary<string, string>();
@@ -308,183 +184,17 @@ namespace MP.MONO.Core
foreach (ManagementObject obj in moc)
{
try
{
Processor.Add("AdapterType", obj["AdapterType"].ToString());
}
catch
{ }
try
{
Processor.Add("Description", obj["Description"].ToString());
}
catch
{ }
try
{
Processor.Add("GUID", obj["GUID"].ToString());
}
catch
{ }
try
{
Processor.Add("MACAddress", obj["MACAddress"].ToString());
}
catch
{ }
try
{
Processor.Add("Manufacturer", obj["Manufacturer"].ToString());
}
catch
{ }
try
{
Processor.Add("Name", obj["Name"].ToString());
}
catch
{ }
try
{
Processor.Add("SystemName", obj["SystemName"].ToString());
}
catch
{ }
try
{
Processor.Add("PhysicalAdapter", obj["PhysicalAdapter"].ToString());
}
catch
{ }
try
{
Processor.Add("ProductName", obj["ProductName"].ToString());
}
catch
{ }
try
{
Processor.Add("ServiceName", obj["ServiceName"].ToString());
}
catch
{ }
}
return Processor;
}
/// <summary>
/// Info RAM
/// </summary>
/// <returns></returns>
public static async Task<Dictionary<string, string>> GetRamInfo()
{
ManagementObjectCollection moc;
var Processor = new Dictionary<string, string>();
try
{
moc = new ManagementObjectSearcher("select * from Win32_PhysicalMemory").Get();
}
catch
{
Log.Error("Error: WMI API Not loaded.");
return Processor;
}
foreach (ManagementObject obj in moc)
{
try
{
Processor.Add("DeviceLocator", obj["DeviceLocator"].ToString());
}
catch
{ }
try
{
Processor.Add("DataWidth", obj["DataWidth"].ToString());
}
catch
{ }
try
{
Processor.Add("ConfiguredVoltage", obj["ConfiguredVoltage"].ToString());
}
catch
{ }
try
{
Processor.Add("FormFactor", obj["FormFactor"].ToString());
}
catch
{ }
try
{
Processor.Add("ConfiguredClockSpeed", obj["ConfiguredClockSpeed"].ToString());
}
catch
{ }
try
{
Processor.Add("SerialNumber", obj["SerialNumber"].ToString());
}
catch
{ }
try
{
Processor.Add("MaxVoltage", obj["MaxVoltage"].ToString());
}
catch
{ }
try
{
Processor.Add("MinVoltage", obj["MinVoltage"].ToString());
}
catch
{ }
try
{
Processor.Add("Speed", obj["Speed"].ToString());
}
catch
{ }
try
{
Processor.Add("OtherIdentifyingInfo", obj["OtherIdentifyingInfo"].ToString());
}
catch
{ }
try
{
Processor.Add("SMBIOSMemoryType", obj["SMBIOSMemoryType"].ToString());
}
catch
{ }
try
{
Processor.Add("PartNumber", obj["PartNumber"].ToString());
}
catch
{ }
searchWmiParam(Processor, obj, "AdapterType", "AdapterType");
searchWmiParam(Processor, obj, "Description", "Description");
searchWmiParam(Processor, obj, "GUID", "GUID");
searchWmiParam(Processor, obj, "MACAddress", "MACAddress");
searchWmiParam(Processor, obj, "Manufacturer", "Manufacturer");
searchWmiParam(Processor, obj, "Name", "Name");
searchWmiParam(Processor, obj, "SystemName", "SystemName");
searchWmiParam(Processor, obj, "PhysicalAdapter", "PhysicalAdapter");
searchWmiParam(Processor, obj, "ProductName", "ProductName");
searchWmiParam(Processor, obj, "ServiceName", "ServiceName");
}
return Processor;
@@ -494,7 +204,7 @@ namespace MP.MONO.Core
/// Info OS
/// </summary>
/// <returns></returns>
public static async Task<Dictionary<string, string>> GetOsInfo()
private static async Task<Dictionary<string, string>> GetOsInfo()
{
ManagementObjectCollection moc;
var Processor = new Dictionary<string, string>();
@@ -511,65 +221,56 @@ namespace MP.MONO.Core
foreach (ManagementObject obj in moc)
{
try
{
Processor.Add("Name", obj["Caption"].ToString());
}
catch
{ }
searchWmiParam(Processor, obj, "Caption", "Caption");
searchWmiParam(Processor, obj, "Version", "Version");
searchWmiParam(Processor, obj, "MaxNumberOfProcesses", "MaxNumberOfProcesses");
searchWmiParam(Processor, obj, "MaxProcessMemorySize", "MaxProcessMemorySize");
searchWmiParam(Processor, obj, "OSArchitecture", "OSArchitecture");
searchWmiParam(Processor, obj, "SerialNumber", "SerialNumber");
searchWmiParam(Processor, obj, "BuildNumber", "BuildNumber");
try
{
Processor.Add("Version", obj["Version"].ToString());
}
catch
{ }
try
{
Processor.Add("MaxProcessCount", obj["MaxNumberOfProcesses"].ToString());
}
catch
{ }
try
{
Processor.Add("MaxProcessRAM", obj["MaxProcessMemorySize"].ToString());
}
catch
{ }
try
{
Processor.Add("Architecture", obj["OSArchitecture"].ToString());
}
catch
{ }
try
{
Processor.Add("SerialNumber", obj["SerialNumber"].ToString());
}
catch
{ }
try
{
Processor.Add("Build", obj["BuildNumber"].ToString());
}
catch
{ }
}
return Processor;
}
#endregion Public Methods
/// <summary>
/// Info RAM
/// </summary>
/// <returns></returns>
private static async Task<Dictionary<string, string>> GetRamInfo()
{
ManagementObjectCollection moc;
var Processor = new Dictionary<string, string>();
#region Private Fields
try
{
moc = new ManagementObjectSearcher("select * from Win32_PhysicalMemory").Get();
}
catch
{
Log.Error("Error: WMI API Not loaded.");
return Processor;
}
private static Logger Log = LogManager.GetCurrentClassLogger();
foreach (ManagementObject obj in moc)
{
searchWmiParam(Processor, obj, "DeviceLocator", "DeviceLocator");
searchWmiParam(Processor, obj, "DataWidth", "DataWidth");
searchWmiParam(Processor, obj, "ConfiguredVoltage", "ConfiguredVoltage");
searchWmiParam(Processor, obj, "FormFactor", "FormFactor");
searchWmiParam(Processor, obj, "ConfiguredClockSpeed", "ConfiguredClockSpeed");
searchWmiParam(Processor, obj, "MaxVoltage", "MaxVoltage");
searchWmiParam(Processor, obj, "MinVoltage", "MinVoltage");
searchWmiParam(Processor, obj, "Speed", "Speed");
searchWmiParam(Processor, obj, "SMBIOSMemoryType", "SMBIOSMemoryType");
searchWmiParam(Processor, obj, "PartNumber", "PartNumber");
#endregion Private Fields
}
return Processor;
}
#endregion Private Methods
}
}
+1 -1
View File
@@ -6,7 +6,7 @@
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Platforms>AnyCPU;x86;x64</Platforms>
<Version>1.12206.714</Version>
<Version>1.12206.819</Version>
</PropertyGroup>
<ItemGroup>
+1 -1
View File
@@ -1,6 +1,6 @@
<body>
<i>MAPO-MONO</i>
<h4>Version: 1.12206.714</h4>
<h4>Version: 1.12206.819</h4>
<br /> Release Note:
<ul>
<li>
+1 -1
View File
@@ -1 +1 @@
1.12206.714
1.12206.819
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>1.12206.714</version>
<version>1.12206.819</version>
<url>http://nexus.steamware.net/repository/SWS/MP.MONO.DECODER/stable/LAST/MP.Mon.zip</url>
<changelog>http://nexus.steamware.net/repository/SWS/MP.MONO.DECODER/stable/LAST/ChangeLog.html</changelog>
<mandatory>false</mandatory>
-1
View File
@@ -66,7 +66,6 @@ namespace MP.MONO.Data
DATABASE_USER = $"user_{nKey}";
DATABASE_PWD = $"pwd_{sKey}";
CONNECTION_STRING = $"server={DATABASE_SERV};port=3306;database={DATABASE_NAME};uid={DATABASE_USER};pwd={DATABASE_PWD};sslmode=None";
//ADMIN_CONNECTION_STRING = $"server={DATABASE_SERV};port=3306;database=mysql;uid=root;pwd=Egalware_24068!;sslmode=None";
ADMIN_CONNECTION_STRING = $"server={DATABASE_SERV};port=3306;database=mysql;uid=steamware;pwd=Egalware_24068!;sslmode=None";
}
+1 -1
View File
@@ -6,7 +6,7 @@
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Platforms>AnyCPU;x86;x64</Platforms>
<Version>1.12206.714</Version>
<Version>1.12206.819</Version>
</PropertyGroup>
<ItemGroup>
+1 -1
View File
@@ -1,6 +1,6 @@
<body>
<i>MAPO-MONO</i>
<h4>Version: 1.12206.714</h4>
<h4>Version: 1.12206.819</h4>
<br /> Release Note:
<ul>
<li>
+1 -1
View File
@@ -1 +1 @@
1.12206.714
1.12206.819
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>1.12206.714</version>
<version>1.12206.819</version>
<url>http://nexus.steamware.net/repository/SWS/MP.MONO.SIM/stable/LAST/MP.Mon.zip</url>
<changelog>http://nexus.steamware.net/repository/SWS/MP.MONO.SIM/stable/LAST/ChangeLog.html</changelog>
<mandatory>false</mandatory>
+5 -1
View File
@@ -51,7 +51,11 @@ namespace MachineSim
var rawData = File.ReadAllText(fullPath);
if (!string.IsNullOrEmpty(rawData))
{
localObj = JsonConvert.DeserializeObject<List<SimDisplayDataDTO>>(rawData);
var deserObj = JsonConvert.DeserializeObject<List<SimDisplayDataDTO>>(rawData);
if (deserObj != null)
{
localObj = deserObj;
}
}
}
}
+1
View File
@@ -0,0 +1 @@

+1
View File
@@ -0,0 +1 @@
31e9cc1c2e8f30a1b4098cb157d712f11f3f2e60fb74169a354c3fa646d6d0e28518b4e3139f844b25824fbcc4340051fc507d22c1c2d2786d3786c777c31cc3
+11 -1
View File
@@ -5,7 +5,7 @@
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<Platforms>AnyCPU;x86;x64</Platforms>
<Version>1.12206.714</Version>
<Version>1.12206.819</Version>
</PropertyGroup>
<ItemGroup>
@@ -29,7 +29,17 @@
<ProjectReference Include="..\MP.MONO.Core\MP.MONO.Core.csproj" />
<ProjectReference Include="..\MP.MONO.Data\MP.MONO.Data.csproj" />
</ItemGroup>
<ItemGroup>
<None Update="Conf\lic.file">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="temp\OUT.csv">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
<Exec Command="powershell.exe -ExecutionPolicy Unrestricted -NoProfile -NonInteractive -File $(ProjectDir)\post-build.ps1 -ProjectDir $(ProjectDir) -ProjectPath $(ProjectPath)" />
<Exec Command="powershell.exe -ExecutionPolicy Unrestricted -NoProfile -NonInteractive -File $(ProjectDir)\obfuscate.ps1 -CurrConfig $(ConfigurationName)" />
</Target>
</Project>
+5
View File
@@ -0,0 +1,5 @@
@page "/Download"
@model MP.MONO.UI.Pages.DownloadModel
@{
}
+46
View File
@@ -0,0 +1,46 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
namespace MP.MONO.UI.Pages
{
/// <summary>
/// Gestione donwnload file csv
///
/// da valutare eventualmente xlsx con https://github.com/closedxml/closedxml
/// </summary>
public class DownloadModel : PageModel
{
#region Private Fields
private readonly IWebHostEnvironment _env;
#endregion Private Fields
#region Public Constructors
public DownloadModel(IWebHostEnvironment env)
{
_env = env;
}
#endregion Public Constructors
#region Public Methods
public IActionResult OnGet()
{
string fileName = "OUT.csv";
if (Request.Query.ContainsKey("fileName"))
{
fileName = Request.Query["fileName"];
}
var filePath = Path.Combine(_env.ContentRootPath, "temp\\", fileName);
byte[] fileBytes = System.IO.File.ReadAllBytes(filePath);
return File(fileBytes, "application/force-download", fileName);
}
#endregion Public Methods
}
}
+106 -29
View File
@@ -1,50 +1,92 @@
@using MP.MONO.Core
@using Newtonsoft.Json
@page "/Info"
@inject NavigationManager NavManager
<PageTitle>Machine Info</PageTitle>
<h3>Machine Info <button class="btn btn-success" @onclick="() => ShowAll()"><i class="bi bi-arrow-down-circle-fill"></i></button></h3>
<div class="row">
<div class="col-4">
<DisplayInfo ParamName="CPU Info" currInfo="@cpuInfo" btnType="btn-primary" showSection="@showCpu"></DisplayInfo>
<div class="card m-2">
<div class="card-header">
<div class="row">
<div class="col-6">
<h2>Machine Info <button class="btn btn-primary" @onclick="() => ShowAll()">Expand All <i class="bi bi-caret-down-square"></i></button></h2>
</div>
<div class="col-6 text-end">
@if (!licOk)
{
<button class="btn btn-warning" @onclick="() => ToggleKeyMan()"><i class="bi bi-key"></i> Key Management</button>
}
</div>
</div>
</div>
<div class="col-4">
<DisplayInfo ParamName="RAM Info" currInfo="@ramInfo" btnType="btn-primary" showSection="@showRam"></DisplayInfo>
<DisplayInfo ParamName="NET Info" currInfo="@netInfo" btnType="btn-dark" showSection="@showNet"></DisplayInfo>
</div>
<div class="col-4">
<DisplayInfo ParamName="OS Info" currInfo="@osInfo" btnType="btn-primary" showSection="@showOs"></DisplayInfo>
<DisplayInfo ParamName="BIOS Info" currInfo="@biosInfo" btnType="btn-dark" showSection="@showBios"></DisplayInfo>
<div class="card-body">
@if (showKeyMan)
{
<div class="row">
<div class="col-4">
<h4>Gestione Licenza</h4>
</div>
<div class="col-4 text-center">
<a target="_blank" href="Download?fileName=@fileName" class="btn btn-block btn-warning"><span class="bi bi-file-earmark-arrow-down-fill"></span> Download Fingerprint File</a>
</div>
<div class="col-4">
<div class="input-group mb-3">
<input type="text" class="form-control" placeholder="license key" aria-label="license key" @bind-value="@licVal">
<button class="btn btn-outline-success" type="button" @onclick="() => SaveLic()">Save</button>
</div>
</div>
</div>
}
<div class="row">
<div class="col-4">
<DisplayInfo ParamName="CPU Info" currInfo="@cpuInfo" btnType="btn-primary" showSection="@showCpu"></DisplayInfo>
</div>
<div class="col-4">
<DisplayInfo ParamName="RAM Info" currInfo="@ramInfo" btnType="btn-primary mb-1" showSection="@showRam"></DisplayInfo>
<DisplayInfo ParamName="NET Info" currInfo="@netInfo" btnType="btn-primary" showSection="@showNet"></DisplayInfo>
</div>
<div class="col-4">
<DisplayInfo ParamName="OS Info" currInfo="@osInfo" btnType="btn-primary mb-1" showSection="@showOs"></DisplayInfo>
<DisplayInfo ParamName="BIOS Info" currInfo="@biosInfo" btnType="btn-primary" showSection="@showBios"></DisplayInfo>
</div>
</div>
</div>
</div>
@code {
protected Dictionary<string, string> biosInfo = new Dictionary<string, string>();
protected Dictionary<string, string> cpuInfo = new Dictionary<string, string>();
protected Dictionary<string, string> netInfo = new Dictionary<string, string>();
protected Dictionary<string, string> osInfo = new Dictionary<string, string>();
protected Dictionary<string, string> ramInfo = new Dictionary<string, string>();
private Dictionary<string, string> biosInfo = new Dictionary<string, string>();
private Dictionary<string, string> cpuInfo = new Dictionary<string, string>();
private Dictionary<string, string> netInfo = new Dictionary<string, string>();
private Dictionary<string, string> osInfo = new Dictionary<string, string>();
private Dictionary<string, string> ramInfo = new Dictionary<string, string>();
protected bool showBios = false;
protected bool showCpu = false;
protected bool showNet = false;
protected bool showOs = false;
protected bool showRam = false;
private bool showBios = false;
private bool showCpu = false;
private bool showNet = false;
private bool showOs = false;
private bool showRam = false;
private bool showKeyMan = false;
private bool licOk = false;
private string licVal { get; set; } = "";
private string fileName { get; set; } = "InfoData.json";
protected override async Task OnInitializedAsync()
{
biosInfo = await MachineInfo.GetBiosInfo();
cpuInfo = await MachineInfo.GetCpuInfo();
netInfo = await MachineInfo.GetNetInfo();
osInfo = await MachineInfo.GetOsInfo();
ramInfo = await MachineInfo.GetRamInfo();
biosInfo = await MachineInfo.GetInfo("BIOS");
cpuInfo = await MachineInfo.GetInfo("CPU");
netInfo = await MachineInfo.GetInfo("NET");
osInfo = await MachineInfo.GetInfo("OS");
ramInfo = await MachineInfo.GetInfo("RAM");
// check licenze
licOk = await MachineDataValidator.testCurrInfo();
}
protected void ShowAll()
private void ShowAll()
{
showBios = true;
showCpu = true;
@@ -52,4 +94,39 @@
showOs = true;
showRam = true;
}
private void ToggleKeyMan()
{
showKeyMan = !showKeyMan;
// salvo su disco...
saveInfoData();
}
private void saveInfoData()
{
var fullData = biosInfo.Concat(cpuInfo).Concat(netInfo).Concat(osInfo).Concat(ramInfo).GroupBy(ele => ele.Key).OrderBy(x => x.Key).ToDictionary(ele => ele.Key, ele => ele.First().Value);
string filePath = Path.Combine(baseDir, "temp", "InfoData.json");
File.WriteAllText(filePath, JsonConvert.SerializeObject(fullData, Formatting.Indented));
}
private string baseDir = $"{Directory.GetCurrentDirectory()}";
private async Task SaveLic()
{
//se ho un valore x la licenza...
if (!string.IsNullOrEmpty(licVal))
{
string filePath = Path.Combine(baseDir, "Conf", "lic.file");
File.WriteAllText(filePath, licVal);
}
// check licenze
licOk = await MachineDataValidator.testCurrInfo();
// se ok --> rivado ad home!
if (licOk)
{
await Task.Delay(1);
// rimando alla home
NavManager.NavigateTo("/", true);
}
}
}
+22 -2
View File
@@ -1,4 +1,5 @@
@using Microsoft.AspNetCore.Components.Web
@using MP.MONO.UI.Components
@namespace MP.MONO.UI.Pages
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
@@ -10,9 +11,9 @@
<base href="~/" />
<link rel="stylesheet" href="lib/bootstrap/css/bootstrap.min.css" />
<link rel="stylesheet" href="css/site.min.css" />
<link rel="stylesheet"href="lib/font-awesome/css/all.css" />
<link rel="stylesheet" href="lib/font-awesome/css/all.css" />
<link rel="stylesheet" href="lib/bootstrap-icons/font/bootstrap-icons.min.css" />
<link rel="stylesheet"href="MP.MONO.UI.styles.css" />
<link rel="stylesheet" href="MP.MONO.UI.styles.css" />
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico" />
<component type="typeof(HeadOutlet)" render-mode="ServerPrerendered" />
</head>
@@ -29,6 +30,25 @@
<a href="" class="reload">Reload</a>
<a class="dismiss">🗙</a>
</div>
@if (!MP.MONO.Core.MachineDataValidator.testCurrInfo().Result)
{
<div class="watermark">
@for (int j = 0; j < 5; j++)
{
<div class="row">
<div class="col-12 text-center">
Multiax Dashboard DEMO - (c)2022 EgalWare srl
</div>
@for (int i = 0; i < 5; i++)
{
<div class="col">
<img src="~/images/LogoEgw.png" width="128" />
</div>
}
</div>
}
</div>
}
<script src="_framework/blazor.server.js"></script>
<script src="lib/Chart.js/chart.js"></script>
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
This file is used by the publish/package process of your Web project. You can customize the behavior of this process
by editing this MSBuild file. In order to learn more about this please visit https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project>
<PropertyGroup>
<WebPublishMethod>Package</WebPublishMethod>
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform>
<SiteUrlToLaunchAfterPublish />
<LaunchSiteAfterPublish>true</LaunchSiteAfterPublish>
<ExcludeApp_Data>false</ExcludeApp_Data>
<ProjectGuid>6fb65850-c023-4986-9dff-770c4e582d60</ProjectGuid>
<DesktopBuildPackageLocation>bin\publish\net6.0\MP.MONO.UI.zip</DesktopBuildPackageLocation>
<PackageAsSingleFile>true</PackageAsSingleFile>
<DeployIisAppPath>Default Web Site/MP.MONO.UI</DeployIisAppPath>
<TargetFramework>net6.0</TargetFramework>
<SelfContained>false</SelfContained>
</PropertyGroup>
</Project>
+1 -1
View File
@@ -1,6 +1,6 @@
<body>
<i>MAPO-MONO</i>
<h4>Version: 1.12206.714</h4>
<h4>Version: 1.12206.819</h4>
<br /> Release Note:
<ul>
<li>
+1 -1
View File
@@ -1 +1 @@
1.12206.714
1.12206.819
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>1.12206.714</version>
<version>1.12206.819</version>
<url>http://nexus.steamware.net/repository/SWS/MP.MONO.UI/stable/LAST/MP.Mon.zip</url>
<changelog>http://nexus.steamware.net/repository/SWS/MP.MONO.UI/stable/LAST/ChangeLog.html</changelog>
<mandatory>false</mandatory>
@@ -1,7 +1,7 @@
<?xml version='1.0'?>
<Obfuscator>
<Var name="InPath" value=".\MP.MONO.UI\bin\Debug\net6.0\" />
<Var name="OutPath" value=".\MP.MONO.UI\bin\Debug\net6.0_obf\" />
<Var name="InPath" value=".\bin\{{CURR_CONFIG}}\net6.0\" />
<Var name="OutPath" value=".\bin\{{CURR_CONFIG}}\net6.0_obf\" />
<Var name="KeepPublicApi" value="true" />
<Var name="HidePrivateApi" value="true" />
<Var name="RenameProperties" value="true" />
@@ -12,5 +12,4 @@
<Var name="OptimizeMethods" value="true" />
<Var name="SuppressIldasm" value="true" />
<Module file="$(InPath)MP.MONO.Core.dll" />
<Module file="$(InPath)MP.MONO.Data.dll" />
</Obfuscator>
+15
View File
@@ -0,0 +1,15 @@
<?xml version='1.0'?>
<Obfuscator>
<Var name="InPath" value=".\bin\Debug\net6.0\" />
<Var name="OutPath" value=".\bin\Debug\net6.0_obf\" />
<Var name="KeepPublicApi" value="true" />
<Var name="HidePrivateApi" value="true" />
<Var name="RenameProperties" value="true" />
<Var name="RenameEvents" value="true" />
<Var name="RenameFields" value="true" />
<Var name="UseUnicodeNames" value="true" />
<Var name="HideStrings" value="true" />
<Var name="OptimizeMethods" value="true" />
<Var name="SuppressIldasm" value="true" />
<Module file="$(InPath)MP.MONO.Core.dll" />
</Obfuscator>
+48
View File
@@ -0,0 +1,48 @@
param([string]$CurrConfig);
#verifico se encessario installare come global tool
$testString = dotnet tool list -g | Select-String -Pattern "obfuscar.globaltool"
if($testString -eq $null)
{
Write-Output("Installing obfuscar as global tool")
dotnet tool install --global Obfuscar.GlobalTool --version 2.2.33
}
else
{
Write-Output("Obfuscar already installed!")
#dotnet tool update --global Obfuscar.GlobalTool --version 2.2.33
}
# fix folder obf
$FolderName = "\bin\Debug\net6.0_obf\"
if (Test-Path $FolderName) {
Write-Host "Folder Exists"
}
else {
#PowerShell Create directory if not exists
New-Item $FolderName -ItemType Directory
Write-Host "Folder Created successfully"
}
# sistemo XML x usare la conf corrente
$OrigConfPath = "obfuscar.orig.xml"
$ConfigPath = "obfuscar.xml"
$configFile = Get-Content $OrigConfPath
$find = "{{CURR_CONFIG}}";
$configFileUpd = $configFile -replace $find, $CurrConfig
Set-Content -Path $ConfigPath -Value $configFileUpd
Write-Output("Config File set:")
Write-Output($configFileUpd)
# chiamo script principale
#C:\Users\samuele.steamw\.dotnet\tools\obfuscar.console.exe obfuscar.xml
obfuscar.console.exe obfuscar.xml
#obfuscar.console obfuscar.xml
Write-Output("Obfuscar completed!")
# sovrascrivo dll originali con i file elaborati
Copy-Item .\bin\$CurrConfig\net6.0_obf\*.dll .\bin\$CurrConfig\net6.0\
Write-Output("Obfuscated dll copy completed!")
+56
View File
@@ -0,0 +1,56 @@
{
"AdapterType": "Ethernet 802.3",
"AddressWidth": "64",
"Architecture": "9",
"BiosVersion": "ALASKA - 1072009",
"BuildNumber": "19044",
"Caption": "Microsoft Windows 10 Pro N",
"ConfiguredClockSpeed": "3600",
"ConfiguredVoltage": "1200",
"CpuVersion": "Modello 1, Stepping 0",
"CurrentClockSpeed": "3501",
"CurrentVoltage": "11",
"DataWidth": "64",
"Description": "AMD64 Family 23 Model 113 Stepping 0",
"DeviceLocator": "DIMM 1",
"ExtClock": "100",
"Family": "107",
"FormFactor": "8",
"GUID": "{E76995C4-F180-406E-B9C3-E491C65A8FCF}",
"L2CacheSize": "8192",
"L3CacheSize": "65536",
"Level": "23",
"LoadPercentage": "8",
"MACAddress": "0C:9D:92:B8:FD:E8",
"Manufacturer": "American Megatrends International, LLC.",
"MaxNumberOfProcesses": "4294967295",
"MaxProcessMemorySize": "137438953344",
"MaxVoltage": "1200",
"MinVoltage": "1200",
"Name": "ASUS XG-C100C 10G PCI-E Network Adapter",
"NumberOfCores": "16",
"NumberOfLogicalProcessors": "32",
"OSArchitecture": "64 bit",
"PartNumber": "CMK64GX4M2D3600C18",
"PhysicalAdapter": "True",
"ProcessorId": "178BFBFF00870F10",
"ProcessorType": "3",
"ProductName": "ASUS XG-C100C 10G PCI-E Network Adapter",
"ReleaseDate": "20210521000000.000000+000",
"Revision": "28928",
"Role": "CPU",
"SerialNumber": "00332-00332-17209-AA940",
"ServiceName": "aqnic650",
"SMBIOSBIOSVersion": "F33",
"SMBIOSMajorVersion": "3",
"SMBIOSMemoryType": "26",
"SMBIOSMinorVersion": "3",
"SocketDesignation": "AM4",
"SoftwareElementID": "F33",
"SoftwareElementState": "3",
"Speed": "3600",
"SystemBiosMajorVersion": "5",
"SystemBiosMinorVersion": "17",
"SystemName": "WRKST-R9-SAM",
"Version": "10.0.19044"
}
+1
View File
@@ -0,0 +1 @@

+6
View File
@@ -46,6 +46,12 @@ a,
.validation-message {
color: red;
}
.watermark {
position: absolute;
top: 250px;
left: 500px;
opacity: 0.2;
}
.textTrim {
white-space: nowrap;
overflow: hidden;
+6
View File
@@ -45,6 +45,12 @@ a, .btn-link {
color: red;
}
.watermark {
position: absolute;
top: 250px;
left: 500px;
opacity: 0.2;
}
.textTrim {
white-space: nowrap;
File diff suppressed because one or more lines are too long
+6
View File
@@ -103,6 +103,12 @@ La sua funzione è presentare le informazioni realtime e di eprmettere il recupe
Il tutto con un focus "locale" (è un singolo impianto/macchina) e limitato nel tempo x la quantità di dati di dettaglio e/o statistici mantenuti.
da installare dotnet 6 hosting:
<code>
choco install dotnet-6.0-windowshosting
</code>
## MP.MONO.SIM
E' una console app pacchettizzata copme single file app (che richiede installazione dotNet framework...) fatta x simulare i dati in fase di sviluppo UI. Per testare è stata installata su IOB-WIN-SIMULA, come servizio tramite nssm.
BIN
View File
Binary file not shown.
-8
View File
@@ -1,8 +0,0 @@
<?xml version='1.0'?>
<Obfuscator>
<Var name="InPath" value=".\MP.MONO.UI\bin\Debug\net6.0\" />
<Var name="OutPath" value=".\MP.MONO.UI\bin\Debug\net6.0_obf\" />
<SkipNamespace name="MP.MONO.Data.*" />
<Module file="$(InPath)MP.MONO.Core.dll" />
<Module file="$(InPath)MP.MONO.Data.dll" />
</Obfuscator>
-14
View File
@@ -1,14 +0,0 @@
$testString = dotnet tool list -g | Select-String -Pattern "obfuscar.globaltool"
if($testString -eq $null)
{
Write-Output("Installing obfuscar as global tool")
dotnet tool install --global Obfuscar.GlobalTool --version 2.2.33
}
else
{
Write-Output("Obfuscar already installed!")
#dotnet tool update --global Obfuscar.GlobalTool --version 2.2.33
}
obfuscar.console obfuscar.xml