コード例 #1
0
 private void Form1_DragDrop(object sender, DragEventArgs e)
 {
     string[] paths = (string[])e.Data.GetData(DataFormats.FileDrop);
     foreach (string path in paths)
     {
         HashMap <string, Object> hx = new HashMap <string, object>();
         if (File.Exists(path))
         {
             try
             {
                 byte[]    file = File.ReadAllBytes(path);
                 ByteArray bax  = new ByteArray();
                 ByteArray bax2 = new ByteArray();
                 bax.Write(file, 0, file.Length);
                 int a1 = bax.ReadInt32(); //Read bytearry position
                 for (int i = 0; i < this.arx.Length; i++)
                 {
                     bax.ReadInt32();  // Read futures
                 }
                 bax.Position(a1);
                 int a2 = bax.ReadInt32();               //Read bytearray lenght
                 bax.readBytes3(bax2, a1, a2, true, 50); //Read from position to lenght
                 int    a3   = bax2.ReadInt32();         //Read key lenght
                 String data = Encoding.ASCII.GetString((bax2.readBytes4(0, a3)));
                 Dictionary <string, object> a23 = bax2.readObject(0);
                 a23.Add("20", this.arx);
                 hx.Addall(a23);
                 PlainTexter pk = new PlainTexter(Encoding.ASCII.GetBytes("o680664zxcxzc2kbM7c5"));
                 hwKey.Text      = pk.Deside(data, "pweditorheX#822443");
                 versionBox.Text = hx["0"].ToString();
                 username.Text   = hx["2"].ToString();
                 password        = "******" + username.Text.Trim().Replace(" ", string.Empty);
                 textBox1.Text   = password;
                 box_0.Checked   = true;
                 box_2.Checked   = true;
                 box_1.Checked   = true;
             }
             catch {
                 box_0.Checked   = true;
                 box_2.Checked   = true;
                 box_1.Checked   = true;
                 versionBox.Text = hwKey.Text = username.Text = textBox1.Text = "";
             }
         }
     }
 }
コード例 #2
0
        /*
         * bax.writeInt(0); //hasFileEncription 0
         * bax.writeInt(1); //Enable Admin 1
         * bax.writeInt(1); //Enable ElementEditor 2
         * bax.writeInt(1); //Enable Task 3
         * bax.writeInt(1); //Enable Gshop 4
         * bax.writeInt(1); //Enable Npc 5
         * bax.writeInt(1); //Enable Ai 6
         * bax.writeInt(1); //Enable pck 7
         * bax.writeInt(1); //Enable Domain 8
         */

        private void Form1_Shown(object sender, EventArgs e)
        {
            isUpdate = true;
            string path = Path.GetDirectoryName(Application.ExecutablePath) + "/lic_pre.bin";
            HashMap <string, Object> hx = new HashMap <string, object>();

            if (File.Exists(path))
            {
                byte[]    file = File.ReadAllBytes(path);
                ByteArray bax  = new ByteArray();
                ByteArray bax2 = new ByteArray();
                bax.Write(file, 0, file.Length);
                int a1 = bax.ReadInt32(); //Read bytearry position
                for (int i = 0; i < this.arx.Length; i++)
                {
                    bax.ReadInt32();  // Read futures
                }
                bax.Position(a1);
                int a2 = bax.ReadInt32();               //Read bytearray lenght
                bax.readBytes3(bax2, a1, a2, true, 50); //Read from position to lenght
                int    a3   = bax2.ReadInt32();         //Read key lenght
                String data = Encoding.ASCII.GetString((bax2.readBytes4(0, a3)));
                Dictionary <string, object> a23 = bax2.readObject(0);
                a23.Add("20", this.arx);
                hx.Addall(a23);
                PlainTexter pk = new PlainTexter(Encoding.ASCII.GetBytes("o680664zxcxzc2kbM7c5"));
                hwKey.Text      = pk.Deside(data, "pweditorheX#822443");
                versionBox.Text = hx["0"].ToString();
                username.Text   = hx["2"].ToString();
                password        = "******" + username.Text.Trim().Replace(" ", string.Empty);
                textBox1.Text   = password;
                box_0.Checked   = true;
                box_2.Checked   = true;
                box_1.Checked   = true;
            }
            init();
            isUpdate = false;
        }