Beispiel #1
0
        public bool method_18()
        {
            bool           result        = true;
            FlashSettings  flashSettings = this.Game.Settings.FlashSettings;
            DateTimeOffset licenseExpiration;

            GClass800.GEnum9 licenseState;
            if (!GClass800.smethod_0(flashSettings.pid, flashSettings.userID, this.Game.Dope.Key, out licenseExpiration, out licenseState, "basic"))
            {
                GClass93 socket = this.Socket;
                if (socket != null)
                {
                    socket.Disconnect(ErrorReason.NoLicense, null, false);
                }
                result = false;
            }
            this.Game.LicenseExpiration = licenseExpiration;
            this.Game.LicenseState      = licenseState;
            return(result);
        }
Beispiel #2
0
    public static bool smethod_0(int int_0, int int_1, string string_0, out DateTimeOffset dateTimeOffset_0, out GClass800.GEnum9 genum9_0, string string_1 = "basic")
    {
        genum9_0         = GClass800.GEnum9.Unknown;
        dateTimeOffset_0 = DateTimeOffset.MaxValue;
        bool result3;

        try
        {
            bool   is64BitProcess      = Environment.Is64BitProcess;
            string text                = string.Format("{0}", DateTime.Now.Ticks);
            HttpResponseMessage result = GClass800.httpClient_0.PostAsync(string.Format("https://powerofdark.space/license/verify/{0}/", string_1), new FormUrlEncodedContent(new Dictionary <string, string>
            {
                {
                    "ServerId",
                    string.Format("{0}", int_0)
                },
                {
                    "UserId",
                    string.Format("{0}", int_1)
                },
                {
                    "x64",
                    is64BitProcess.ToString() ?? ""
                },
                {
                    "Token",
                    text
                },
                {
                    "Key",
                    string_0
                },
                {
                    "Extra",
                    "v2"
                }
            })).Result;
            IEnumerable <string> source;
            if (result.Headers.TryGetValues("X-Signature", out source) && result.IsSuccessStatusCode)
            {
                string result2 = result.Content.ReadAsStringAsync().Result;
                byte[] byte_   = GClass807.smethod_1(source.First <string>());
                Dictionary <string, string> dictionary = JsonConvert.DeserializeObject <Dictionary <string, string> >(result2);
                byte[] byte_2 = SHA1.Create().ComputeHash(Encoding.UTF8.GetBytes(result2));
                if (dictionary["Token"] != text)
                {
                    result3 = false;
                }
                else if (!GClass800.smethod_1(byte_2, byte_))
                {
                    result3 = false;
                }
                else
                {
                    genum9_0 = (GClass800.GEnum9) int.Parse(dictionary["LicenseState"]);
                    result3  = (genum9_0 == (GClass800.GEnum9) 1);
                }
            }
            else
            {
                result3 = false;
            }
        }
        catch
        {
            result3 = false;
        }
        return(result3);
    }