Esempio n. 1
0
        private void randominfo(string bundleId)
        {
            string fakeiOSVersion = "";

            if (this.fakeversion.Checked)
            {
                List <string> avaiableChoose = new List <string>();
                if (this.cbFakeIOS12.Checked)
                {
                    avaiableChoose.Add("12");
                }
                if (this.cbFakeIOS10.Checked)
                {
                    avaiableChoose.Add("10");
                }
                if (this.cbFakeIOS11.Checked)
                {
                    avaiableChoose.Add("11");
                }
                fakeiOSVersion = avaiableChoose.OrderBy(x => Guid.NewGuid()).FirstOrDefault();
            }

            var postParams = new Dictionary <string, string>
            {
                { "needFakeCarrier", "True" },
                { "needFakeOSVersion", fakeiOSVersion != "" ? "True" : "False" },
                { "suggestOSVersion", fakeiOSVersion },
                { "needFakeModel", this.cbFakeModel.Checked.ToString() },
                { "needFakeScreen", this.cbFakeScreen.Checked.ToString() },
                { "needFakeNetwork", "True" },
                { "origOSVersion", this.DeviceInfo.DeviceOSVersion },
                { "origModel", this.DeviceInfo.DeviceModel }
            };

            string currentIp = NetworkHelper.currentFakeIP;

            if (this.button23.BackColor != System.Drawing.Color.Red)
            {
                currentIp = NetworkHelper.getIPData("").query;
            }

            var postData = new Dictionary <string, object>
            {
                { "ip", currentIp },
                { "serial", this.DeviceInfo.SerialNumber },
                { "app", bundleId },
                { "old_device", this.cbNewDevice.Checked },
                { "params", postParams }
            };

            string jsonStr        = JsonConvert.SerializeObject(postData);
            var    httpWebRequest = (HttpWebRequest)WebRequest.Create("http://45.77.46.92/autolead74/getdevice.php");

            httpWebRequest.ContentType = "application/json";
            httpWebRequest.Method      = "POST";

            using (var streamWriter = new StreamWriter(httpWebRequest.GetRequestStream()))
            {
                streamWriter.Write(jsonStr);
                streamWriter.Flush();
                streamWriter.Close();
            }

            var httpResponse = (HttpWebResponse)httpWebRequest.GetResponse();
            var response     = "";

            using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
            {
                response = streamReader.ReadToEnd();
            }

            if (response == "")
            {
                MessageBox.Show("Chua add key hoac serial sai");
                throw new Exception("get fake info failed");
            }

            this.cmd.randominfo(response);
        }
Esempio n. 2
0
        // 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);
        }
Esempio n. 3
0
        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");
            }
        }
Esempio n. 4
0
        public bool microFakeIp()
        {
            //get current micro index
            bool   result        = false;
            int    index         = -1;
            int    nextIndex     = 0;
            string currProxyHost = this.ipProxyHost.Text;
            string currProxyPort = this.numProxyPort.Value.ToString();

            for (int i = 0; i < this.microPortList.Count; i++)
            {
                if (this.microPortList[i]["host"] == currProxyHost && this.microPortList[i]["port"] == currProxyPort)
                {
                    index = i;
                    break;
                }
            }

            do
            {
                nextIndex = index + 1;
                if (nextIndex >= this.microPortList.Count)
                {
                    Thread.Sleep(1000);
                    nextIndex = 0;
                }


                string nextHost = this.microPortList[nextIndex]["host"];
                int    nextPort = Convert.ToInt32(this.microPortList[nextIndex]["port"]);
                string oldIp    = this.microPortList[nextIndex]["ip"];

                this.Invoke(new MethodInvoker(delegate
                {
                    this.ipProxyHost.Text   = nextHost;
                    this.numProxyPort.Value = nextPort;
                }));

                this.updateProcessLog("Checking micro sock...");

                NetworkHelper.currentFakeIP = NetworkHelper.getMicroIp(nextHost, nextPort);
                if (NetworkHelper.currentFakeIP != "")
                {
                    if (NetworkHelper.currentFakeIP != oldIp)
                    {
                        this.microPortList[nextIndex]["ip"] = NetworkHelper.currentFakeIP;
                        if (this.deviceComm.isConnect())
                        {
                            this.setProxy();
                        }

                        this.button23.Invoke(new MethodInvoker(delegate
                        {
                            this.button23.Text      = "Disable Proxy";
                            this.button23.BackColor = Color.Red;
                        }));

                        result = true;
                        break;
                    }
                    else
                    {
                        this.updateProcessLog("Micro ip not refresh: " + oldIp);
                        Thread.Sleep(1000);
                    }
                }
                else
                {
                    this.updateProcessLog("Micro sock died");
                    Thread.Sleep(1000);
                }
            }while (true);

            return(result);
        }
Esempio n. 5
0
        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);
        }
Esempio n. 6
0
        // on proxy type combobox changed
        private void proxytool_SelectedIndexChanged(object sender, EventArgs e)
        {
            NetworkHelper.currentFakeIP = "";
            if (this.proxytool.Text != "Micro")
            {
                this.ipProxyHost.Text = NetworkHelper.getLocalIpAddress();
                Random random = new Random();
                this.numProxyPort.Value = random.Next(1000, 50000);
            }

            bool flag = this.proxytool.Text == "SSH";

            if (flag)
            {
                IEnumerable <string> enumerable = (from x in this.listssh
                                                   select x.country).Distinct <string>();
                this.comboProxyGeo.Items.Clear();
                foreach (string item in enumerable)
                {
                    this.comboProxyGeo.Items.Add(item);
                }
                bool flag2 = this.comboProxyGeo.Items.Count > 0;
                if (flag2)
                {
                    this.comboProxyGeo.Text = this.comboProxyGeo.Items[0].ToString();
                }
            }
            else
            {
                bool flag3 = this.proxytool.Text == "Vip72";
                if (flag3)
                {
                    this.comboProxyGeo.Items.Clear();
                    foreach (countrycode ctcode in RunData.getInstance().listCountryCode)
                    {
                        this.comboProxyGeo.Items.Add(ctcode.country);
                    }
                    this.comboProxyGeo.SelectedIndex = 0;
                }
                else
                {
                    if (this.proxytool.Text == "SSHServer")
                    {
                        if (this.tbSSHServer.Text == "")
                        {
                            MessageBox.Show("Chua config SSH server. Proxy -> SSH -> SSH server");
                            this.proxytool.Text = "Direct";
                            return;
                        }

                        HttpWebRequest httpWebRequest = (HttpWebRequest)WebRequest.Create(this.tbSSHServer.Text + "/getgeo.php");
                        httpWebRequest.UserAgent = "XXX";
                        try
                        {
                            System.IO.Stream responseStream = httpWebRequest.GetResponse().GetResponseStream();
                            StreamReader     streamReader   = new StreamReader(responseStream);
                            string           text           = streamReader.ReadToEnd();
                            if (text.EndsWith("|"))
                            {
                                text = text.Substring(0, text.Length - 1);
                            }
                            string[] items = text.Split(new string[]
                            {
                                "|"
                            }, StringSplitOptions.None);
                            this.comboProxyGeo.Items.Clear();
                            this.comboProxyGeo.Items.AddRange(items);
                            this.comboProxyGeo.SelectedIndex = 0;
                        }
                        catch (Exception ex)
                        {
                            this.proxytool.Text = "Direct";
                            MessageBox.Show("Error connect to SSH Server");
                        }
                    }
                    else
                    {
                        this.comboProxyGeo.Items.Clear();
                    }
                }
            }
            this.saveothersetting();
        }
Esempio n. 7
0
        public Form1(string param)
        {
            this.settingUpdateTimer = new System.Windows.Forms.Timer();

            this.changesssh   = 0;
            this.scriptstatus = "stop";

            this._sshssh        = false;
            this.documentfolder = Environment.GetFolderPath(Environment.SpecialFolder.Personal) + "\\";

            this.offerListItem = new List <offerItem>();

            this.deviceComm = new DeviceCommunicator();
            this.cmd        = new command(this.deviceComm);
            this.cmdResult  = new commandResult();

            this.DeviceInfo = new deviceInfo();
            this.AppList    = new List <appDetail>();

            this.listbackup = new List <BackupObj>();
            this.listvipacc = new List <vipaccount>();

            this.maxwait             = 120;           // thoi gian timeout cua wipe - backup
            this.bitproc             = new Process(); //bitvise process
            this.runningstt          = EnumRunningSTT.NOT_RUN;
            this.currentOfferProfile = "";

            this.components = null;


            Random random = new Random();

            this.InitializeComponent();

            //init port connect
            this.numProxyPort.Value = random.Next(1000, 50000);
            //init ip connect
            this.DeviceIpControl.Text = Settings.Default.ipaddress;

            RunData.getInstance().loadAllData();

            this.lvwColumnSorter = new ListViewColumnSorter();
            this.listViewRRS.ListViewItemSorter = this.lvwColumnSorter;
            this.listViewRRS.OwnerDraw          = true;

            this.ipProxyHost.Text = NetworkHelper.getLocalIpAddress();


            ImageList imageList = new ImageList();

            imageList.ImageSize = new Size(1, 50);
            this.listViewOffer.SmallImageList = imageList;
            this.proxytool.Text = "SSH";


            try
            {
                this.Text = this.DeviceIpControl.Text.Split(new string[]
                {
                    "."
                }, StringSplitOptions.None)[3] + "|disconnected";
            }
            catch (Exception)
            {
            }

            initAutoLeadTab();

            Dictionary <string, ThreadStart> initParams = new Dictionary <string, ThreadStart>();

            initParams.Add("AutoLeadThread", new ThreadStart(this.autoLeadThread));
            initParams.Add("RRSThread", new ThreadStart(this.autoRRS));
            initParams.Add("BackupThread", new ThreadStart(this.backupthread));
            initParams.Add("WipeThread", new ThreadStart(this.wipethread));
            initParams.Add("ChangeIpThread", new ThreadStart(this.threadchangeIP));
            initParams.Add("ReconnectThread", new ThreadStart(this.reconnect));
            initParams.Add("ExeScriptThread", new ThreadStart(this.excutescriptthread1));

            ThreadManager.getInstance().init(initParams);
        }