Conversation
Made -path argument not need the "-path" part of it.
App is cross platform.
There was a problem hiding this comment.
Pull request overview
This PR replaces the legacy .NET Framework-based FileConfunder console app with a new SDK-style Confunder project targeting net10.0, modernizing the CLI and adding new key-handling and file-marking behavior.
Changes:
- Removed the old .NET Framework project (app.config / Settings / AssemblyInfo / Program / csproj) and introduced a new SDK-style
Confunderproject. - Reworked command-line behavior (default actions, folder handling,
setkey,runvia shell execute) and added a “confunded mark” prepended to files. - Added a
Build.batscript and updated the solution to Visual Studio 18.
Reviewed changes
Copilot reviewed 13 out of 16 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| FileConfunder/Properties/Settings.settings | Removed legacy application settings. |
| FileConfunder/Properties/Settings.Designer.cs | Removed generated settings wrapper. |
| FileConfunder/Properties/AssemblyInfo.cs | Removed legacy assembly attributes (SDK-style projects typically generate these). |
| FileConfunder/Program.cs | Removed legacy CLI + confunding implementation. |
| FileConfunder/FileConfunder.csproj | Removed legacy .NET Framework csproj. |
| FileConfunder/App.config | Removed legacy app.config-based configuration. |
| Confunder/Properties/launchSettings.json | Added launch profile for the new project. |
| Confunder/Program.cs | Added the new CLI implementation, key storage logic, and file marking + encrypt/decrypt flow. |
| Confunder/FPE.Net/FF1.cs | Added FF1 implementation used for format-preserving encryption. |
| Confunder/FPE.Net/Constants.cs | Added FPE constants. |
| Confunder/FPE.Net/Common.cs | Updated common routines (notably removed invalid null check for BigInteger). |
| Confunder/FPE.Net/Ciphers.cs | Switched from AesManaged to Aes.Create() for AES primitives. |
| Confunder/Confunder.csproj | Added new SDK-style project targeting net10.0. |
| Confunder/appsettings.json | Added placeholder appsettings file (currently empty). |
| Confunder.sln | Updated VS version and project reference, but still contains stale configuration entries for the removed project GUID. |
| Build.bat | Added a build script (currently hardcoded to MSBuild 2019 path and runs git pull). |
Files not reviewed (1)
- FileConfunder/Properties/Settings.Designer.cs: Generated file
Comments suppressed due to low confidence (2)
Confunder.sln:17
- The solution still contains ProjectConfigurationPlatforms entries for the removed FileConfunder project GUID. This can cause solution load/build warnings or failures because the project no longer exists in the solution.
Confunder/FPE.Net/Ciphers.cs:61 - The catch block rethrows the exception using "throw e" (below), which resets the stack trace. Use a bare "throw;" (and optionally drop the exception variable) to preserve the original exception context.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| private static string _pattern = "*"; | ||
| private static bool _silent = false; | ||
| private static bool _isFolder = false; | ||
| private const string _keyAtRestEncryptionKey = "5otf7MjpE3CDioZSf1Y2M5J/RH1Fl4CbXBYRCfP5Y3o="; |
Comment on lines
+214
to
+217
| if (args.Contains("-path")) | ||
| { | ||
| _path = args[Array.IndexOf(args, "-path") + 1]; | ||
| } |
Comment on lines
+269
to
+272
| if (actionNeedsPath && _isFolder) | ||
| { | ||
| _pattern = args[Array.IndexOf(args, "-pattern") + 1]; | ||
| } |
Comment on lines
+589
to
+592
| // 3. Swap the temporary file with the original file | ||
| File.Delete(path); | ||
| File.Move(tempPath, path); | ||
| return true; |
| return enced.Select(i => (byte)i).ToArray(); | ||
| } | ||
|
|
||
| public static void RemoveBytesFromStart(FileStream fs, int bytesToRemove) |
| @@ -0,0 +1,3 @@ | |||
| git pull && FOR %%a in (*.sln) DO "D:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\MSBuild.exe" %%a /p:Configuration=Release | |||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Updated to .net 10 and enhanced significantly.