Example #1
0
 private void StartRank(AccountItem account)
 {
     foreach (RankerBase ranker in this.rankerList)
     {
         if (ranker.ParsePassword(account))
         {
             break;
         }
     }
 }
Example #2
0
 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);
 }
Example #3
0
        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);
            }
        }
Example #4
0
        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());
            }
        }
Example #5
0
        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);
        }
Example #6
0
 public override bool ParsePassword(AccountItem account)
 {
     account.SplitChars = this.DataParams.TargetSplitChars;
     account.Password   = this.AddOrDel(account.Password);
     return(this.WriteToFile(account));
 }
Example #7
0
 public abstract bool ParsePassword(AccountItem account);