using System.Collections.Generic;
var hashTracker = new Dictionary<int, string>();
const int maxAttempts = 100_000;
Console.WriteLine("π Starting collision search...");
while (attempts++ < maxAttempts)
string guid = Guid.NewGuid().ToString("N");
int hashCode = guid.GetHashCode();
if (hashTracker.TryGetValue(hashCode, out string existingGuid))
if (existingGuid != guid)
Console.WriteLine($"π₯ Collision found after {attempts} attempts!");
Console.WriteLine($"π GUID 1: {existingGuid}");
Console.WriteLine($"π GUID 2: {guid}");
Console.WriteLine($"π― Shared hash: {hashCode}");
hashTracker[hashCode] = guid;
Console.WriteLine($"π No collision found in {maxAttempts} attempts");