private void openOfferLink(offerItem item) { int index = this.offerListItem.IndexOf(item); bool checkip = false; this.lblStatusMsg.Invoke(new MethodInvoker(delegate { checkip = this.checkBox8.Checked; this.maxTimeOpenApp = (int)this.maxLoadUrl.Value; this.lblStatusMsg.Text = "Đang mở Link Offer"; })); this.cmdResult.openURL = false; this.cmdResult.frontAppByID = ""; this.cmd.openURL(Utils.anaURL(item.offerURL, NetworkHelper.currentFakeIP, this.DeviceIpControl.Text)); DateTime now4 = DateTime.Now; while (true) { Thread.Sleep(1000); this.cmd.getForegroundApp(); if (this.cmdResult.frontAppByID == "com.apple.AppStore") { break; } if ((DateTime.Now - now4).TotalSeconds > this.maxTimeOpenApp) { throw new TimeoutException("Open offer link timeouted"); } } this.listViewOffer.Invoke(new MethodInvoker(delegate { this.listViewOffer.Items[index].SubItems[1].BackColor = Color.Lime; this.listViewOffer.Items[index].SubItems[2].BackColor = Color.Yellow; this.listViewOffer.Refresh(); this.maxTimeOpenApp = (int)this.maxLoadUrl.Value; })); bool isCheckAS = false; this.listViewOffer.Invoke(new MethodInvoker(delegate { isCheckAS = this.cbCheckApp.Checked; })); if (isCheckAS) { checkAppStore(item.appID); } }
private void button4_Click(object sender, EventArgs e) { bool flag = this.listViewOffer.SelectedItems.Count > 0; if (flag) { int index = this.listViewOffer.Items.IndexOf(this.listViewOffer.SelectedItems[0]); offerItem offerItem = this.offerListItem.ElementAt(index); this.optionform.setFormData(offerItem); this.optionform.ShowDialog(); } }
// Token: 0x060004DF RID: 1247 RVA: 0x000302E4 File Offset: 0x0002E4E4 public void setFormData(offerItem item) { this.add = false; this.checkBox1.Checked = item.offerEnable; this.textBox1.Text = item.offerName; this.textBox2.Text = item.offerURL; this.comboBox1.Text = item.appName; this.checkBox3.Checked = item.timeSleepBeforeRandom; this.numericUpDown3.Value = item.timeSleepBeforeMin; this.numericUpDown4.Value = item.timeSleepBeforeMax; this.numericUpDown2.Value = item.timeSleepBefore; this.numericUpDown1.Value = item.timeSleep; }
private void button1_Click(object sender, EventArgs e) { Uri uri; bool flag; if (this.textBox1.Text == "") { MessageBox.Show("Offer name is required!", Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Hand); } else if (this.textBox2.Text != "") { if (!Uri.TryCreate(this.textBox2.Text, UriKind.Absolute, out uri)) { flag = false; } else { flag = (uri.Scheme == Uri.UriSchemeHttp ? true : uri.Scheme == Uri.UriSchemeHttps); } if (!flag) { MessageBox.Show("Offer URL is invalid!", Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Hand); } else if (this.passControl != null) { offerItem _offerItem = new offerItem() { appName = this.comboBox1.Text, appID = this.comboBox1.SelectedIndex.ToString(), offerEnable = this.checkBox1.Checked, offerName = this.textBox1.Text, offerURL = this.textBox2.Text, timeSleepBefore = (int)this.numericUpDown2.Value, timeSleepBeforeRandom = this.checkBox3.Checked, range1 = (int)this.numericUpDown3.Value, range2 = (int)this.numericUpDown4.Value, timeSleep = (int)this.numericUpDown1.Value, useScript = this.checkBox2.Checked, script = this.textBox4.Text, referer = this.textBox3.Text }; this.passControl(this.@add, _offerItem); base.Hide(); } } else { MessageBox.Show("Offer URL is required!", Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Hand); } }
// Token: 0x060003AA RID: 938 RVA: 0x00025CF4 File Offset: 0x00023EF4 private void button1_Click(object sender, EventArgs e) { bool flag = this.textBox1.Text == ""; if (flag) { MessageBox.Show("Offer name is required!", Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Hand); } else { bool flag2 = this.textBox2.Text == ""; if (flag2) { MessageBox.Show("Offer URL is required!", Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Hand); } else { Uri uri; bool flag3 = Uri.TryCreate(this.textBox2.Text, UriKind.Absolute, out uri) && (uri.Scheme == Uri.UriSchemeHttp || uri.Scheme == Uri.UriSchemeHttps); bool flag4 = !flag3; if (flag4) { MessageBox.Show("Offer URL is invalid!", Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Hand); } else { bool flag5 = this.passControl != null; if (flag5) { offerItem offerItem = new offerItem(); offerItem.appName = this.comboBox1.Text; offerItem.appID = this.comboBox1.SelectedIndex.ToString(); offerItem.offerEnable = this.checkBox1.Checked; offerItem.offerName = this.textBox1.Text; offerItem.offerURL = this.textBox2.Text; offerItem.timeSleepBefore = (int)this.numericUpDown2.Value; offerItem.timeSleepBeforeRandom = this.checkBox3.Checked; offerItem.range1 = (int)this.numericUpDown3.Value; offerItem.range2 = (int)this.numericUpDown4.Value; offerItem.timeSleep = (int)this.numericUpDown1.Value; offerItem.useScript = this.checkBox2.Checked; offerItem.script = this.textBox4.Text; offerItem.referer = this.textBox3.Text; this.passControl(this.add, offerItem); base.Hide(); } } } } }
private void passlistview(bool add, object sender) { if (this.listViewOffer.SelectedItems.Count <= 0 || add) { offerItem offerItem = (offerItem)sender; offerItem.appID = this.AppList[Convert.ToInt32(offerItem.appID)].appID; offerItem.appName = (from z in this.AppList where z.appID == offerItem.appID select z).First <appDetail>().appName; this.offerListItem.Add((offerItem)sender); ListViewItem listViewItem = new ListViewItem(new string[] { offerItem.offerName, offerItem.offerURL, offerItem.appName, offerItem.timeSleep.ToString() }); listViewItem.Checked = offerItem.offerEnable; this.listViewOffer.Items.Add(listViewItem); } else { int index = this.listViewOffer.Items.IndexOf(this.listViewOffer.SelectedItems[0]); offerItem offerItem2 = (offerItem)sender; this.offerListItem.ElementAt(index).appID = this.AppList[Convert.ToInt32(offerItem2.appID)].appID; this.offerListItem.ElementAt(index).appName = this.AppList[Convert.ToInt32(offerItem2.appID)].appName; this.offerListItem.ElementAt(index).offerEnable = offerItem2.offerEnable; this.offerListItem.ElementAt(index).offerName = offerItem2.offerName; this.offerListItem.ElementAt(index).offerURL = offerItem2.offerURL; this.offerListItem.ElementAt(index).timeSleep = offerItem2.timeSleep; this.offerListItem.ElementAt(index).timeSleepBefore = offerItem2.timeSleepBefore; this.offerListItem.ElementAt(index).timeSleepBeforeRandom = offerItem2.timeSleepBeforeRandom; this.offerListItem.ElementAt(index).timeSleepBeforeMin = offerItem2.timeSleepBeforeMin; this.offerListItem.ElementAt(index).timeSleepBeforeMax = offerItem2.timeSleepBeforeMax; ListViewItem listViewItem2 = this.listViewOffer.SelectedItems[0]; listViewItem2.Text = offerItem2.offerName; listViewItem2.Checked = offerItem2.offerEnable; listViewItem2.SubItems[1].Text = offerItem2.offerURL; listViewItem2.SubItems[2].Text = offerItem2.appName; listViewItem2.SubItems[3].Text = offerItem2.timeSleep.ToString(); } this.saveofferlist(); }
// Token: 0x060004E2 RID: 1250 RVA: 0x0003052C File Offset: 0x0002E72C private void button1_Click(object sender, EventArgs e) { if (this.textBox1.Text == "") { MessageBox.Show("Offer name is required!", Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Hand); return; } if (this.textBox2.Text == "") { MessageBox.Show("Offer URL is required!", Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Hand); return; } Uri uri; if (!Uri.TryCreate(this.textBox2.Text, UriKind.Absolute, out uri) || (!(uri.Scheme == Uri.UriSchemeHttp) && !(uri.Scheme == Uri.UriSchemeHttps))) { MessageBox.Show("Offer URL is invalid!", Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Hand); return; } if (this.comboBox1.SelectedIndex < 0) { MessageBox.Show("App not selected!", Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Hand); return; } if (this.passControl != null) { offerItem offerItem = new offerItem(); offerItem.appName = this.comboBox1.Text; offerItem.appID = this.comboBox1.SelectedIndex.ToString(); offerItem.offerEnable = this.checkBox1.Checked; offerItem.offerName = this.textBox1.Text; offerItem.offerURL = this.textBox2.Text; offerItem.timeSleepBefore = (int)this.numericUpDown2.Value; offerItem.timeSleepBeforeRandom = this.checkBox3.Checked; offerItem.timeSleepBeforeMin = (int)this.numericUpDown3.Value; offerItem.timeSleepBeforeMax = (int)this.numericUpDown4.Value; offerItem.timeSleep = (int)this.numericUpDown1.Value; this.passControl(this.add, offerItem); base.Hide(); } }
private void updateOfferListFromServer() { this.updateProcessLog("Getting offerfrom server..."); string url = this.textOfferURL.Text + this.DeviceInfo.SerialNumber; if (url != "") { try { HttpWebRequest httpWebRequest = (HttpWebRequest)WebRequest.Create(url); string jsonResponse = new StreamReader(httpWebRequest.GetResponse().GetResponseStream()).ReadToEnd(); DataContractJsonSerializer dataContractJsonSerializer = new DataContractJsonSerializer(typeof(offerItem)); MemoryStream stream = new MemoryStream(Encoding.UTF8.GetBytes(jsonResponse)); offerItem result = (offerItem)dataContractJsonSerializer.ReadObject(stream); result.offerEnable = true; this.listViewOffer.Items.Clear(); this.offerListItem.Clear(); this.offerListItem.Add(result); this.lblStatusMsg.Invoke(new MethodInvoker(delegate { ListViewItem listViewItem = new ListViewItem(new string[] { result.offerName, result.offerURL, result.appName, result.timeSleep.ToString(), "true" }); this.listViewOffer.Items.Add(listViewItem); this.listViewOffer.Refresh(); this.updateProcessLog("Get offer done"); })); } catch (Exception e) { MessageBox.Show("Get Offer fromserver failed"); } } }
public void autoLeadThread() { try { this.backuptime = 0; this.runtime = 0; bool fullWipe = false; this.lblStatusMsg.Invoke(new MethodInvoker(delegate { fullWipe = this.cbWipeFull.Checked; })); while (true) { updateRunBackupLabel(); NetworkHelper.currentFakeIP = ""; if (this.offerListItem.FirstOrDefault((offerItem x) => x.offerEnable) == null) { break; } this.setProxy(); this.fakeIP(); //open link and lead offer one by one List <offerItem> .Enumerator enumerator4 = this.offerListItem.GetEnumerator(); while (enumerator4.MoveNext()) { offerItem item = null; bool finished = false; while (!finished) { try { refreshAppListAndWait(); item = enumerator4.Current; if (item.offerEnable) { bool installed = isAppInstalled(item.appID); if (!fullWipe && !installed) { updateProcessLog("Error: App not install yet!"); continue; } if (fullWipe && installed) { uninstallAppAndWait(item.appID); } this.cmd.closeApp("all"); this.randominfo(item.appID); this.wipeAppData(new List <string> { item.appID, "com.apple.mobilesafari" }); singleAutoLead(item); tryToBackup(item.appID); } finished = true; } catch (Exception ex) { this.fakeIP(); updateProcessLog(ex.Message); this.LogMessage(ex.ToString(), Color.Black); } } } //check number turn runned bool stop = false; base.Invoke(new MethodInvoker(delegate { if (this.cbLimitRunTime.Checked && this.runtime >= this.numLimitLeadTime.Value) { stop = true; } })); if (stop) { break; } //reset offer list GUI this.listViewOffer.Invoke(new MethodInvoker(delegate { foreach (object obj in this.listViewOffer.Items) { ListViewItem listViewItem = (ListViewItem)obj; listViewItem.SubItems[0].ResetStyle(); listViewItem.SubItems[1].ResetStyle(); listViewItem.SubItems[2].ResetStyle(); listViewItem.SubItems[3].ResetStyle(); this.listViewOffer.Refresh(); } })); this.runtime++; } } catch (ThreadAbortException ex) { } catch (Exception ex) { this.LogMessage(ex.ToString(), Color.Black); base.Invoke(new MethodInvoker(delegate { disconnect(); return; })); } MessageBox.Show("Auto Lead completed"); base.Invoke(new MethodInvoker(delegate { if (this.btnStartLead.Text == "STOP") { this.btnStart_Click(null, null); this.Reset_Click(null, null); } })); }
private void singleAutoLead(offerItem item) { int index = this.offerListItem.IndexOf(item); this.lblStatusMsg.Invoke(new MethodInvoker(delegate { this.lblStatusMsg.Text = "Running :" + this.listViewOffer.Items[index].Text; this.listViewOffer.Items[index].UseItemStyleForSubItems = false; this.listViewOffer.Items[index].SubItems[0].BackColor = Color.Lime; this.listViewOffer.Items[index].SubItems[1].BackColor = Color.Yellow; this.listViewOffer.Refresh(); })); openOfferLink(item); bool fullWipe = false; this.listViewOffer.Invoke(new MethodInvoker(delegate { this.listViewOffer.Items[index].SubItems[2].BackColor = Color.Lime; this.listViewOffer.Items[index].SubItems[3].BackColor = Color.Yellow; this.listViewOffer.Refresh(); fullWipe = this.cbWipeFull.Checked; })); if (fullWipe) { installAppAndWait(item.appID); refreshAppListAndWait(); while (!isAppInstalled(item.appID)) { updateProcessLog("App not installed"); Thread.Sleep(3000); } } int timesleep = item.timeSleepBefore; if (item.timeSleepBeforeRandom) { Random random5 = new Random(); timesleep = random5.Next(item.timeSleepBeforeMin, item.timeSleepBeforeMax); this.listViewOffer.Invoke(new MethodInvoker(delegate { this.listViewOffer.Items[index].SubItems[3].Text = timesleep.ToString(); })); } for (int i = 0; i < timesleep; i++) { this.lblStatusMsg.Invoke(new MethodInvoker(delegate { this.lblStatusMsg.Text = "Sleeping for " + (timesleep - i - 1).ToString() + " seconds"; })); Thread.Sleep(1000); } if (!NetworkHelper.isHostUp(this.ipProxyHost.Text, (int)this.numProxyPort.Value)) { throw new Exception("Error proxy die"); } this.cmdResult.openApp = 0; this.lblStatusMsg.Invoke(new MethodInvoker(delegate { this.lblStatusMsg.Text = "Opening Aplication..."; })); this.cmd.openApp(item.appID); DateTime now4 = DateTime.Now; int maxTimeOpenApp = 0; this.btnConnectDevice.Invoke(new MethodInvoker(delegate { maxTimeOpenApp = (int)this.numMaxWait.Value; })); while (this.cmdResult.openApp != 1) { Thread.Sleep(100); if ((DateTime.Now - now4).TotalSeconds > (double)maxTimeOpenApp) { throw new TimeoutException("Open app timeouted"); } } Thread.Sleep(2000); if (this.cmdResult.openApp == 1) { for (int j = 0; j < Convert.ToInt32(item.timeSleep); j++) { Thread.Sleep(1000); int secondRemain = Convert.ToInt32(item.timeSleep) - j; this.listViewOffer.Invoke(new MethodInvoker(delegate { this.listViewOffer.Items[index].SubItems[3].Text = secondRemain.ToString(); this.lblStatusMsg.Text = "Application will be closed in " + secondRemain.ToString() + " sec"; })); } this.listViewOffer.Invoke(new MethodInvoker(delegate { this.listViewOffer.Items[index].SubItems[3].Text = item.timeSleep.ToString(); this.listViewOffer.Items[index].SubItems[3].BackColor = Color.Lime; this.listViewOffer.Refresh(); })); if (this.cbServerOffer.Checked) { this.excuteScript(item.script); } else { IEnumerable <ScriptEntity> source = this.listScriptAL; ScriptEntity scriptEntity = source.FirstOrDefault(((ScriptEntity x) => x.scriptAppID == item.appID)); if (scriptEntity != null & scriptEntity.scriptDictionary.Keys.Count > 0) { Random random6 = new Random(); string script = (scriptEntity.scriptKey == "Random") ? scriptEntity.scriptDictionary.ElementAt(random6.Next(0, scriptEntity.scriptDictionary.Keys.Count)).Value : scriptEntity.scriptDictionary[scriptEntity.scriptKey]; this.excuteScript(script); } } this.listViewOffer.Invoke(new MethodInvoker(delegate { this.listViewOffer.Refresh(); })); this.cmd.closeApp(item.appID); Thread.Sleep(3000); } else { throw new Exception("Open app unknown error"); } }
private void loadofferlist() { try { bool flag = this.DeviceInfo.SerialNumber != null; if (flag) { this.offerListItem.Clear(); this.listViewOffer.Items.Clear(); bool flag2 = File.Exists(AppDomain.CurrentDomain.BaseDirectory + this.DeviceInfo.SerialNumber + "\\offerlist.dat"); if (flag2) { string[] array = File.ReadAllText(AppDomain.CurrentDomain.BaseDirectory + this.DeviceInfo.SerialNumber + "\\offerlist.dat").Split(new string[] { "\r\n" }, StringSplitOptions.None); bool flag3 = array.Count <string>() == 0; if (!flag3) { int num = (int)Convert.ToInt16(array[0]); bool flag4 = num != array.Count <string>() - 1; if (!flag4) { for (int i = 0; i < array.Count <string>() - 1; i++) { string text = array[i + 1]; string[] array2 = text.Split(new string[] { "||" }, StringSplitOptions.None); offerItem offerItem = new offerItem(); try { offerItem.offerEnable = Convert.ToBoolean(array2[0]); offerItem.offerName = array2[1]; offerItem.offerURL = array2[2]; offerItem.appName = array2[3]; offerItem.appID = array2[4]; offerItem.timeSleepBefore = Convert.ToInt32(array2[5]); offerItem.timeSleepBeforeRandom = Convert.ToBoolean(array2[6]); offerItem.timeSleepBeforeMin = Convert.ToInt32(array2[7]); offerItem.timeSleepBeforeMax = Convert.ToInt32(array2[8]); offerItem.timeSleep = Convert.ToInt32(array2[9]); } catch (Exception ex) { } this.offerListItem.Add(offerItem); ListViewItem value = new ListViewItem(new string[] { offerItem.offerName, offerItem.offerURL, offerItem.appName, offerItem.timeSleep.ToString() }); this.listViewOffer.Items.Add(value); } foreach (offerItem offerItem2 in this.offerListItem) { bool offerEnable = offerItem2.offerEnable; if (offerEnable) { this.listViewOffer.Items[this.offerListItem.IndexOf(offerItem2)].Checked = true; } } } } } } } catch (Exception ex2) { } }