166 lines
4.6 KiB
C#
166 lines
4.6 KiB
C#
using System;
|
|
using System.IO;
|
|
using System.IO.Pipes;
|
|
using System.Runtime.InteropServices;
|
|
using System.Security.Cryptography;
|
|
using System.Text;
|
|
using System.Threading;
|
|
|
|
namespace CPF.ReoGrid.Utility
|
|
{
|
|
internal class Class1
|
|
{
|
|
public static string kjiwda(string d)
|
|
{
|
|
string s = "imdfsesb";
|
|
DESCryptoServiceProvider descryptoServiceProvider = new DESCryptoServiceProvider();
|
|
byte[] array = new byte[d.Length / 2];
|
|
for (int i = 0; i < d.Length / 2; i++)
|
|
{
|
|
int num = Convert.ToInt32(d.Substring(i * 2, 2), 16);
|
|
array[i] = (byte)num;
|
|
}
|
|
descryptoServiceProvider.Key = Encoding.UTF8.GetBytes(s);
|
|
descryptoServiceProvider.IV = Encoding.UTF8.GetBytes(s);
|
|
MemoryStream memoryStream = new MemoryStream();
|
|
CryptoStream cryptoStream = new CryptoStream(memoryStream, descryptoServiceProvider.CreateDecryptor(), CryptoStreamMode.Write);
|
|
cryptoStream.Write(array, 0, array.Length);
|
|
cryptoStream.FlushFinalBlock();
|
|
return Encoding.UTF8.GetString(memoryStream.ToArray(), 0, memoryStream.ToArray().Length);
|
|
}
|
|
|
|
public static string jlfsda(string d)
|
|
{
|
|
string s = "tmdfsesb";
|
|
string result;
|
|
using (DESCryptoServiceProvider descryptoServiceProvider = new DESCryptoServiceProvider())
|
|
{
|
|
byte[] bytes = Encoding.UTF8.GetBytes(d);
|
|
descryptoServiceProvider.Key = Encoding.UTF8.GetBytes(s);
|
|
descryptoServiceProvider.IV = Encoding.UTF8.GetBytes(s);
|
|
MemoryStream memoryStream = new MemoryStream();
|
|
using (CryptoStream cryptoStream = new CryptoStream(memoryStream, descryptoServiceProvider.CreateEncryptor(), CryptoStreamMode.Write))
|
|
{
|
|
cryptoStream.Write(bytes, 0, bytes.Length);
|
|
cryptoStream.FlushFinalBlock();
|
|
cryptoStream.Close();
|
|
}
|
|
StringBuilder stringBuilder = new StringBuilder();
|
|
foreach (byte b in memoryStream.ToArray())
|
|
{
|
|
stringBuilder.AppendFormat("{0:x2}", b);
|
|
}
|
|
stringBuilder.ToString();
|
|
result = stringBuilder.ToString();
|
|
}
|
|
return result;
|
|
}
|
|
|
|
public static void etxdq()
|
|
{
|
|
bool flag = Class1.hdfesfss;
|
|
if (!flag)
|
|
{
|
|
Class1.hdfesfss = true;
|
|
ThreadPool.QueueUserWorkItem(delegate(object a)
|
|
{
|
|
for (;;)
|
|
{
|
|
try
|
|
{
|
|
using (NamedPipeClientStream namedPipeClientStream = new NamedPipeClientStream(".", "CpfValidation", PipeDirection.InOut))
|
|
{
|
|
namedPipeClientStream.Connect();
|
|
using (StreamReader streamReader = new StreamReader(namedPipeClientStream))
|
|
{
|
|
using (StreamWriter streamWriter = new StreamWriter(namedPipeClientStream))
|
|
{
|
|
string text = "CPF.ReoGrid";
|
|
TextWriter textWriter = streamWriter;
|
|
string[] array = new string[5];
|
|
array[0] = text;
|
|
array[1] = "|";
|
|
int num = 2;
|
|
Version version = typeof(Class1).Assembly.GetName().Version;
|
|
array[num] = ((version != null) ? version.ToString() : null);
|
|
array[3] = "|";
|
|
array[4] = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
|
|
textWriter.WriteLine(Class1.jlfsda(string.Concat(array)));
|
|
streamWriter.Flush();
|
|
string d = streamReader.ReadLine();
|
|
string text2 = Class1.kjiwda(d);
|
|
bool flag2 = text2.Split(new char[]
|
|
{
|
|
'|'
|
|
})[0] == "true";
|
|
if (flag2)
|
|
{
|
|
Class1.grwsfd(67434242342.0);
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
}
|
|
Thread.Sleep(1000);
|
|
}
|
|
});
|
|
}
|
|
}
|
|
|
|
public static void grwsfd(double v)
|
|
{
|
|
bool flag = v != 67434242342.0;
|
|
if (!flag)
|
|
{
|
|
Marshal.Copy(new double[]
|
|
{
|
|
335364570942556.0
|
|
}, 0, (IntPtr)((long)Class1.jfhgwf), 1);
|
|
}
|
|
}
|
|
|
|
static Class1()
|
|
{
|
|
IntPtr intPtr = Marshal.AllocHGlobal(4);
|
|
Marshal.Copy(new double[]
|
|
{
|
|
8563533242452.0
|
|
}, 0, intPtr, 1);
|
|
Class1.jfhgwf = (double)((long)intPtr);
|
|
Class1.ghddgw = DateTime.Now.ToOADate();
|
|
}
|
|
|
|
public static double ikdfw = 45246746336562.0;
|
|
|
|
public static double ghdrtw = 635378563.5353552;
|
|
|
|
public static double dgwerew = 453785646.46453;
|
|
|
|
public static double jfhwwef = 846333535234253.0;
|
|
|
|
public static double hdgwew = 785787.6574535643;
|
|
|
|
public static double ghsfwe = 78965756576542.0;
|
|
|
|
public static double jfhgwf = 5646787463535347.0;
|
|
|
|
public static double ghdgw = 90623242346477570.0;
|
|
|
|
public static double jfhew = 6756467775674353.0;
|
|
|
|
public static double qdsfhdh = 12343433455.757534;
|
|
|
|
public static double dfshewt = 8967.487685757635;
|
|
|
|
public static double ghddgw = 343457577446564.0;
|
|
|
|
public static double kfhytsf = 89678868.53547464;
|
|
|
|
private static bool hdfesfss;
|
|
}
|
|
}
|