diff options
| author | Michael <[email protected]> | 2017-06-27 15:43:09 -0400 |
|---|---|---|
| committer | Michael <[email protected]> | 2017-06-27 15:43:09 -0400 |
| commit | 65f79e4b238bd231d0d5e2e73c0bda0494e23608 (patch) | |
| tree | 10254e49b8719274e4ed88eb5627a5aa4c27e1a0 /ShiftOS.WinForms/VirtualEnvironments.cs | |
| parent | 5bebd4411bc6266cbee482a429ba794eefa8f9b6 (diff) | |
| download | shiftos_thereturn-65f79e4b238bd231d0d5e2e73c0bda0494e23608.tar.gz shiftos_thereturn-65f79e4b238bd231d0d5e2e73c0bda0494e23608.tar.bz2 shiftos_thereturn-65f79e4b238bd231d0d5e2e73c0bda0494e23608.zip | |
Make brute better.
Diffstat (limited to 'ShiftOS.WinForms/VirtualEnvironments.cs')
| -rw-r--r-- | ShiftOS.WinForms/VirtualEnvironments.cs | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/ShiftOS.WinForms/VirtualEnvironments.cs b/ShiftOS.WinForms/VirtualEnvironments.cs index fb39569..019c46c 100644 --- a/ShiftOS.WinForms/VirtualEnvironments.cs +++ b/ShiftOS.WinForms/VirtualEnvironments.cs @@ -100,25 +100,20 @@ Users: {con.Users.Count}"); else { Console.WriteLine(" - starting bruteforce attack on user: " + user.Username + " - "); - var rnd = new Random(); - + char[] pass = new char[user.Password.Length]; for (int i = 0; i < pass.Length; i++) { if (cracked == true) break; - while (pass[i] != user.Password[i]) + for(char c = (char)0; c < (char)255; c++) { - if (cracked == true) + if (!char.IsLetterOrDigit(c)) + continue; + pass[i] = c; + if (pass[i] == user.Password[i]) break; - char c = VALID_PASSWORD_CHARS[rnd.Next(VALID_PASSWORD_CHARS.Length)]; - if (char.IsLetterOrDigit(c)) - { - pass[i] = c; - Console.WriteLine(new string(pass)); - Console.WriteLine(); - Thread.Sleep(1); - } + Console.WriteLine(new string(pass)); } } if (cracked == false) |
