Add a func to break a wireless key
This commit is contained in:
parent
fffe00ae54
commit
094f8cabf7
@ -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<string> choices = new List<string>() { "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<string>(choices);
|
||||
string choice = choices[0]; //grab the first one
|
||||
|
||||
if (nic.WirelessKey == choice) return false;
|
||||
nic.WirelessKey = choice; //change it
|
||||
return true;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user