if (getInfo("accountName=" + str2, "http://www.worldofwarcraft.com/loginsupport/password.html").Contains("nswer"))
That's pretty much all this does? You do realize that all this will do is provide you with is the "Either that account name doesn't exist or the e-mail is incorrect." message upon returning getInfo, correct?
Pretty much, this program is useless as hell. (And you haven't encrypted jack shit btw.)
Here, I assume this is what you wanted your entire app to do;
Code:
private static readonly Regex _passRegex = new Regex(@"[^\w!""#\$,%]");
private static readonly Regex _userRegex = new Regex(@"\W");
public static bool ValidateAccount(string username, string password)
{
if (!ValidateUsername(username) || !ValidatePassword(password))
{
return false;
}
return username != password;
}
public static bool ValidatePassword(string password)
{
return password.Length >= 8 && password.Length <= 16 && !_passRegex.Match(password).Success;
}
public static bool ValidateUsername(string username)
{
return username.Length >= 3 && username.Length <= 16 && !_userRegex.Match(username).Success;
}
Ripped out of STS 2.1. Enjoy. And next time, do something useful.