private void StartRank(AccountItem account) { foreach (RankerBase ranker in this.rankerList) { if (ranker.ParsePassword(account)) { break; } } }
public override bool ParsePassword(AccountItem account) { account.SplitChars = this.DataParams.TargetSplitChars; if (IsAllChar(account.Password)) { account.Password = this.AddOrDel(account.Password); return(WriteToFile(account)); } return(false); }
protected override void ProcessLine(string line) { if (string.IsNullOrEmpty(line)) { return; } AccountItem account = new AccountItem(line, this.Format, this.SplitChar); if (account.IsValidate) { StartRank(account); } }
protected override void ProcessLine(string line) { if (string.IsNullOrEmpty(line)) { return; } AccountItem account = new AccountItem(line, DataFormat.MailPassword, ""); if (account.IsValidate) { account.SplitChars = " "; if (this.CurrentFilterParam.IsFilterChar) { account.Password = this.RemoveChar(account.Password); } if (this.CurrentFilterParam.IsFilterNum) { account.Password = this.RemoveNum(account.Password); } this.WriteLine(account.ToString()); } }
protected virtual bool WriteToFile(AccountItem account) { StreamWriter sw = null; if (account.OldPassword.Length <= 3) { sw = swDic[3]; } else if (account.OldPassword.Length >= 8) { sw = swDic[8]; } else { sw = swDic[account.OldPassword.Length]; } if (null == sw) { //LogManager.Error("File writer can't be null!"); return(false); } if (null != sw) { sw.WriteLine(account.ToString()); flushCount++; if (flushCount == 100) { sw.Flush(); flushCount = 0; } return(true); } return(false); }
public override bool ParsePassword(AccountItem account) { account.SplitChars = this.DataParams.TargetSplitChars; account.Password = this.AddOrDel(account.Password); return(this.WriteToFile(account)); }
public abstract bool ParsePassword(AccountItem account);