I'm making a script to try and hack into an account whose login password is at least 8 characters long and includes at least 1 number, 1 special character and 1 capital letter. I will use brute force. Is there a compact, elegant and efficient way to iterate through every possible string that matches a given regular expression? Are there any C# classes that already do this or will I have to invent the wheel?
Desired:
CoolClass pswExpIter = CoolClass(pswExp);
for ( string thisExp = pswdExpIter.first(); thisExp != pswdExpIter.offend(); thisExp = pswdExpIter.next())
{
if (login("John Doe", thisExp)
{
// do something
break;
}
}