Skip to content

Commit

Permalink
Add flag --obfuscate-guid: Print the obfuscated form of the UUID
Browse files Browse the repository at this point in the history
  • Loading branch information
nirbar committed Sep 28, 2023
1 parent bdfed44 commit 89e0e42
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
version:
description: 'Build & package version'
required: true
default: 0.1.3
default: 0.1.4
type: string
jobs:
Build:
Expand Down
7 changes: 7 additions & 0 deletions MsiZapEx/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,13 @@ static void Main(string[] args)
}
}
}
if (!string.IsNullOrEmpty(Settings.Instance.ObfuscateGuid))
{
Guid obfuscated = GuidEx.MsiObfuscate(Settings.Instance.ObfuscateGuid);
Console.WriteLine($"Supplied UUID: {Settings.Instance.ObfuscateGuid}");
Console.WriteLine($"Obfuscated UUID (N format): {obfuscated.ToString("N")}");
Console.WriteLine($"Obfuscated UUID (B format): {obfuscated.ToString("B")}");
}
}
catch (Exception ex)
{
Expand Down
3 changes: 3 additions & 0 deletions MsiZapEx/Settings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ public class Settings
{
internal static Settings Instance { get; set; }

[Option("obfuscate-guid", Required = false, HelpText = "Print the obfuscated form of the UUID", Group = "codes")]
public string ObfuscateGuid { get; set; }

[Option("bundle-upgrade-code", Required = false, HelpText = "Detect bundles by UpgradeCode", Group = "codes")]
public string BundleUpgradeCode { get; set; }

Expand Down

0 comments on commit 89e0e42

Please sign in to comment.