private void btnAddMicro_Click(object sender, EventArgs e) { if (this.textMicroHost.Text == "" || this.numMicroPort.Value == 0 || !NetworkHelper.validateIP(this.textMicroHost.Text)) { MessageBox.Show("Invalid micro info. check again"); return; } ListViewItem value = new ListViewItem(new string[] { this.textMicroHost.Text, this.numMicroPort.Value.ToString(), "Uncheck" }); this.microPortList.Add(new Dictionary <string, string> { { "host", this.textMicroHost.Text }, { "port", this.numMicroPort.Value.ToString() }, { "ip", "" }, { "status", "Uncheck" } }); this.listviewMicro.Items.Add(value); saveListMicroPort(); }
private void filterRRSByIPLead(string ipFile) { string[] ipArray = File.ReadAllLines(ipFile); string[] validIpArray = Array.FindAll(ipArray, ip => NetworkHelper.validateIP(ip)); for (int i = 0; i < this.listViewRRS.Items.Count; i++) { string cmt = this.listViewRRS.Items[i].SubItems[5].Text; if (Array.FindAll(validIpArray, validIP => cmt.EndsWith(validIP)).Length != 0) { this.listViewRRS.Items[i].Checked = true; } else { this.listViewRRS.Items[i].Checked = false; } } }
// Token: 0x060000D2 RID: 210 RVA: 0x0000D940 File Offset: 0x0000BB40 public static string anaURL(string URL, string curip, string deviceip) { if (!NetworkHelper.validateIP(curip)) { return(URL); } bool flag = curip != ""; if (flag) { string[] array = curip.Split(new string[] { "." }, StringSplitOptions.None); string newValue = array[0] + "." + array[1]; string newValue2 = string.Concat(new string[] { array[0], ".", array[1], ".", array[2] }); URL = URL.Replace("{ip_2}", newValue); URL = URL.Replace("{ip_3}", newValue2); } URL = URL.Replace("{id}", deviceip.Split(new string[] { "." }, StringSplitOptions.None)[3]); Regex regex = new Regex("{number_(.*?)}"); MatchCollection matchCollection = regex.Matches(URL); int num = 0; foreach (object obj in matchCollection) { Match match = (Match)obj; string value = match.Groups[1].Value; Random random5 = new Random(); int count = Convert.ToInt32(value); Random random = new Random(); string text = new string((from s in Enumerable.Repeat <string>("123456789", count) select s[random.Next(s.Length)]).ToArray <char>()); URL = URL.Remove(match.Index - num, match.Length); URL = URL.Insert(match.Index - num, text); num += match.Length - text.Length; Thread.Sleep(10); } regex = new Regex("{randomnum\\((.*?)\\)}"); matchCollection = regex.Matches(URL); num = 0; foreach (object obj2 in matchCollection) { Match match2 = (Match)obj2; string value2 = match2.Groups[1].Value; string[] array2 = value2.Replace(" ", string.Empty).Split(new string[] { "," }, StringSplitOptions.None); bool flag2 = array2.Count <string>() == 2; if (flag2) { Random random2 = new Random(); int count2 = random2.Next(Convert.ToInt32(array2[0]), Convert.ToInt32(array2[1]) + 1); Random random = new Random(); string text2 = new string((from s in Enumerable.Repeat <string>("123456789", count2) select s[random.Next(s.Length)]).ToArray <char>()); URL = URL.Remove(match2.Index - num, match2.Length); URL = URL.Insert(match2.Index - num, text2); num += match2.Length - text2.Length; Thread.Sleep(10); } } regex = new Regex("{string_(.*?)}"); matchCollection = regex.Matches(URL); num = 0; foreach (object obj3 in matchCollection) { Match match3 = (Match)obj3; string value3 = match3.Groups[1].Value; Random random3 = new Random(); int count3 = Convert.ToInt32(value3); Random random = new Random(); string text3 = new string((from s in Enumerable.Repeat <string>("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", count3) select s[random.Next(s.Length)]).ToArray <char>()); URL = URL.Remove(match3.Index - num, match3.Length); URL = URL.Insert(match3.Index - num, text3); num += match3.Length - text3.Length; Thread.Sleep(10); } regex = new Regex("{randomtext\\((.*?)\\)}"); matchCollection = regex.Matches(URL); num = 0; foreach (object obj4 in matchCollection) { Match match4 = (Match)obj4; string value4 = match4.Groups[1].Value; string[] array3 = value4.Replace(" ", string.Empty).Split(new string[] { "," }, StringSplitOptions.None); bool flag3 = array3.Count <string>() == 2; if (flag3) { Random random4 = new Random(); int count4 = random4.Next(Convert.ToInt32(array3[0]), Convert.ToInt32(array3[1]) + 1); Random random = new Random(); string text4 = new string((from s in Enumerable.Repeat <string>("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", count4) select s[random.Next(s.Length)]).ToArray <char>()); URL = URL.Remove(match4.Index - num, match4.Length); URL = URL.Insert(match4.Index - num, text4); num += match4.Length - text4.Length; Thread.Sleep(10); } } return(URL); }
private bool Vip72FakeIp() { bool result = false; vipaccount vipacc = null; try { sshcommand.closebitvise((int)this.numProxyPort.Value); bool flag17 = !this.bitproc.HasExited; if (flag17) { this.bitproc.Kill(); } } catch (Exception) { } this.lblStatusMsg.Invoke(new MethodInvoker(delegate { this.lblStatusMsg.Text = "Đang đợi Để sử dụng Vip72..."; })); InterfaceVip72 vip72 = getVip72Instance(); this.lblStatusMsg.Invoke(new MethodInvoker(delegate { this.lblStatusMsg.Text = "Getting Vip72 IP..."; })); START_VIP72_FAKEIP: while (true) { vipacc = chooseVip72Account(); if (vipacc == null) { MessageBox.Show("All vip72 are limited or there is no account, Please add other Vip72 account to use", Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Hand); this.lblStatusMsg.Invoke(new MethodInvoker(delegate { this.lblStatusMsg.Text = "Vip72 account is out"; })); return(false); } else { this.listViewVip72.Invoke(new MethodInvoker(delegate { this.listViewVip72.Items[this.listvipacc.IndexOf(vipacc)].BackColor = Color.Yellow; this.listViewVip72.Refresh(); })); bool loginResult = vip72.vip72login(vipacc.username, vipacc.password, (int)this.numProxyPort.Value); if (!loginResult) { vipacc.limited = true; vip72.killVipProcess(); Thread.Sleep(5000); this.listViewVip72.Invoke(new MethodInvoker(delegate { this.lblStatusMsg.Text = "Vip acc: " + vipacc.username + " login failed"; this.listViewVip72.Items[this.listvipacc.IndexOf(vipacc)].BackColor = Color.Red; this.listViewVip72.Refresh(); })); } else { this.listViewVip72.Invoke(new MethodInvoker(delegate { this.listViewVip72.Items[this.listvipacc.IndexOf(vipacc)].BackColor = Color.Lime; this.listViewVip72.Refresh(); })); break; } } } while (true) { string countryTxt = ""; this.lblStatusMsg.Invoke(new MethodInvoker(delegate { countryTxt = this.comboProxyGeo.Text; })); if (!vip72.getip(countryTxt)) { result = true; break; } string clickResult = vip72.clickip((int)this.numProxyPort.Value); if (clickResult == "not running") { result = false; break; } else if (clickResult == "no IP") { continue; } else if (clickResult == "dead") { continue; } else if (clickResult == "limited") { vipacc.limited = true; this.listViewVip72.Items[this.listvipacc.IndexOf(vipacc)].BackColor = Color.Red; this.listViewVip72.Refresh(); goto START_VIP72_FAKEIP; } else if (clickResult == "maximum") { vip72.clearip(); continue; } else if (clickResult == "timeout") { goto START_VIP72_FAKEIP; } else { //OK if (NetworkHelper.validateIP(clickResult)) { NetworkHelper.currentFakeIP = clickResult; result = true; break; } } } return(result); }