Skip to content

Update new License Manager to version 2410 #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 40 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
7d3915c
update new database
shiroinekotfs Nov 7, 2024
ff9ff9d
update project
shiroinekotfs Nov 7, 2024
059a1f4
update office pkconfig
shiroinekotfs Nov 8, 2024
d387d74
update databases, pkconfig and apply new product keys
shiroinekotfs Nov 8, 2024
c8da2c8
resolve unmatched KmsItem and building errors
shiroinekotfs Nov 8, 2024
0e13418
Update LMDB for Office versions correction
shiroinekotfs Nov 8, 2024
c682da9
Create codescan.yml
shiroinekotfs Nov 8, 2024
b31aa41
Create snyk-security.yml
shiroinekotfs Nov 8, 2024
4517f30
LMDB update
shiroinekotfs Nov 8, 2024
3d1f15f
Add new GetCID method
shiroinekotfs Nov 9, 2024
9f906f2
update new debug method and getcid codebase
shiroinekotfs Nov 9, 2024
a37c261
removed sub windows for epid check
shiroinekotfs Nov 9, 2024
f14bc11
Update GetCID.xaml.cs
shiroinekotfs Nov 9, 2024
4f5bfa6
Update GetCID for correct functionality
shiroinekotfs Nov 10, 2024
d78627a
clean code & get manual mode for GetCID
shiroinekotfs Nov 13, 2024
391da26
correct codes in GetCID
shiroinekotfs Nov 13, 2024
8d83e36
(tmp) update install cid method
shiroinekotfs Nov 14, 2024
78dc47c
Update GetCID.xaml.cs
shiroinekotfs Nov 14, 2024
8e60fd2
correct CS0252
shiroinekotfs Nov 14, 2024
11e5d11
update new database and csvlk
shiroinekotfs Nov 14, 2024
84ba2a2
Confirm new LmDatabase and correct pkeyconfig
shiroinekotfs Nov 15, 2024
5c1ad6e
Update License Manager.csproj
shiroinekotfs Nov 15, 2024
f2f42cd
.
shiroinekotfs Nov 15, 2024
ebfab82
clean up codes
shiroinekotfs Nov 16, 2024
e4b2ded
update pkconfig (db)
shiroinekotfs Nov 16, 2024
230ac74
update GUID, correct the format and disable code analysis
shiroinekotfs Nov 16, 2024
09ef5e5
resolve missing packages on build
shiroinekotfs Nov 16, 2024
4dc7291
update for patch the virustotal misinformation
shiroinekotfs Nov 16, 2024
bda405a
Update License Manager.csproj
shiroinekotfs Nov 17, 2024
e2693f6
Update ProductKeys.xaml.cs
shiroinekotfs Jan 5, 2025
d71d5ad
Update LmInternalDatabase.xml
shiroinekotfs Jan 16, 2025
37e215e
Update LmInternalDatabase.xml
shiroinekotfs Jan 17, 2025
3d08ea0
update db
shiroinekotfs Jan 17, 2025
09ded5d
Update LmInternalDatabase.xml
shiroinekotfs Jan 17, 2025
63ba48c
Update KmsServer.xaml
shiroinekotfs Jan 17, 2025
db52eae
Update LmInternalDatabase.xml
shiroinekotfs Jan 17, 2025
f63d98b
Update LmInternalDatabase.xml
shiroinekotfs Mar 8, 2025
92a0d0c
Update LmInternalDatabase.xml
shiroinekotfs May 13, 2025
989ec24
Update MainWindow.xaml.cs
shiroinekotfs May 13, 2025
f92ca5f
Add debugging mode notification
shiroinekotfs May 21, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions .github/workflows/codescan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

# This workflow requires that you have an existing account with codescan.io
# For more information about configuring your workflow,
# read our documentation at https://github.com/codescan-io/codescan-scanner-action
name: CodeScan

on:
push:
branches: [ "master" ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "master" ]
schedule:
- cron: '28 10 * * 1'

permissions:
contents: read

jobs:
CodeScan:
permissions:
contents: read # for actions/checkout to fetch code
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Cache files
uses: actions/cache@v3
with:
path: |
~/.sonar
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
- name: Run Analysis
uses: codescan-io/codescan-scanner-action@5b2e8c5683ef6a5adc8fa3b7950bb07debccce12
with:
login: ${{ secrets.CODESCAN_AUTH_TOKEN }}
organization: ${{ secrets.CODESCAN_ORGANIZATION_KEY }}
projectKey: ${{ secrets.CODESCAN_PROJECT_KEY }}
- name: Upload SARIF file
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: codescan.sarif
79 changes: 79 additions & 0 deletions .github/workflows/snyk-security.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

# A sample workflow which sets up Snyk to analyze the full Snyk platform (Snyk Open Source, Snyk Code,
# Snyk Container and Snyk Infrastructure as Code)
# The setup installs the Snyk CLI - for more details on the possible commands
# check https://docs.snyk.io/snyk-cli/cli-reference
# The results of Snyk Code are then uploaded to GitHub Security Code Scanning
#
# In order to use the Snyk Action you will need to have a Snyk API token.
# More details in https://github.com/snyk/actions#getting-your-snyk-token
# or you can signup for free at https://snyk.io/login
#
# For more examples, including how to limit scans to only high-severity issues
# and fail PR checks, see https://github.com/snyk/actions/

name: Snyk Security

on:
push:
branches: ["master" ]
pull_request:
branches: ["master"]

permissions:
contents: read

jobs:
snyk:
permissions:
contents: read # for actions/checkout to fetch code
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Snyk CLI to check for security issues
# Snyk can be used to break the build when it detects security issues.
# In this case we want to upload the SAST issues to GitHub Code Scanning
uses: snyk/actions/setup@806182742461562b67788a64410098c9d9b96adb

# For Snyk Open Source you must first set up the development environment for your application's dependencies
# For example for Node
#- uses: actions/setup-node@v4
# with:
# node-version: 20

env:
# This is where you will need to introduce the Snyk API token created with your Snyk account
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}

# Runs Snyk Code (SAST) analysis and uploads result into GitHub.
# Use || true to not fail the pipeline
- name: Snyk Code test
run: snyk code test --sarif > snyk-code.sarif # || true

# Runs Snyk Open Source (SCA) analysis and uploads result to Snyk.
- name: Snyk Open Source monitor
run: snyk monitor --all-projects

# Runs Snyk Infrastructure as Code (IaC) analysis and uploads result to Snyk.
# Use || true to not fail the pipeline.
- name: Snyk IaC test and report
run: snyk iac test --report # || true

# Build the docker image for testing
- name: Build a Docker image
run: docker build -t your/image-to-test .
# Runs Snyk Container (Container and SCA) analysis and uploads result to Snyk.
- name: Snyk Container monitor
run: snyk container monitor your/image-to-test --file=Dockerfile

# Push the Snyk Code results into GitHub Code Scanning tab
- name: Upload result to GitHub Code Scanning
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: snyk-code.sarif
46 changes: 26 additions & 20 deletions AboutBox.xaml
Original file line number Diff line number Diff line change
@@ -1,35 +1,41 @@
<lm:ScalableWindow x:Class="HGM.Hotbird64.LicenseManager.AboutBox" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:lm="clr-namespace:HGM.Hotbird64.LicenseManager"
xmlns:icons="clr-namespace:HGM.Hotbird64.Icons"
Title="About License Manager" Height="Auto"
Width="Auto" ResizeMode="NoResize" SizeToContent="WidthAndHeight"
>
<lm:ScalableWindow x:Class="HGM.Hotbird64.LicenseManager.AboutBox"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:lm="clr-namespace:HGM.Hotbird64.LicenseManager"
xmlns:icons="clr-namespace:HGM.Hotbird64.Icons"
Title="About License Manager" Height="Auto"
Width="Auto" ResizeMode="NoResize" SizeToContent="WidthAndHeight">
<Window.Resources>
<Style x:Key="AboutBoxLabel" TargetType="Label">
<Setter Property="Margin" Value="0,3,0,3" />
</Style>
</Window.Resources>
<Grid Name="TopElement">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="140" />
<ColumnDefinition Width="400" />
<ColumnDefinition Width="0" />
<ColumnDefinition Width="540" />
</Grid.ColumnDefinitions>
<StackPanel Grid.ColumnSpan="2" Margin="10,0,0,0">
<StackPanel Margin="1,0,0,0" Grid.Column="1">
<!--Label Name="LabelProduct" Style="{StaticResource AboutBoxLabel}" /-->
<TextBlock Name="TextBoxDescription" Margin="5,5,10,5" TextWrapping="Wrap">
<TextBlock Name="TextBoxDescription" Margin="5,5,10,5" TextWrapping="Wrap" Width="529" Height="148">
License Manager, by Hotbird64 and TheFlightSims. Currently under support.
<LineBreak /> <LineBreak />
Copyright (C) 2012 - 2023
<LineBreak /> <LineBreak />
This tools is the alternative tool for Software Licensing Management Tool on CLI (slmgr.vbs, opss.vbs) and Windows Remote for Powershell
<LineBreak /> <LineBreak />
The GVLKs are provided and published on Microsoft Docs. The general product keys are from Windows ADK and @nang.
<LineBreak /> <LineBreak />
DO NOT use this tool as a one-click activation and other illegal uses.
<LineBreak /> <LineBreak />
<LineBreak />
<LineBreak />
Copyright (C) 2012 - 2025
<LineBreak />
<LineBreak />
This tools is the alternative tool for Software Licensing Management Tool on CLI (slmgr.vbs, opss.vbs) and WMI.
<LineBreak />
<LineBreak />
The GVLKs are provided and published on Microsoft Docs. The general product keys are from Windows ADK and Community Publication.
<LineBreak />
<LineBreak />
</TextBlock>
<Grid>

</Grid>
<Label Name="LabelVersion" Style="{StaticResource AboutBoxLabel}" />
<Button Margin="0,0,10,10" IsDefault="True" HorizontalAlignment="Right" Name="ButtonOk" Width="Auto" Click="button_Ok_Click">
<Button Margin="0,0,10,10" IsDefault="True" HorizontalAlignment="Right" Name="ButtonOk" Width="Auto" Click="Button_Ok_Click">
<TextBlock Margin="20,2,20,2">Close</TextBlock>
</Button>
</StackPanel>
Expand Down
11 changes: 7 additions & 4 deletions AboutBox.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System.Reflection;
using System;
using System.Reflection;
using System.Windows;

// ReSharper disable once CheckNamespace
namespace HGM.Hotbird64.LicenseManager
{
public partial class AboutBox
Expand All @@ -11,10 +11,13 @@ public AboutBox(MainWindow mainWindow) : base(mainWindow)
InitializeComponent();
TopElement.LayoutTransform = Scaler;
System.Version version = Assembly.GetCallingAssembly().GetName().Version;
LabelVersion.Content = "Version " + version.ToString(3) + (version.MinorRevision < 2300 ? $" Beta {version.MinorRevision}" : "");
LabelVersion.Content = "Version " + version.ToString() + (version.MinorRevision < 2300 ? $" Beta {version.MinorRevision}" : "") + $" {IntPtr.Size << 3}-bit";
#if DEBUG
LabelVersion.Content += " (Debugging mode is enabled)";
#endif
}

private void button_Ok_Click(object sender, RoutedEventArgs e)
private void Button_Ok_Click(object sender, RoutedEventArgs e)
{
DialogResult = true;
}
Expand Down
5 changes: 4 additions & 1 deletion Controls/WmiPropertyBox.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,8 @@
d:DesignHeight="50" d:DesignWidth="800"
VerticalAlignment="Center"
>
<TextBox x:Name="Box" Style="{StaticResource StandardTextBox}" x:FieldModifier="public" />
<TextBox x:Name="Box"
Style="{StaticResource StandardTextBox}"
x:FieldModifier="public"
Text="{Binding Text, RelativeSource={RelativeSource AncestorType=UserControl}, Mode=TwoWay}" IsReadOnly="True"/>
</UserControl>
32 changes: 20 additions & 12 deletions Controls/WmiPropertyBox.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,20 @@ namespace HGM.Hotbird64.LicenseManager.Controls

public partial class WmiPropertyBox
{
//public static InputGestureCollection CtrlE = new InputGestureCollection();
//public static RoutedUICommand GetInfo=new RoutedUICommand("Get Info", nameof(GetInfo), typeof(WmiPropertyBox), CtrlE);
//public static CommandBinding GetInfoBinding=new CommandBinding(GetInfo,GetInfoExecuted,CanExecuteGetInfo);
public static readonly DependencyProperty IsReadOnlyProperty =
DependencyProperty.Register("IsReadOnly", typeof(bool), typeof(WmiPropertyBox), new PropertyMetadata(true, OnIsReadOnlyChanged));

public bool IsReadOnly
{
get => (bool)GetValue(IsReadOnlyProperty);
set => SetValue(IsReadOnlyProperty, value);
}

private static void OnIsReadOnlyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
var self = (WmiPropertyBox)d;
self.Box.IsReadOnly = (bool)e.NewValue;
}

public static DependencyProperty WmiPropertyProperty = DependencyProperty.Register
(
Expand Down Expand Up @@ -55,7 +66,10 @@ public WmiPropertyBox()
ContextMenu = null;
}

Box.ContextMenu.Items.Add(new MenuItem { Command = ApplicationCommands.Cut });
Box.ContextMenu.Items.Add(new MenuItem { Command = ApplicationCommands.Copy });
Box.ContextMenu.Items.Add(new MenuItem { Command = ApplicationCommands.Undo });
Box.ContextMenu.Items.Add(new MenuItem { Command = ApplicationCommands.Redo });
Box.ContextMenu.Items.Add(new MenuItem { Command = ApplicationCommands.SelectAll });
};
}
Expand Down Expand Up @@ -94,7 +108,6 @@ private static void WmiPropertyChanged(DependencyObject d, DependencyPropertyCha
oldValue.PropertyChanged -= self.WmiPropertyChanged;
}
}

Update(self);
}

Expand All @@ -105,16 +118,11 @@ private void WmiPropertyChanged(object sender, PropertyChangedEventArgs e)

private static void Update(WmiPropertyBox self)
{
if (self.PropertyName == null || self.Converter == null || self.WmiProperty == null)
{
return;
}

self.Converter.PropertyName = self.PropertyName;
if (self.PropertyName == null || self.Converter == null || self.WmiProperty == null) return;
self.Box.IsReadOnly = self.IsReadOnly;
self.Box.Text = (string)self.Converter.Convert(self.WmiProperty, typeof(string), null, CultureInfo.CurrentCulture) ?? string.Empty;

self.Converter.PropertyName = self.PropertyName;
self.Visibility = self.Converter.IsUnsupported && !self.Converter.ShowAllFields ? Visibility.Collapsed : Visibility.Visible;

self.IsEnabled = !self.Converter.IsUnsupported;
}
}
Expand Down
Binary file not shown.
Binary file added Data/PKeyConfig/20348-pkeyconfig.xrm-ms.gz
Binary file not shown.
Binary file added Data/PKeyConfig/26100-pkeyconfig-csvlk.xrm-ms.gz
Binary file not shown.
Binary file not shown.
Binary file added Data/PKeyConfig/26100-pkeyconfig.xrm-ms.gz
Binary file not shown.
Binary file modified Data/PKeyConfig/pkconfig_win8.xrm-ms.gz
Binary file not shown.
Binary file added Data/PKeyConfig/pkconfig_winemb7.xrm-ms.gz
Binary file not shown.
Binary file removed Data/PKeyConfig/pkconfig_winemb8.xrm-ms.gz
Binary file not shown.
Binary file modified Data/PKeyConfig/pkeyconfig-office-kmshost.xrm-ms.gz
Binary file not shown.
Binary file modified Data/PKeyConfig/pkeyconfig-office.xrm-ms.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion ExportIds.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
using HGM.Hotbird64.Vlmcs;
using Microsoft.Win32;
using System;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Text;
Expand Down
Loading
Loading