Skip to content

Commit

Permalink
Security update v3.5
Browse files Browse the repository at this point in the history
  • Loading branch information
hellzerg committed Oct 19, 2022
1 parent 04e6f2d commit e5e7540
Show file tree
Hide file tree
Showing 11 changed files with 62 additions and 33 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Hashing Changelog

All notable changes to this project will be documented in this file.
## [3.5] - 2022-10-19
- New: Show File request in Find Identicals (#24)
- Security: Newtonsoft.JSON and CRC32.NET updated to latest version
- Hotfix: Much faster list rendering after hash calculation (#23)

## [3.4] - 2022-02-15
- Hotfix: Propely show files (#20)
Expand Down
Binary file modified Hashing/Crc32.NET.dll
Binary file not shown.
18 changes: 15 additions & 3 deletions Hashing/Forms/IdenticalsForm.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 22 additions & 2 deletions Hashing/Forms/IdenticalsForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ private void SaveJson()
File.WriteAllText(dialog.FileName, JsonConvert.SerializeObject(_identicals, Formatting.Indented, new JsonSerializerSettings
{
NullValueHandling = NullValueHandling.Ignore
})) ;
}));
}
catch (Exception ex)
{
Expand Down Expand Up @@ -144,7 +144,7 @@ private void ListIdenticals(HashCode algo)

_identicals.FindAll(z => z.SHA256 == x).ForEach(y =>
{
fileNode.Nodes.Add(y.File);
fileNode.Nodes.Add(y.File);
});

nodes.Add(fileNode);
Expand Down Expand Up @@ -374,5 +374,25 @@ private void IdenticalsForm_Resize(object sender, EventArgs e)
Y = panel1.Height / 2 - boxSelectHash.Height / 2
};
}

private void FindFile()
{
if (SumView.Nodes.Count > 0)
{
if (SumView.SelectedNode.Nodes.Count > 0)
{
Utilities.FindFile(SumView.SelectedNode.Nodes[0].Text);
}
else
{
Utilities.FindFile(SumView.SelectedNode.Text);
}
}
}

private void toolStripMenuItem1_Click(object sender, EventArgs e)
{
FindFile();
}
}
}
21 changes: 9 additions & 12 deletions Hashing/Forms/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,7 @@ private void RefreshSumList()
if ((SumResult.Sums != null) && (SumResult.Sums.Count > 0))
{
SumView.Nodes.Clear();
List<TreeNode> tmpNodes = new List<TreeNode>();

foreach (SumResult sr in SumResult.Sums)
{
Expand All @@ -462,10 +463,10 @@ private void RefreshSumList()
if (Options.CurrentOptions.HashOptions.SHA3_384) rootNode.Nodes.Add("SHA3-384: " + sr.SHA3_384);
if (Options.CurrentOptions.HashOptions.SHA3_512) rootNode.Nodes.Add("SHA3-512: " + sr.SHA3_512);

SumView.Nodes.Add(rootNode);

tmpNodes.Add(rootNode);
}

SumView.Nodes.AddRange(tmpNodes.ToArray());
SumView.ExpandAll();
_allSums = SumView.Nodes.Cast<TreeNode>().ToArray();
}
Expand Down Expand Up @@ -943,6 +944,7 @@ private void CalculateSums(bool analyzeJson = false)
TreeNode rootNode = null;
_analyzedFiles = new List<string>();
List<TreeNode> tmpNodes = new List<TreeNode>();
if (analyzeJson)
{
Expand Down Expand Up @@ -1014,10 +1016,7 @@ private void CalculateSums(bool analyzeJson = false)
if (SumResult.Sums[i].SHA3_512 == _fileSummaries[i].SHA3_512) _analyzedFiles.Add(_fileSummaries[i].File);
}
SumView.Invoke((MethodInvoker)delegate
{
SumView.Nodes.Add(rootNode);
});
tmpNodes.Add(rootNode);
}
}
else
Expand All @@ -1040,19 +1039,17 @@ private void CalculateSums(bool analyzeJson = false)
if (Options.CurrentOptions.HashOptions.SHA3_384) rootNode.Nodes.Add("SHA3-384: " + SumResult.Sums[i].SHA3_384);
if (Options.CurrentOptions.HashOptions.SHA3_512) rootNode.Nodes.Add("SHA3-512: " + SumResult.Sums[i].SHA3_512);
SumView.Invoke((MethodInvoker)delegate
{
SumView.Nodes.Add(rootNode);
});
tmpNodes.Add(rootNode);
}
}
_allSums = SumView.Nodes.Cast<TreeNode>().ToArray();
SumView.Invoke((MethodInvoker)delegate
{
SumView.Nodes.AddRange(tmpNodes.ToArray());
SumView.ExpandAll();
});
_allSums = SumView.Nodes.Cast<TreeNode>().ToArray();
lblCalculating.Invoke((MethodInvoker)delegate
{
Expand Down Expand Up @@ -1436,7 +1433,7 @@ private void FilterTable()

private void SumView_NodeMouseDoubleClick(object sender, TreeNodeMouseClickEventArgs e)
{

}
}
}
11 changes: 4 additions & 7 deletions Hashing/Hashing.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<PlatformTarget>x64</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
Expand All @@ -39,11 +39,10 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="Crc32.NET, Version=1.0.0.0, Culture=neutral, PublicKeyToken=dc0b95cf99bf4e99, processorArchitecture=MSIL">
<HintPath>..\packages\Crc32.NET.1.1.0\lib\net20\Crc32.NET.dll</HintPath>
<HintPath>..\packages\Crc32.NET.1.2.0\lib\net20\Crc32.NET.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
Expand Down Expand Up @@ -186,8 +185,6 @@
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Newtonsoft.Json.dll" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\hashing.png" />
<EmbeddedResource Include="Crc32.NET.dll" />
<Content Include="hashing.ico" />
Expand Down
Binary file modified Hashing/Newtonsoft.Json.dll
Binary file not shown.
2 changes: 1 addition & 1 deletion Hashing/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ static class Program

// Enter current version here
internal readonly static float Major = 3;
internal readonly static float Minor = 4;
internal readonly static float Minor = 5;

/* END OF VERSION PROPERTIES */

Expand Down
4 changes: 2 additions & 2 deletions Hashing/packages.config
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Crc32.NET" version="1.1.0" targetFramework="net452" />
<package id="Newtonsoft.Json" version="9.0.1" targetFramework="net452" />
<package id="Crc32.NET" version="1.2.0" targetFramework="net452" />
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net452" />
</packages>
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

Simple utility to calculate and compare hashes of multiple files
<p align="center">
<a href="https://github.com/hellzerg/hashing/releases/download/3.4/Hashing-3.4.exe" target="_blank">
<a href="https://github.com/hellzerg/hashing/releases/download/3.5/Hashing-3.5.exe" target="_blank">
<img src="download-button.png">
</a>
</p>
Expand Down Expand Up @@ -57,6 +57,6 @@ https://github.com/hellzerg/hashing/blob/master/IMAGES.md

## Details: ##

* Latest version: 3.4
* Released: February 15, 2022
* SHA256: 066D3090044D5D77D4B2454C013E56648363EC329D13750B416B4C69B0AAE4AA
* Latest version: 3.5
* Released: October 19, 2022
* SHA256: 70934C870A61F5BA60A2C0934B5523C52FEA81180F76B7868727E97EF46AB584
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.4
3.5

0 comments on commit e5e7540

Please sign in to comment.