public USBattleLoginHttper(DetectionParamsItem paramsItem) : base(paramsItem, WowLogManager.Instance) { this.PostContentFormat = USBattleLoginHttper.POSTCONTENTFORMAT; this.PostContentWithCaptchaFormat = USBattleLoginHttper.POSTCONTENTWITHCAPTCHAFORMAT; this.PostCharacterContentFormat = USBattleLoginHttper.POSTCHARACTERCONTENTFORMAT; }
public PwdResetHttperBase(DetectionParamsItem paramsItem) : base(paramsItem, WowLogManager.Instance) { this.PostUserFormat = PwdResetHttperBase.POSTUSERFORMAT; this.PostSecurityAnswerFormat = PwdResetHttperBase.POSTSECURITYANSWERFORMAT; this.PostContentWithCaptchaFormat = PwdResetHttperBase.POSTCAPTCHAFORMAT; }
public USBattleCharGetter(int level, DetectionParamsItem paramsItem, LogManagerBase logManager, string cookieStr, CookieContainer cookieContainer) : base(paramsItem, logManager) { availableLeve = level; this.GameServer = paramsItem.CurrentGameServer; this.cookie = cookieStr; this.cookieContainer = cookieContainer; }
private void CreateFileExporter(DetectionParamsItem paramsItem) { lock (this) { if (null == this.fileExporter) { this.fileExporter = new ExportBase(paramsItem.DataFilePath, paramsItem.IsAppended); this.LoadLastStopCount(); } } }
public void Output(FightAccountItem userItem, DetectionParamsItem paramsItem) { if ((null == userItem) || (null == paramsItem)) { FightLogManager.Instance.ErrorWithCallback("FileExportManager.Output error, parameters has null"); return; } this.CreateFileExporter(paramsItem); this.fileExporter.Output(userItem); }
private void AddUC(DetectionParamsItem detectionItem) { DisposeUC(); if (null == ucLogin) { ucLogin = new UCXBoxLogin(detectionItem, XBOXLogManager.Instance) { Dock = DockStyle.Fill }; panelWeb.Controls.Add(ucLogin); } }
private void btnStart_Click(object sender, EventArgs e) { this.IniHttperManamger(); DetectionParamsItem detectionItem = GetDetectionParamsItem(); if (null != detectionItem) { this.ClearLog(); this.SetEnableForButton(false); this.ShowProcessCount(true); this.StartSpendTimer(); httperManager.Start(detectionItem); } SoundPlayer.PlayAlter(); }
private bool GetCustomRange(DetectionParamsItem detectionItem) { int i = 0; int lower = -1, upper = -1; StringBuilder sb = new StringBuilder(); string lowerTxt = this.txtLower.Text.Trim(); string upperTxt = this.txtUpper.Text.Trim(); if (!TextHelper.IsNumber(lowerTxt)) { sb.AppendLine(string.Format("{0}、自定义范围的起始值非法!", ++i)); } else { lower = TextHelper.StringToInt(lowerTxt); } if (!TextHelper.IsNumber(upperTxt)) { sb.AppendLine(string.Format("{0}、自定义范围的结束值非法!", ++i)); } else { upper = TextHelper.StringToInt(upperTxt); } if ((upper <= 0) || (lower <= 0) || (lower > upper)) { sb.AppendLine(string.Format("{0}、自定义范围的起始值和结束值必须大于0,并且前值必须大于后值!", ++i)); } if (sb.Length > 0) { MessageBox.Show(sb.ToString(), "(裂隙)提醒"); return(false); } detectionItem.RangeLower = lower - 1; detectionItem.RangeUpper = upper - 1; RiftSetConfig.Instance.RangeLower = lower; RiftSetConfig.Instance.RangeUpper = upper; return(true); }
private void btnStart_Click(object sender, EventArgs e) { DetectionParamsItem detectionItem = GetDetectionParamsItem(); if (null != detectionItem) { this.ClearLog(); this.SetEnableForButton(false); this.ShowProcessCount(true); this.CreateHttperManamger(); this.StartSpendTimer(); if (this.radioVpn.Checked) { this.ucVpnList.Test(); } httpManager.Start(detectionItem); } SoundPlayer.PlayAlter(); RiftSetConfig.Instance.IsCompleted = false; }
private void FrmTest_Load(object sender, EventArgs e) { DetectionParamsItem paramsItem = new DetectionParamsItem(); paramsItem.CurrentGameServer = GameServers.XBOXServer; AccountItem account = new AccountItem(); account.User = "******"; account.Password = "******"; UCXBoxLogin uc = new UCXBoxLogin(paramsItem, XBOXLogManager.Instance) { Dock = DockStyle.Fill }; panel1.Controls.Add(uc); using (uc) { uc.GetState(account, new AutoResetEvent(false)); } }
/// <summary>= /// If a user account need accept agreement /// </summary> private bool AcceptAgreement(string content, DetectionParamsItem serverItem) { #region HtmlSampleCode //<label for="agree1"> //<input type="checkbox" id="agree1" name="agree1" disabled="disabled" //class="legalCheckbox" style="visibility:hidden" onclick="login.scrollAccept.accept(this)" /> //I accept the Terms of Use applicable to my country of residence.<span class="important">*</span> //</label> //Post data:agree1=on #endregion HtmlSampleCode string result = string.Empty; if (this.IsContains(content, "legalAgreement", "<label for=\"agree1\">")) { string postContent = "agree1=on"; HttpWebRequest httpRequest = this.WriteToHttpWebRequest(serverItem.CurrentGameServer.LoginPostActionUrl, postContent); try { if (null != httpRequest) { result = this.ReadFromHttpWebResponse(httpRequest); this.DisposeHttpRequest(httpRequest); } } catch (Exception ex) { WowLogManager.Instance.Error(string.Format("USBattleHttpHelper.AcceptAgreement() error:{0}", ex.Message)); } return(true); } return(false); }
public UCXBoxLogin(DetectionParamsItem paramsItem, LogManagerBase logManager) { InitializeComponent(); if (null == paramsItem) { throw new ArgumentNullException("paramsItem"); } if (null == logManager) { throw new ArgumentNullException("logManager"); } CookieCleaner.CleanCookies("xbox"); this.HttperParamsItem = paramsItem; this.LogManager = logManager; this.Server = this.HttperParamsItem.CurrentGameServer; this.webBrowser.DocumentCompleted += webBrowser_DocumentCompleted; this.webBrowser.AllowNavigation = true; this.webBrowser.ScriptErrorsSuppressed = true; //this.webBrowser.Document.Cookie }
public HttperLoginBase(DetectionParamsItem HttperParamsItem) : base(HttperParamsItem, AppleLogManager.Instance) { }
public USRiftHttperLoginBase(DetectionParamsItem HttperParamsItem) : base(HttperParamsItem, RiftLogManager.Instance) { }
public EUBattleCharGetter(int level, DetectionParamsItem paramsItem, LogManagerBase logManager, string cookieStr, CookieContainer cookieContainer) : base(level, paramsItem, logManager, cookieStr, cookieContainer) { }
private DetectionParamsItem GetDetectionParamsItem() { DetectionParamsItem detectionItem = new DetectionParamsItem(); StringBuilder sb = new StringBuilder(); int i = 1; //If file / server changed bool isSettingChaned = false; #region GameServer GameServer gameServer = comboServer.SelectedItem as GameServer; if (null != gameServer) { detectionItem.CurrentGameServer = gameServer; if (RiftSetConfig.Instance.GameServerNo != comboServer.SelectedIndex) { isSettingChaned = true; } RiftSetConfig.Instance.GameServerNo = comboServer.SelectedIndex; } else { sb.AppendLine(string.Format("{0}、请选择正确的游戏服务器网站!", i++)); } #endregion GameServer detectionItem.HttpTimeout = RiftSetConfig.Instance.HttpTimeout; detectionItem.IsGetDetail = chkGetDetail.Checked; #region Threads if (TextHelper.IsNumber(txtThreads.Text.Trim())) { int threads = TextHelper.StringToInt(txtThreads.Text.Trim()); if (threads < 0 || threads > 50) { sb.AppendLine(string.Format("{0}、请录入正确的线程整数值范围(1-50)!", i++)); } detectionItem.Threads = threads; RiftSetConfig.Instance.Threads = threads; } else { sb.AppendLine(string.Format("{0}、请录入正确的线程整数值(如:5)!", i++)); } if (TextHelper.IsNumber(this.txtRepeatCount.Text.Trim())) { int count = TextHelper.StringToInt(this.txtRepeatCount.Text.Trim()); if (count >= 0) { detectionItem.ErrorRepeatCount = count; RiftSetConfig.Instance.ErrorRepeatCount = count; } else { sb.AppendLine(string.Format("{0}、请录入有效的出错重试次数!", i++)); } } else { sb.AppendLine(string.Format("0}、请录入有效的出错重试次数!", i++)); } if (TextHelper.IsNumber(this.txtCaptchCount.Text.Trim())) { int count = TextHelper.StringToInt(this.txtCaptchCount.Text.Trim()); if (count > 0) { detectionItem.CaptchaErrorCount = count; RiftSetConfig.Instance.CaptchCount = count; } else { sb.AppendLine(string.Format("{0}、请录入有效的验证码出错重启数,默认是5!", i++)); } } else { sb.AppendLine(string.Format("0}、请录入有效的验证码出错重启数,默认是5!", i++)); } #endregion Threads #region FilePath if (!string.IsNullOrEmpty(txtFilePath.Text.Trim()) && File.Exists(txtFilePath.Text)) { detectionItem.DataFilePath = txtFilePath.Text.Trim(); } else { sb.AppendLine(string.Format("{0}、请录入正确的数据文件路径,或者文件是否存在!", i++)); } detectionItem.DataFormat = (DataFormat)comboDataType.SelectedValue; RiftSetConfig.Instance.DataFormat = detectionItem.DataFormat; #endregion FilePath #region reconnect mode detectionItem.IsSupportedReconnect = chkReconnect.Checked; RiftSetConfig.Instance.IsSupportedReconnect = chkReconnect.Checked; if (chkReconnect.Checked) { if (radioADSL.Checked) { detectionItem.ReconnectType = ReconnectType.ADSL; } if (radioRouter.Checked) { detectionItem.ReconnectType = ReconnectType.Router; } if (radioVpn.Checked) { detectionItem.ReconnectType = ReconnectType.VPN; } RiftSetConfig.Instance.ReconnectType = detectionItem.ReconnectType; if (radioADSL.Checked) { ADSLItem adsl = this.ucAdsl.GetADSLItem(); if (null == adsl) { return(null); } else { detectionItem.ADSL = adsl; RiftSetConfig.Instance.ADSLName = adsl.EntryName; RiftSetConfig.Instance.ADSLPwd = adsl.Password; RiftSetConfig.Instance.ADSLUser = adsl.User; } } if (radioVpn.Checked) { IList <VPNItem> vpnList = this.ucVpnList.GetVpnList(); if (null != vpnList && vpnList.Count > 0) { detectionItem.VpnList = vpnList; RiftSetConfig.Instance.VpnEntryName = vpnList[0].EntryName; RiftSetConfig.Instance.VpnIP = vpnList[0].IP; RiftSetConfig.Instance.VpnUser = vpnList[0].User; RiftSetConfig.Instance.VpnPwd = vpnList[0].Password; } else { return(null); } } if (radioRouter.Checked) { RouterItem router = this.ucRouter.GetRouterItem(); if (null == router) { return(null); } else { detectionItem.Router = router; RiftSetConfig.Instance.RouterType = router.RouterType; RiftSetConfig.Instance.RouterIP = router.IP; RiftSetConfig.Instance.RouterPwd = router.Password; RiftSetConfig.Instance.RouterUser = router.User; } } if (!radioRouter.Checked && !radioVpn.Checked && !radioADSL.Checked) { sb.AppendLine(string.Format("{0}、当前选择了网络重连功能,但没有选择具体的重连方式!!", i++)); } } #endregion reconnect mode #region Data query type if (radioCustomRange.Checked && !this.GetCustomRange(detectionItem)) { return(null); } if (sb.Length > 0) { MessageBox.Show(sb.ToString(), "(裂隙)提醒"); return(null); } if (radioFromFirst.Checked) { detectionItem.QueryType = QueryType.FromFrist; } else if (radioCustomRange.Checked) { detectionItem.QueryType = QueryType.FromCustomRange; } else if (radioFromStopped.Checked) { detectionItem.QueryType = QueryType.FromStopped; } RiftSetConfig.Instance.QuertyType = detectionItem.QueryType; #endregion Data query type #region warning Dialog i = 1; sb = new StringBuilder(); sb.AppendLine(string.Format("{0}、请确认选择的游戏网站,数据格式是否录入正确!", i++)); sb.AppendLine(string.Format("{0}、请确认选择扫瞄方式是不是正确,否则容易造成重复劳动!", i++)); sb.AppendLine(string.Format("{0}、请确认录入线程数,网络连接超时,验证码出错重试数是否录入正确!", i++)); if (this.radioCustomRange.Checked) { sb.AppendLine(string.Format("{0}、请确认是否真的要按自定义的数据范围来进行处理,并且上下行值是否正确!", i++)); } if (chkReconnect.Checked) { sb.AppendLine(string.Format("{0}、请确认是否真的要支持网络重连,并且网络重连的方式是否正确!", i++)); } if (this.radioADSL.Checked) { sb.AppendLine(string.Format("{0}、请确认ADSL名称是否是当前使用的PPPOE名称,用户名及密码是否正确!", i++)); } if (this.radioVpn.Checked) { sb.AppendLine(string.Format("{0}、请确认VPN名称,IP址址,用户名及密码是否正确!", i++)); } if (this.radioRouter.Checked) { sb.AppendLine(string.Format("{0}、请确认选择的路由器类型,IP址址,用户名及密码是否正确!", i++)); } DialogResult dlgResult = MessageBox.Show(sb.ToString(), "(裂隙)提醒 ----> 真的要按当前的配置执行吗?", MessageBoxButtons.OKCancel); if (dlgResult != DialogResult.OK) { return(null); } #endregion warning Dialog if (RiftSetConfig.Instance.LastFile.Trim() != detectionItem.DataFilePath.Trim()) { isSettingChaned = true; } if (radioFromFirst.Checked || isSettingChaned) { RiftDBHelper.ClearTable(RiftTableName.QueriedRift, RiftTableName.RiftResult); } return(detectionItem); }
public USPwdResetHttper(DetectionParamsItem paramsItem) : base(paramsItem) { //New query need cookie be empty; this.ClearCookie(); }
public FightHttperLogin(DetectionParamsItem HttperParamsItem) : base(HttperParamsItem, FightLogManager.Instance) { }
public XBoxHttperLogin(DetectionParamsItem HttperParamsItem) : base(HttperParamsItem, XBOXLogManager.Instance) { }
public WowHttperLoginBase(DetectionParamsItem paramsItem, LogManagerBase logManager) : base(paramsItem, logManager) { }
public SeaBattleLoginHttper(DetectionParamsItem paramsItem) : base(paramsItem) { this.PostContentFormat = SeaBattleLoginHttper.POSTCONTENTFORMAT; this.PostContentWithCaptchaFormat = SeaBattleLoginHttper.POSTCONTENTWITHCAPTCHAFORMAT; }
public ENPwdResetHttper(DetectionParamsItem paramsItem) : base(paramsItem) { }
public EUBattleLoginHttper(DetectionParamsItem paramsItem) : base(paramsItem) { //this.GetGameAccountItemList(null); }