This repository was archived by the owner on Jun 21, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -49,7 +49,10 @@ public static string MachineFingerprint
4949 {
5050 get
5151 {
52- return GetSha256Hash ( Info . ApplicationInfo . ApplicationDescription + ":" + GetMachineIdentifier ( ) ) ;
52+ return GetSha256Hash (
53+ Info . ApplicationInfo . ApplicationDescription + ":" +
54+ GetMachineIdentifier ( ) + ":" +
55+ GetMachineNameSafe ( ) ) ;
5356 }
5457 }
5558
@@ -60,13 +63,13 @@ static string GetMachineIdentifier()
6063 try
6164 {
6265 // adapted from http://stackoverflow.com/a/1561067
63- var fastedValidNetworkInterface = NetworkInterface . GetAllNetworkInterfaces ( )
64- . OrderBy ( nic => nic . Speed )
66+ var fastestValidNetworkInterface = NetworkInterface . GetAllNetworkInterfaces ( )
67+ . OrderByDescending ( nic => nic . Speed )
6568 . Where ( nic => nic . OperationalStatus == OperationalStatus . Up )
6669 . Select ( nic => nic . GetPhysicalAddress ( ) . ToString ( ) )
67- . FirstOrDefault ( address => address . Length > 12 ) ;
70+ . FirstOrDefault ( address => address . Length >= 12 ) ;
6871
69- return fastedValidNetworkInterface ?? GetMachineNameSafe ( ) ;
72+ return fastestValidNetworkInterface ?? GetMachineNameSafe ( ) ;
7073 }
7174 catch ( Exception )
7275 {
You can’t perform that action at this time.
0 commit comments