diff --git a/EduNetworkBuilder/NetworkDevice.cs b/EduNetworkBuilder/NetworkDevice.cs index ebdc6bd..60981df 100644 --- a/EduNetworkBuilder/NetworkDevice.cs +++ b/EduNetworkBuilder/NetworkDevice.cs @@ -3068,6 +3068,28 @@ namespace EduNetworkBuilder nic.SSID = choice; //change it return true; } + + public bool BreakWirelessKey(string nicname) + { + //find the nic. + NetworkCard nic = NicFromName(nicname); + if (nic == null) return false; //we could not do it. + + List choices = new List() { "Key", "Llave","ChangeMe", + "Password","key","default","admin",}; + choices.Add(nic.WirelessKey.ToUpper()); + choices.Add(nic.WirelessKey.ToLower()); + if (nic.WirelessKey.Length > 4) + choices.Add(nic.WirelessKey.Substring(0, 2) + nic.WirelessKey.Substring(2, 1).ToUpper() + nic.WirelessKey.Substring(3)); + + choices = NB.Randomize(choices); + string choice = choices[0]; //grab the first one + + if (nic.WirelessKey == choice) return false; + nic.WirelessKey = choice; //change it + return true; + } + #endregion } }