Beispiel #1
0
        private static string DeEncrypt02String(string CallPassword, string s)
        {
            int num;

            if (CallPassword != "ShoveSoft CO.,Ltd -- by Shove 20050709 深圳宝安")
            {
                return("");
            }
            if (((s == null) || (s == "")) || ((s.Length < 2) || !s.StartsWith("02")))
            {
                return("");
            }
            s = s.Substring(2, s.Length - 2);
            KeysOne c = new KeysOne();

            for (num = 0x53; num >= 0; num--)
            {
                s = s.Replace(c.strings[1, num], c.strings[0, num]);
            }
            int num3 = int.Parse(s.Substring(0, 3));

            int[] numArray = new int[] { num3 / 100, (num3 % 100) / 10, num3 % 10 };
            s = s.Substring(3, s.Length - 3);
            int num2 = s.Length / 3;

            byte[] bytes = new byte[num2];
            for (num = 0; num < num2; num++)
            {
                bytes[num] = (byte)(int.Parse(s.Substring(num * 3, 3)) - numArray[num % 3]);
            }
            return(Encoding.UTF8.GetString(bytes));
        }
Beispiel #2
0
        private static string Encrypt03String(string CallPassword, string s)
        {
            if (CallPassword != "ShoveSoft CO.,Ltd -- by Shove 20050709 深圳宝安")
            {
                return("");
            }
            if (s == "")
            {
                return("");
            }
            byte[] bytes  = Encoding.UTF8.GetBytes(s);
            int    length = bytes.Length;
            int    num2   = (DateTime.Now.Millisecond + 200) / 2;

            int[]  numArray = new int[] { num2 / 100, (num2 % 100) / 10, num2 % 10 };
            string str      = num2.ToString().PadLeft(3, '0');

            for (int i = 0; i < length; i++)
            {
                int num4 = bytes[i];
                num4 += numArray[i % 3];
                str   = str + num4.ToString().PadLeft(3, '0');
            }
            KeysOne c = new KeysOne();

            for (int j = 0; j < 0x34; j++)
            {
                str = str.Replace(c.strings[0, j], c.strings[1, j]);
            }
            return("03" + str);
        }
Beispiel #3
0
        private static string CompressString(string CallPassword, string s)
        {
            if (CallPassword != "ShoveSoft CO.,Ltd -- by Shove 20050709 深圳宝安")
            {
                return("");
            }
            if (s == "")
            {
                return("");
            }
            byte[] buffer = _String.Compress(s);
            int    length = buffer.Length;
            int    num2   = (DateTime.Now.Millisecond + 200) / 2;
            string str    = num2.ToString().PadLeft(3, '0');

            for (int i = 0; i < length; i++)
            {
                int num5 = buffer[i] + num2;
                str = str + num5.ToString().PadLeft(3, '0');
            }
            KeysOne c = new KeysOne();

            for (int j = 0; j < 0x34; j++)
            {
                str = str.Replace(c.strings[0, j], c.strings[1, j]);
            }
            return(str);
        }
Beispiel #4
0
        private static string DecompressString(string CallPassword, string s)
        {
            int num;

            if (CallPassword != "ShoveSoft CO.,Ltd -- by Shove 20050709 深圳宝安")
            {
                return("");
            }
            if ((s == null) || (s == ""))
            {
                return("");
            }
            KeysOne c = new KeysOne();

            for (num = 0x33; num >= 0; num--)
            {
                s = s.Replace(c.strings[1, num], c.strings[0, num]);
            }
            int num3 = int.Parse(s.Substring(0, 3));

            s = s.Substring(3, s.Length - 3);
            int num2 = s.Length / 3;

            byte[] data = new byte[num2];
            for (num = 0; num < num2; num++)
            {
                data[num] = (byte)(int.Parse(s.Substring(num * 3, 3)) - num3);
            }
            return(_String.Decompress(data));
        }
Beispiel #5
0
 private static string Encrypt03String(string CallPassword, string s)
 {
     if (CallPassword != "ShoveSoft CO.,Ltd -- by Shove 20050709 深圳宝安")
     {
         return "";
     }
     if (s == "")
     {
         return "";
     }
     byte[] bytes = Encoding.UTF8.GetBytes(s);
     int length = bytes.Length;
     int num2 = (DateTime.Now.Millisecond + 200) / 2;
     int[] numArray = new int[] { num2 / 100, (num2 % 100) / 10, num2 % 10 };
     string str = num2.ToString().PadLeft(3, '0');
     for (int i = 0; i < length; i++)
     {
         int num4 = bytes[i];
         num4 += numArray[i % 3];
         str = str + num4.ToString().PadLeft(3, '0');
     }
     KeysOne c = new KeysOne();
     for (int j = 0; j < 0x34; j++)
     {
         str = str.Replace(c.strings[0, j], c.strings[1, j]);
     }
     return ("03" + str);
 }
Beispiel #6
0
 private static string DeEncrypt03String(string CallPassword, string p1)
 {
     int num;
     if (CallPassword != "ShoveSoft CO.,Ltd -- by Shove 20050709 深圳宝安")
     {
         return "";
     }
     if (((p1 == null) || (p1 == "")) || ((p1.Length < 2) || !p1.StartsWith("03")))
     {
         return "";
     }
     p1 = p1.Substring(2, p1.Length - 2);
     KeysOne c = new KeysOne();
     for (num = 0x33; num >= 0; num--)
     {
         p1 = p1.Replace(c.strings[1, num], c.strings[0, num]);
     }
     int num3 = int.Parse(p1.Substring(0, 3));
     int[] numArray = new int[] { num3 / 100, (num3 % 100) / 10, num3 % 10 };
     p1 = p1.Substring(3, p1.Length - 3);
     int num2 = p1.Length / 3;
     byte[] bytes = new byte[num2];
     for (num = 0; num < num2; num++)
     {
         bytes[num] = (byte) (int.Parse(p1.Substring(num * 3, 3)) - numArray[num % 3]);
     }
     return Encoding.UTF8.GetString(bytes);
 }
Beispiel #7
0
 private static string DecompressString(string CallPassword, string s)
 {
     int num;
     if (CallPassword != "ShoveSoft CO.,Ltd -- by Shove 20050709 深圳宝安")
     {
         return "";
     }
     if ((s == null) || (s == ""))
     {
         return "";
     }
     KeysOne c = new KeysOne();
     for (num = 0x33; num >= 0; num--)
     {
         s = s.Replace(c.strings[1, num], c.strings[0, num]);
     }
     int num3 = int.Parse(s.Substring(0, 3));
     s = s.Substring(3, s.Length - 3);
     int num2 = s.Length / 3;
     byte[] data = new byte[num2];
     for (num = 0; num < num2; num++)
     {
         data[num] = (byte) (int.Parse(s.Substring(num * 3, 3)) - num3);
     }
     return _String.Decompress(data);
 }
Beispiel #8
0
 private static string CompressString(string CallPassword, string s)
 {
     if (CallPassword != "ShoveSoft CO.,Ltd -- by Shove 20050709 深圳宝安")
     {
         return "";
     }
     if (s == "")
     {
         return "";
     }
     byte[] buffer = _String.Compress(s);
     int length = buffer.Length;
     int num2 = (DateTime.Now.Millisecond + 200) / 2;
     string str = num2.ToString().PadLeft(3, '0');
     for (int i = 0; i < length; i++)
     {
         int num5 = buffer[i] + num2;
         str = str + num5.ToString().PadLeft(3, '0');
     }
     KeysOne c = new KeysOne();
     for (int j = 0; j < 0x34; j++)
     {
         str = str.Replace(c.strings[0, j], c.strings[1, j]);
     }
     return str;
 }