Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9fbe6408ab | ||
|
|
c8ea806360 | ||
|
|
a8b0f9877c | ||
|
|
d82f94f95d | ||
|
|
a40fb84783 | ||
|
|
c9cbf696e4 | ||
|
|
cc86913b72 | ||
|
|
ba02250f61 | ||
|
|
451de6ca55 | ||
|
|
691fb360bb | ||
|
|
686e3987f8 | ||
|
|
79871c3bcb | ||
|
|
c1b19b4929 | ||
|
|
c564ea10eb | ||
|
|
d5006da378 | ||
|
|
878e9dbd32 | ||
|
|
bd7f9e76b8 | ||
|
|
fc285cf583 | ||
|
|
3ab0ae46c0 | ||
|
|
4550ff1621 | ||
|
|
1663bd4277 | ||
|
|
679afdef1b | ||
|
|
d38588d45c | ||
|
|
42b11ce241 | ||
|
|
c01512bcf6 | ||
|
|
dd89595629 | ||
|
|
94b5539823 | ||
|
|
317baff79c | ||
|
|
f702c3ae62 | ||
|
|
177216a51e | ||
|
|
46b1c01107 | ||
|
|
798355e342 | ||
|
|
ee741d3138 | ||
|
|
e31b668beb | ||
|
|
c00955205c | ||
|
|
5345926c8b | ||
|
|
0987f58fee | ||
|
|
715737bce2 | ||
|
|
44245aa2b7 | ||
|
|
97e6b92ef6 | ||
|
|
445f130272 | ||
|
|
39fcc4d9a8 | ||
|
|
b4a755a647 | ||
|
|
083189c264 | ||
|
|
676c628b6f | ||
|
|
43ca455e70 | ||
|
|
95e834a188 | ||
|
|
e9d822bb0c | ||
|
|
f395383db8 | ||
|
|
f805911f4e | ||
|
|
b3d203fbda | ||
|
|
bb022f45fd | ||
|
|
e4a97463f4 |
@@ -1,13 +0,0 @@
|
||||
### 该问题是怎么引起的?
|
||||
|
||||
|
||||
|
||||
### 重现步骤
|
||||
|
||||
|
||||
|
||||
### 报错信息
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
### 相关的Issue
|
||||
|
||||
|
||||
### 原因(目的、解决的问题等)
|
||||
|
||||
|
||||
### 描述(做了什么,变更了什么)
|
||||
|
||||
|
||||
### 测试用例(新增、改动、可能影响的功能)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
[submodule "references/Titanium-Web-Proxy"]
|
||||
path = references/Titanium-Web-Proxy
|
||||
url = https://github.com/rmbadmin/Titanium-Web-Proxy.git
|
||||
[submodule "references/MetroRadiance"]
|
||||
path = references/MetroRadiance
|
||||
url = https://github.com/rmbadmin/MetroRadiance.git
|
||||
@@ -1,155 +0,0 @@
|
||||
[
|
||||
{
|
||||
"Index": 1,
|
||||
"Name": "*瑞",
|
||||
"Amount": 5,
|
||||
"OrderNumber": "",
|
||||
"PayType": 1,
|
||||
"Remark": "请大佬喝瓶饮料",
|
||||
"PayTime": "2020-12-17 19:41:57"
|
||||
},
|
||||
{
|
||||
"Index": 2,
|
||||
"Name": "**耀",
|
||||
"Amount": 5,
|
||||
"OrderNumber": "",
|
||||
"PayType": 1,
|
||||
"Remark": "小小支持一波!",
|
||||
"PayTime": "2020-12-17 20:46:01"
|
||||
},
|
||||
{
|
||||
"Index": 3,
|
||||
"Name": "**皓",
|
||||
"Amount": 1,
|
||||
"OrderNumber": "",
|
||||
"PayType": 1,
|
||||
"Remark": "2077掏空了我,等挂卡出来。在。。em",
|
||||
"PayTime": "2020-12-17 22:41:27"
|
||||
},
|
||||
{
|
||||
"Index": 4,
|
||||
"Name": "**宇",
|
||||
"Amount": 1,
|
||||
"OrderNumber": "",
|
||||
"PayType": 1,
|
||||
"Remark": "",
|
||||
"PayTime": "2020-12-18 08:39:42"
|
||||
},
|
||||
{
|
||||
"Index": 5,
|
||||
"Name": "*钊",
|
||||
"Amount": 20,
|
||||
"OrderNumber": "",
|
||||
"PayType": 1,
|
||||
"Remark": "其乐坛友bzll6538一点心意",
|
||||
"PayTime": "2020-12-19 17:10:44"
|
||||
},
|
||||
{
|
||||
"Index": 6,
|
||||
"Name": "R*n",
|
||||
"Amount": 20,
|
||||
"OrderNumber": "",
|
||||
"PayType": 2,
|
||||
"Remark": "绿豆",
|
||||
"PayTime": "2020-12-17 14:32:00"
|
||||
},
|
||||
{
|
||||
"Index": 7,
|
||||
"Name": "*炜",
|
||||
"Amount": 100,
|
||||
"OrderNumber": "",
|
||||
"PayType": 1,
|
||||
"Remark": "其乐坛友Davyheaven",
|
||||
"PayTime": "2020-12-20 12:02:17"
|
||||
},
|
||||
{
|
||||
"Index": 8,
|
||||
"Name": "**智",
|
||||
"Amount": 20,
|
||||
"OrderNumber": "",
|
||||
"PayType": 1,
|
||||
"Remark": "派大星",
|
||||
"PayTime": "2020-12-20 12:21:04"
|
||||
},
|
||||
{
|
||||
"Index": 9,
|
||||
"Name": "*森",
|
||||
"Amount": 66,
|
||||
"OrderNumber": "",
|
||||
"PayType": 1,
|
||||
"Remark": "区区心意,不成敬意(三个六给不起)",
|
||||
"PayTime": "2020-12-21 23:03:26"
|
||||
},
|
||||
{
|
||||
"Index": 10,
|
||||
"Name": "*珂",
|
||||
"Amount": 50,
|
||||
"OrderNumber": "",
|
||||
"PayType": 1,
|
||||
"Remark": "其乐YK93,支持大佬",
|
||||
"PayTime": "2020-12-21 23:18:09"
|
||||
},
|
||||
{
|
||||
"Index": 11,
|
||||
"Name": "**丰",
|
||||
"Amount": 1,
|
||||
"OrderNumber": "",
|
||||
"PayType": 1,
|
||||
"Remark": "",
|
||||
"PayTime": "2020-12-22 12:33:46"
|
||||
},
|
||||
{
|
||||
"Index": 12,
|
||||
"Name": "Ruby",
|
||||
"Amount": 77,
|
||||
"OrderNumber": "",
|
||||
"PayType": 2,
|
||||
"Remark": "资瓷一下",
|
||||
"PayTime": "2020-12-24 19:40:25"
|
||||
},
|
||||
{
|
||||
"Index": 13,
|
||||
"Name": "**桐",
|
||||
"Amount": 1,
|
||||
"OrderNumber": "",
|
||||
"PayType": 1,
|
||||
"Remark": "",
|
||||
"PayTime": "2020-12-26 09:32:57"
|
||||
},
|
||||
{
|
||||
"Index": 14,
|
||||
"Name": "**珂",
|
||||
"Amount": 5,
|
||||
"OrderNumber": "",
|
||||
"PayType": 1,
|
||||
"Remark": "其乐坛友wjkhj123,小小支持一波",
|
||||
"PayTime": "2020-12-26 13:28:07"
|
||||
},
|
||||
{
|
||||
"Index": 15,
|
||||
"Name": "z.w",
|
||||
"Amount": 10,
|
||||
"OrderNumber": "",
|
||||
"PayType": 2,
|
||||
"Remark": "滋瓷一下",
|
||||
"PayTime": "2020-12-26 15:34:50"
|
||||
},
|
||||
{
|
||||
"Index": 16,
|
||||
"Name": "**林",
|
||||
"Amount": 6,
|
||||
"OrderNumber": "",
|
||||
"PayType": 2,
|
||||
"Remark": "一丶心意,大佬加油!",
|
||||
"PayTime": "2020-12-26 18:25:06"
|
||||
},
|
||||
{
|
||||
"Index": 17,
|
||||
"Name": "**立",
|
||||
"Amount": 1,
|
||||
"OrderNumber": "",
|
||||
"PayType": 2,
|
||||
"Remark": "",
|
||||
"PayTime": "2020-12-26 18:56:57"
|
||||
}
|
||||
]
|
||||
@@ -1,78 +1,98 @@
|
||||
# Steam++ SteamTools
|
||||
<img src="https://raw.githubusercontent.com/rmbadmin/SteamTools/develop/resources/icon/LOGO1.png" alt="logo" width="130" height="130" align="left" />
|
||||
|
||||
<h1>Steam++ Tools</h1>
|
||||
|
||||
「Steam++」是一个包含多种Steam工具功能的工具箱。
|
||||
> 「Steam++」is a toolkit that contains a variety of Steam tools, most of which require you to download and install Steam in order to use them.
|
||||
<br/>
|
||||
|
||||
此工具的大部分功能都是需要您下载安装Steam才能使用。
|
||||

|
||||
[](https://github.com/rmbadmin/SteamTools/releases/latest)
|
||||
[](LICENSE)
|
||||
[](https://github.com/rmbadmin/SteamTools/stargazers)
|
||||
[](https://github.com/rmbadmin/SteamTools/network/members)
|
||||

|
||||
|
||||
# Steam++
|
||||
|
||||
[English](https://github.com/rmbadmin/SteamTools/blob/develop/README.en.md)
|
||||
|
||||
[简体中文](https://github.com/rmbadmin/SteamTools/blob/develop/README.md)
|
||||
|
||||
## Samples
|
||||
-------
|
||||

|
||||

|
||||

|
||||

|
||||
------
|
||||
|
||||
## 核心功能
|
||||
|
||||
### 1. 反代Steam的社区网页使其能正常访问
|
||||
|
||||
功能类似羽翼城大佬的Steam302,使用[Titanium-Web-Proxy](https://github.com/justcoding121/Titanium-Web-Proxy)开源项目进行本地反代,相比302工具具有更快的启动速度,以及支持简单的脚本注入。
|
||||
## Core Functions
|
||||
|
||||
### 1. Local reverse proxy for Steam's community webpage to enable normal access in mainland China
|
||||

|
||||
---
|
||||
### 2. 快速切换当前PC已经记住登陆的Steam账号
|
||||
### 2. Quickly switch the Steam account that the current PC has remembered to log into
|
||||
|
||||
该功能是读取Steam路径下存储的本地用户登录记录直接展示操作,可以多账号切换无需重新输入密码和令牌。
|
||||
This feature is to read the local user login records stored under the Steam path to directly display the operation, you can switch between multiple accounts without re-entering passwords and tokens.
|
||||
|
||||

|
||||
---
|
||||
### 3. Steam游戏的成就统计管理功能
|
||||
功能参考[SteamAchievementManager](https://github.com/gibbed/SteamAchievementManager)进行二次开发,修改了游戏列表的加载和操作易用性。
|
||||
### 3. Achievement stat modifications for Steam games
|
||||
Function reference [SteamAchievementManager](https://github.com/gibbed/SteamAchievementManager) for secondary development, modified the game list loading and operation ease of use.
|
||||

|
||||
---
|
||||
|
||||
### 4. Steam Local Two-Step Authenticator
|
||||
The function reference [WinAuth](https://github.com/winauth/winauth) is developed to enable you to view your token without launching the mobile version of Steam App, similar function software are [WinAuth](https://github.com/winauth/winauth), [SteamDesktopAuthenticator](https://github.com/Jessecar96/SteamDesktopAuthenticator).
|
||||
! [](https://raw.githubusercontent.com/rmbadmin/SteamTools/develop/resources/4.png)
|
||||
|
||||
---
|
||||
|
||||
### 4. Steam本地两步身份验证器
|
||||
功能参考[WinAuth](https://github.com/winauth/winauth)开发,可以使您不用启动移动版Steam App也能查看您的令牌,功能类似的软件有[WinAuth](https://github.com/winauth/winauth)、[SteamDesktopAuthenticator](https://github.com/Jessecar96/SteamDesktopAuthenticator)。
|
||||
### 5. Some game tools
|
||||
Currently there is a forced game borderless windowing, CSGO fix VAC shield.
|
||||
This piece is randomly do some of my often used or idle tinkering with the function.
|
||||

|
||||

|
||||
---
|
||||
|
||||
## Features expected to be added subsequently
|
||||
|
||||
### Steam Idle Card
|
||||
The goal is to enable direct access to badge card information and start hanging cards without logging into your Steam account within the software.
|
||||
|
||||
### Plug-in form to load and run ASF
|
||||
Support ASF as a plug-in to run within the tool and enhance the use of ASF in Windows Desktop environment.
|
||||
|
||||
### Steam Custom Cover Management
|
||||
Enhanced management of Steam custom covers and quick matching of downloaded app covers from [SteamGridDB](https://www.steamgriddb.com/).
|
||||
|
||||
### More other game platform features
|
||||
|
||||
|
||||
### More non-cheat game features
|
||||
|
||||
---
|
||||
|
||||
### 5. 一些游戏工具
|
||||
目前已有强制游戏无边框窗口化,CSGO修复VAC屏蔽。
|
||||
这一块是随缘做一些我经常用或者闲着没事捣鼓的功能。
|
||||
|
||||
---
|
||||
|
||||
## 预计后续添加的功能
|
||||
|
||||
### Steam自动挂卡
|
||||
尝试用社区反代功能结合成就解锁功能来重新实现,目的是实现在软件内登录Steam即可直接获取徽章卡片信息并开始挂卡。
|
||||
|
||||
### Steam皮肤设计器
|
||||
挖坑画大饼,可视化编辑Steam皮肤,而且如果软件能上架Steam的话打算支持创意工坊分享设计的Steam皮肤,短期内肯定做不完。
|
||||
|
||||
### 插件形式加载运行ASF
|
||||
以插件形式支持ASF在工具内运行并增强ASF在Windows Desktop环境下的使用。
|
||||
|
||||
### Steam自定义封面管理
|
||||
增强Steam自定义封面的管理以及从[SteamGridDB](https://www.steamgriddb.com/)快速匹配下载应用封面。
|
||||
|
||||
### 更多其它游戏平台功能
|
||||
|
||||
|
||||
### 更多非作弊游戏功能
|
||||
|
||||
---
|
||||
|
||||
## 运行环境
|
||||
> 程序使用C# WPF在 .NET Framework4.7.2环境下开发,如果无法运行请下载安装[.NET Framework 4.7.2](https://dotnet.microsoft.com/download/dotnet-framework/net472)。
|
||||
## Operating Environment
|
||||
> The program was developed using C# WPF in .,If it does not work please download and install[.NET Framework 4.7.2](https://dotnet.microsoft.com/download/dotnet-framework/net472)。
|
||||
> The missing assembly is my own modified project
|
||||
* [Titanium-Web-Proxy](https://github.com/rmbadmin/Titanium-Web-Proxy)
|
||||
* [MetroRadiance](https://github.com/rmbadmin/MetroRadiance)
|
||||
|
||||
---
|
||||
|
||||
## License
|
||||
> [GPL-3.0 License](LICENSE.txt)
|
||||
> 根据GPLv3许可发布的开源/免费软件。
|
||||
> [GPL-3.0 License](https://github.com/rmbadmin/SteamTools/blob/develop/LICENSE)
|
||||
> Open source/free software released under the GPLv3 license.
|
||||
|
||||
---
|
||||
|
||||
## 感谢以下开源项目
|
||||
## Thanks to the following open source projects
|
||||
* [Newtonsoft.Json](https://github.com/JamesNK/Newtonsoft.Json)
|
||||
* [MetroRadiance](https://github.com/Grabacr07/MetroRadiance)
|
||||
* [MetroTrilithon](https://github.com/Grabacr07/MetroTrilithon)
|
||||
* [Livet](https://github.com/runceel/Livet)
|
||||
* [StatefulModel](https://github.com/Grabacr07/MetroTrilithonhttps://github.com/ugaya40/StatefulModel)
|
||||
* [StatefulModel](https://github.com/ugaya40/StatefulModel)
|
||||
* [Hardcodet.NotifyIcon](https://github.com/HavenDV/Hardcodet.NotifyIcon.Wpf.NetCore)
|
||||
* [System.Reactive](https://github.com/dotnet/reactive)
|
||||
* [Titanium-Web-Proxy](https://github.com/justcoding121/Titanium-Web-Proxy)
|
||||
@@ -82,4 +102,6 @@
|
||||
* [SteamAchievementManager](https://github.com/gibbed/SteamAchievementManager)
|
||||
* [ArchiSteamFarm](https://github.com/JustArchiNET/ArchiSteamFarm)
|
||||
* [WinAuth](https://github.com/winauth/winauth)
|
||||
* [SteamDesktopAuthenticator](https://github.com/Jessecar96/SteamDesktopAuthenticator)
|
||||
* [SteamDesktopAuthenticator](https://github.com/Jessecar96/SteamDesktopAuthenticator)
|
||||
* [Gameloop.Vdf](https://github.com/shravan2x/Gameloop.Vdf)
|
||||
* [Costura.Fody](https://github.com/Fody/Costura)
|
||||
@@ -1,37 +1,61 @@
|
||||
# Steam++工具箱
|
||||
<img src="https://raw.githubusercontent.com/rmbadmin/SteamTools/develop/resources/icon/LOGO1.png" alt="logo" width="130" height="130" align="left" />
|
||||
|
||||
「Steam++」是一个包含多种Steam工具功能的工具箱。
|
||||
<h1>Steam++ 工具箱</h1>
|
||||
|
||||
此工具的大部分功能都是需要您下载安装Steam才能使用。
|
||||
> 「Steam++」是一个包含多种Steam工具功能的工具箱,
|
||||
> 此工具的大部分功能都是需要您下载安装Steam才能使用。
|
||||
<br/>
|
||||
|
||||

|
||||
[](https://github.com/rmbadmin/SteamTools/releases/latest)
|
||||
[](LICENSE)
|
||||
[](https://github.com/rmbadmin/SteamTools/stargazers)
|
||||
[](https://github.com/rmbadmin/SteamTools/network/members)
|
||||

|
||||
|
||||
# Steam++
|
||||
|
||||
[English](https://github.com/rmbadmin/SteamTools/blob/develop/README.en.md)
|
||||
|
||||
[简体中文](https://github.com/rmbadmin/SteamTools/blob/develop/README.md)
|
||||
|
||||
|
||||
## 效果展示
|
||||
-------
|
||||

|
||||

|
||||

|
||||

|
||||
------
|
||||
|
||||
## 核心功能
|
||||
|
||||
### 1. 反代Steam的社区网页使其能正常访问
|
||||
|
||||
功能类似羽翼城大佬的Steam302,使用[Titanium-Web-Proxy](https://github.com/justcoding121/Titanium-Web-Proxy)开源项目进行本地反代,相比302工具具有更快的启动速度,以及支持简单的脚本注入。
|
||||
|
||||
功能类似羽翼城大佬的[steamcommunity_302](https://www.dogfight360.com/blog/686/),使用[Titanium-Web-Proxy](https://github.com/justcoding121/Titanium-Web-Proxy)开源项目进行本地反代,使国内用户可以正常访问steam社区页,相比302工具具有更快的启动速度,以及支持简单的脚本注入。(还顺便支持了Pixiv、Discord、Twitch等网站的反代支持)
|
||||

|
||||
---
|
||||
### 2. 快速切换当前PC已经记住登陆的Steam账号
|
||||
|
||||
该功能是读取Steam路径下存储的本地用户登录记录直接展示操作,可以多账号切换无需重新输入密码和令牌。
|
||||
|
||||

|
||||
---
|
||||
### 3. Steam游戏的成就统计管理功能
|
||||
功能参考[SteamAchievementManager](https://github.com/gibbed/SteamAchievementManager)进行二次开发,修改了游戏列表的加载和操作易用性。
|
||||
|
||||

|
||||
---
|
||||
|
||||
### 4. Steam本地两步身份验证器
|
||||
功能参考[WinAuth](https://github.com/winauth/winauth)开发,可以使您不用启动移动版Steam App也能查看您的令牌,功能类似的软件有[WinAuth](https://github.com/winauth/winauth)、[SteamDesktopAuthenticator](https://github.com/Jessecar96/SteamDesktopAuthenticator)。
|
||||

|
||||
|
||||
本地令牌交易市场报价确认
|
||||

|
||||
---
|
||||
|
||||
### 5. 一些游戏工具
|
||||
目前已有强制游戏无边框窗口化,CSGO修复VAC屏蔽。
|
||||
这一块是随缘做一些我经常用或者闲着没事捣鼓的功能。
|
||||
|
||||

|
||||

|
||||
---
|
||||
|
||||
## 预计后续添加的功能
|
||||
@@ -55,16 +79,15 @@
|
||||
|
||||
---
|
||||
|
||||
## 运行环境
|
||||
> 程序使用C# WPF在 .NET Framework4.7.2环境下开发,如果无法运行请下载安装[.NET Framework 4.7.2](https://dotnet.microsoft.com/download/dotnet-framework/net472)。
|
||||
> 缺失的程序集为我自己修改后的项目
|
||||
* [Titanium-Web-Proxy](https://github.com/rmbadmin/Titanium-Web-Proxy)
|
||||
* [MetroRadiance](https://github.com/rmbadmin/MetroRadiance)
|
||||
|
||||
## 开发环境
|
||||
> 开发工具 [Visual Studio 2019](https://visualstudio.microsoft.com/)
|
||||
> 开发语言 C# WPF
|
||||
> .NET版本 .NET Framework4.7.2 和 .NET5
|
||||
> 如果无法运行请下载安装[.NET Framework 4.7.2](https://dotnet.microsoft.com/download/dotnet-framework/net472)或[.NET 5](https://dotnet.microsoft.com/download/dotnet/5.0)。
|
||||
---
|
||||
|
||||
## License
|
||||
> [GPL-3.0 License](LICENSE.txt)
|
||||
> [GPL-3.0 License](https://github.com/rmbadmin/SteamTools/blob/develop/LICENSE)
|
||||
> 根据GPLv3许可发布的开源/免费软件。
|
||||
|
||||
---
|
||||
@@ -74,7 +97,7 @@
|
||||
* [MetroRadiance](https://github.com/Grabacr07/MetroRadiance)
|
||||
* [MetroTrilithon](https://github.com/Grabacr07/MetroTrilithon)
|
||||
* [Livet](https://github.com/runceel/Livet)
|
||||
* [StatefulModel](https://github.com/Grabacr07/MetroTrilithonhttps://github.com/ugaya40/StatefulModel)
|
||||
* [StatefulModel](https://github.com/ugaya40/StatefulModel)
|
||||
* [Hardcodet.NotifyIcon](https://github.com/HavenDV/Hardcodet.NotifyIcon.Wpf.NetCore)
|
||||
* [System.Reactive](https://github.com/dotnet/reactive)
|
||||
* [Titanium-Web-Proxy](https://github.com/justcoding121/Titanium-Web-Proxy)
|
||||
|
||||
@@ -1,880 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2015 Colin Mackie.
|
||||
* This software is distributed under the terms of the GNU General Public License.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections.Specialized;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Net.Cache;
|
||||
using System.Security.Cryptography;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Web;
|
||||
using System.Xml;
|
||||
using System.Xml.Serialization;
|
||||
using System.Xml.XPath;
|
||||
|
||||
using Org.BouncyCastle.Crypto;
|
||||
using Org.BouncyCastle.Crypto.Engines;
|
||||
using Org.BouncyCastle.Crypto.Macs;
|
||||
using Org.BouncyCastle.Crypto.Parameters;
|
||||
using Org.BouncyCastle.Crypto.Paddings;
|
||||
using Org.BouncyCastle.Crypto.Digests;
|
||||
using Org.BouncyCastle.Crypto.Generators;
|
||||
|
||||
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
|
||||
#if NUNIT
|
||||
using NUnit.Framework;
|
||||
#endif
|
||||
|
||||
#if NETCF
|
||||
using OpenNETCF.Security.Cryptography;
|
||||
#endif
|
||||
|
||||
namespace WinAuth
|
||||
{
|
||||
/// <summary>
|
||||
/// Class that implements Steam's SteamGuadrd version of the RFC6238 Authenticator
|
||||
/// </summary>
|
||||
public class SteamAuthenticator : Authenticator
|
||||
{
|
||||
/// <summary>
|
||||
/// Number of characters in code
|
||||
/// </summary>
|
||||
private const int CODE_DIGITS = 5;
|
||||
|
||||
/// <summary>
|
||||
/// Number of minutes to ignore syncing if network error
|
||||
/// </summary>
|
||||
private const int SYNC_ERROR_MINUTES = 60;
|
||||
|
||||
/// <summary>
|
||||
/// Number of attempts to activate
|
||||
/// </summary>
|
||||
private const int ENROLL_ACTIVATE_RETRIES = 30;
|
||||
|
||||
/// <summary>
|
||||
/// Incorrect activation code
|
||||
/// </summary>
|
||||
private const int INVALID_ACTIVATION_CODE = 89;
|
||||
|
||||
/// <summary>
|
||||
/// Time for http request when calling Sync in ms
|
||||
/// </summary>
|
||||
private const int SYNC_TIMEOUT = 5000;
|
||||
|
||||
/// <summary>
|
||||
/// Steam issuer for KeyUri
|
||||
/// </summary>
|
||||
private const string STEAM_ISSUER = "Steam";
|
||||
|
||||
/// <summary>
|
||||
/// URLs for all mobile services
|
||||
/// </summary>
|
||||
private static string COMMUNITY_BASE = "https://steamcommunity.com";
|
||||
private static string WEBAPI_BASE = "https://api.steampowered.com";
|
||||
private static string SYNC_URL = "https://api.steampowered.com:443/ITwoFactorService/QueryTime/v0001";
|
||||
|
||||
/// <summary>
|
||||
/// Character set for authenticator code
|
||||
/// </summary>
|
||||
private static char[] STEAMCHARS = new char[] {
|
||||
'2', '3', '4', '5', '6', '7', '8', '9', 'B', 'C',
|
||||
'D', 'F', 'G', 'H', 'J', 'K', 'M', 'N', 'P', 'Q',
|
||||
'R', 'T', 'V', 'W', 'X', 'Y'};
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Enrolling state
|
||||
/// </summary>
|
||||
public class EnrollState
|
||||
{
|
||||
public string Username { get; set; }
|
||||
public string Password { get; set; }
|
||||
public string CaptchaId { get; set; }
|
||||
public string CaptchaUrl { get; set; }
|
||||
public string CaptchaText { get; set; }
|
||||
public string EmailDomain { get; set; }
|
||||
public string EmailAuthText { get; set; }
|
||||
public string ActivationCode { get; set; }
|
||||
public CookieContainer Cookies { get; set; }
|
||||
|
||||
public string SteamId { get; set; }
|
||||
public string OAuthToken { get; set; }
|
||||
|
||||
public bool RequiresLogin { get; set; }
|
||||
public bool RequiresCaptcha { get; set; }
|
||||
public bool Requires2FA { get; set; }
|
||||
public bool RequiresEmailAuth { get; set; }
|
||||
public bool RequiresActivation { get; set; }
|
||||
|
||||
public string RevocationCode { get; set; }
|
||||
public string SecretKey { get; set; }
|
||||
public bool Success { get; set; }
|
||||
|
||||
public string Error { get; set; }
|
||||
}
|
||||
|
||||
#region Authenticator data
|
||||
|
||||
/// <summary>
|
||||
/// Time of last Sync error
|
||||
/// </summary>
|
||||
private static DateTime _lastSyncError = DateTime.MinValue;
|
||||
|
||||
/// <summary>
|
||||
/// Returned serial number of authenticator
|
||||
/// </summary>
|
||||
public string Serial { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Random device ID we created and registered
|
||||
/// </summary>
|
||||
public string DeviceId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// JSON steam data
|
||||
/// </summary>
|
||||
public string SteamData { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// JSON session data
|
||||
/// </summary>
|
||||
public string SessionData { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string PollData { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Current Steam client instance
|
||||
/// </summary>
|
||||
public SteamClient Client { get; protected set; }
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// Expanding offsets to retry when creating first code
|
||||
/// </summary>
|
||||
private int[] ENROLL_OFFSETS = new int[] { 0, -30, 30, -60, 60, -90, 90, -120, 120};
|
||||
|
||||
/// <summary>
|
||||
/// Create a new Authenticator object
|
||||
/// </summary>
|
||||
public SteamAuthenticator()
|
||||
: base(CODE_DIGITS)
|
||||
{
|
||||
Issuer = STEAM_ISSUER;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get/set the combined secret data value
|
||||
/// </summary>
|
||||
public override string SecretData
|
||||
{
|
||||
get
|
||||
{
|
||||
if (this.Client != null && this.Client.Session != null)
|
||||
{
|
||||
this.SessionData = this.Client.Session.ToString();
|
||||
}
|
||||
|
||||
//if (Logger != null)
|
||||
//{
|
||||
// Logger.Debug("Get Steam data: {0}, Session:{1}", (SteamData ?? string.Empty).Replace("\n"," ").Replace("\r",""), (SessionData ?? string.Empty).Replace("\n", " ").Replace("\r", ""));
|
||||
//}
|
||||
|
||||
// this is the key | serial | deviceid
|
||||
return base.SecretData
|
||||
+ "|" + Authenticator.ByteArrayToString(Encoding.UTF8.GetBytes(Serial))
|
||||
+ "|" + Authenticator.ByteArrayToString(Encoding.UTF8.GetBytes(DeviceId))
|
||||
+ "|" + Authenticator.ByteArrayToString(Encoding.UTF8.GetBytes(SteamData))
|
||||
+ "|" + (string.IsNullOrEmpty(SessionData) == false ? Authenticator.ByteArrayToString(Encoding.UTF8.GetBytes(SessionData)) : string.Empty);
|
||||
}
|
||||
set
|
||||
{
|
||||
// extract key + serial + deviceid
|
||||
if (string.IsNullOrEmpty(value) == false)
|
||||
{
|
||||
string[] parts = value.Split('|');
|
||||
base.SecretData = value;
|
||||
Serial = (parts.Length > 1 ? Encoding.UTF8.GetString(Authenticator.StringToByteArray(parts[1])) : null);
|
||||
DeviceId = (parts.Length > 2 ? Encoding.UTF8.GetString(Authenticator.StringToByteArray(parts[2])) : null);
|
||||
SteamData = (parts.Length > 3 ? Encoding.UTF8.GetString(Authenticator.StringToByteArray(parts[3])) : string.Empty);
|
||||
|
||||
if (string.IsNullOrEmpty(SteamData) == false && SteamData[0] != '{')
|
||||
{
|
||||
// convert old recovation code into SteamData json
|
||||
SteamData = "{\"revocation_code\":\"" + SteamData + "\"}";
|
||||
}
|
||||
string session = (parts.Length > 4 ? Encoding.UTF8.GetString(Authenticator.StringToByteArray(parts[4])) : null);
|
||||
|
||||
//if (Logger != null)
|
||||
//{
|
||||
// Logger.Debug("Set Steam data: {0}, Session:{1}", (SteamData ?? string.Empty).Replace("\n", " ").Replace("\r", ""), (SessionData ?? string.Empty).Replace("\n", " ").Replace("\r", ""));
|
||||
//}
|
||||
|
||||
if (string.IsNullOrEmpty(session) == false)
|
||||
{
|
||||
SessionData = session;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
SecretKey = null;
|
||||
Serial = null;
|
||||
DeviceId = null;
|
||||
SteamData = null;
|
||||
SessionData = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get (or create) the current Steam client for this Authenticator
|
||||
/// </summary>
|
||||
/// <returns>current or new SteamClient</returns>
|
||||
public SteamClient GetClient()
|
||||
{
|
||||
lock (this)
|
||||
{
|
||||
if (this.Client == null)
|
||||
{
|
||||
this.Client = new SteamClient(this, this.SessionData);
|
||||
}
|
||||
|
||||
return this.Client;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Perform a request to the Steam WebAPI service
|
||||
/// </summary>
|
||||
/// <param name="url">API url</param>
|
||||
/// <param name="method">GET or POST</param>
|
||||
/// <param name="data">Name-data pairs</param>
|
||||
/// <param name="cookies">current cookie container</param>
|
||||
/// <returns>response body</returns>
|
||||
private string Request(string url, string method, NameValueCollection data = null, CookieContainer cookies = null, NameValueCollection headers = null, int timeout = 0)
|
||||
{
|
||||
// create form-encoded data for query or body
|
||||
string query = (data == null ? string.Empty : string.Join("&", Array.ConvertAll(data.AllKeys, key => String.Format("{0}={1}", HttpUtility.UrlEncode(key), HttpUtility.UrlEncode(data[key])))));
|
||||
if (string.Compare(method, "GET", true) == 0)
|
||||
{
|
||||
url += (url.IndexOf("?") == -1 ? "?" : "&") + query;
|
||||
}
|
||||
|
||||
// call the server
|
||||
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
|
||||
request.Method = method;
|
||||
request.Accept = "text/javascript, text/html, application/xml, text/xml, */*";
|
||||
request.ServicePoint.Expect100Continue = false;
|
||||
request.UserAgent = "Mozilla/5.0 (Linux; U; Android 4.1.1; en-us; Google Nexus 4 - 4.1.1 - API 16 - 768x1280 Build/JRO03S) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30";
|
||||
request.AutomaticDecompression = DecompressionMethods.Deflate | DecompressionMethods.GZip;
|
||||
request.Referer = COMMUNITY_BASE; // + "/mobilelogin?oauth_client_id=DE45CD61&oauth_scope=read_profile%20write_profile%20read_client%20write_client";
|
||||
if (headers != null)
|
||||
{
|
||||
request.Headers.Add(headers);
|
||||
}
|
||||
if (cookies != null)
|
||||
{
|
||||
request.CookieContainer = cookies;
|
||||
}
|
||||
if (timeout != 0)
|
||||
{
|
||||
request.Timeout = timeout;
|
||||
}
|
||||
|
||||
if (string.Compare(method, "POST", true) == 0)
|
||||
{
|
||||
request.ContentType = "application/x-www-form-urlencoded; charset=UTF-8";
|
||||
request.ContentLength = query.Length;
|
||||
|
||||
StreamWriter requestStream = new StreamWriter(request.GetRequestStream());
|
||||
requestStream.Write(query);
|
||||
requestStream.Close();
|
||||
}
|
||||
|
||||
try {
|
||||
using (HttpWebResponse response = (HttpWebResponse)request.GetResponse())
|
||||
{
|
||||
LogRequest(method, url, cookies, data, response.StatusCode.ToString() + " " + response.StatusDescription);
|
||||
|
||||
// OK?
|
||||
if (response.StatusCode != HttpStatusCode.OK)
|
||||
{
|
||||
throw new InvalidRequestException(string.Format("{0}: {1}", (int)response.StatusCode, response.StatusDescription));
|
||||
}
|
||||
|
||||
// load the response
|
||||
using (StreamReader responseStream = new StreamReader(response.GetResponseStream()))
|
||||
{
|
||||
string responseData = responseStream.ReadToEnd();
|
||||
LogRequest(method, url, cookies, data, responseData);
|
||||
return responseData;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LogException(method, url, cookies, data, ex);
|
||||
|
||||
if (ex is WebException && ((WebException)ex).Response != null && ((HttpWebResponse)((WebException)ex).Response).StatusCode == HttpStatusCode.Forbidden)
|
||||
{
|
||||
throw new UnauthorisedRequestException(ex);
|
||||
}
|
||||
|
||||
throw new InvalidRequestException(ex.Message, ex);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Enroll the authenticator with the server
|
||||
/// </summary>
|
||||
public bool Enroll(EnrollState state)
|
||||
{
|
||||
// clear error
|
||||
state.Error = null;
|
||||
|
||||
try
|
||||
{
|
||||
var data = new NameValueCollection();
|
||||
var cookies = state.Cookies = state.Cookies ?? new CookieContainer();
|
||||
string response;
|
||||
|
||||
if (string.IsNullOrEmpty(state.OAuthToken) == true)
|
||||
{
|
||||
// get session
|
||||
if (cookies.Count == 0)
|
||||
{
|
||||
cookies.Add(new Uri(COMMUNITY_BASE + "/"), new Cookie("mobileClientVersion", "3067969+%282.1.3%29"));
|
||||
cookies.Add(new Uri(COMMUNITY_BASE + "/"), new Cookie("mobileClient", "android"));
|
||||
cookies.Add(new Uri(COMMUNITY_BASE + "/"), new Cookie("steamid", ""));
|
||||
cookies.Add(new Uri(COMMUNITY_BASE + "/"), new Cookie("steamLogin", ""));
|
||||
cookies.Add(new Uri(COMMUNITY_BASE + "/"), new Cookie("Steam_Language", "english"));
|
||||
cookies.Add(new Uri(COMMUNITY_BASE + "/"), new Cookie("dob", ""));
|
||||
|
||||
NameValueCollection headers = new NameValueCollection();
|
||||
headers.Add("X-Requested-With", "com.valvesoftware.android.steam.community");
|
||||
|
||||
response = Request("https://steamcommunity.com/mobilelogin?oauth_client_id=DE45CD61&oauth_scope=read_profile%20write_profile%20read_client%20write_client", "GET", null, cookies, headers);
|
||||
}
|
||||
|
||||
// Steam strips any non-ascii chars from username and password
|
||||
state.Username = Regex.Replace(state.Username, @"[^\u0000-\u007F]", string.Empty);
|
||||
state.Password = Regex.Replace(state.Password, @"[^\u0000-\u007F]", string.Empty);
|
||||
|
||||
// get the user's RSA key
|
||||
data.Add("username", state.Username);
|
||||
response = Request(COMMUNITY_BASE + "/mobilelogin/getrsakey", "POST", data, cookies);
|
||||
var rsaresponse = JObject.Parse(response);
|
||||
if (rsaresponse.SelectToken("success").Value<bool>() != true)
|
||||
{
|
||||
throw new InvalidEnrollResponseException("Cannot get steam information for user: " + state.Username);
|
||||
}
|
||||
|
||||
// encrypt password with RSA key
|
||||
RNGCryptoServiceProvider random = new RNGCryptoServiceProvider();
|
||||
byte[] encryptedPassword;
|
||||
using (var rsa = new RSACryptoServiceProvider())
|
||||
{
|
||||
var passwordBytes = Encoding.ASCII.GetBytes(state.Password);
|
||||
var p = rsa.ExportParameters(false);
|
||||
p.Exponent = Authenticator.StringToByteArray(rsaresponse.SelectToken("publickey_exp").Value<string>());
|
||||
p.Modulus = Authenticator.StringToByteArray(rsaresponse.SelectToken("publickey_mod").Value<string>());
|
||||
rsa.ImportParameters(p);
|
||||
encryptedPassword = rsa.Encrypt(passwordBytes, false);
|
||||
}
|
||||
|
||||
// login request
|
||||
data = new NameValueCollection();
|
||||
data.Add("password", Convert.ToBase64String(encryptedPassword));
|
||||
data.Add("username", state.Username);
|
||||
data.Add("twofactorcode", "");
|
||||
data.Add("emailauth", (state.EmailAuthText != null ? state.EmailAuthText : string.Empty));
|
||||
data.Add("loginfriendlyname", "#login_emailauth_friendlyname_mobile");
|
||||
data.Add("captchagid", (state.CaptchaId != null ? state.CaptchaId : "-1"));
|
||||
data.Add("captcha_text", (state.CaptchaText != null ? state.CaptchaText : "enter above characters"));
|
||||
data.Add("emailsteamid", (state.EmailAuthText != null ? state.SteamId ?? string.Empty : string.Empty));
|
||||
data.Add("rsatimestamp", rsaresponse.SelectToken("timestamp").Value<string>());
|
||||
data.Add("remember_login", "false");
|
||||
data.Add("oauth_client_id", "DE45CD61");
|
||||
data.Add("oauth_scope", "read_profile write_profile read_client write_client");
|
||||
data.Add("donotache", new DateTime().ToUniversalTime().Subtract(new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc)).TotalMilliseconds.ToString());
|
||||
response = Request(COMMUNITY_BASE + "/mobilelogin/dologin/", "POST", data, cookies);
|
||||
Dictionary<string, object> loginresponse = JsonConvert.DeserializeObject<Dictionary<string, object>>(response);
|
||||
|
||||
if (loginresponse.ContainsKey("emailsteamid") == true)
|
||||
{
|
||||
state.SteamId = loginresponse["emailsteamid"] as string;
|
||||
}
|
||||
|
||||
// require captcha
|
||||
if (loginresponse.ContainsKey("captcha_needed") == true && (bool)loginresponse["captcha_needed"] == true)
|
||||
{
|
||||
state.RequiresCaptcha = true;
|
||||
state.CaptchaId = (string)loginresponse["captcha_gid"];
|
||||
state.CaptchaUrl = COMMUNITY_BASE + "/public/captcha.php?gid=" + state.CaptchaId;
|
||||
}
|
||||
else
|
||||
{
|
||||
state.RequiresCaptcha = false;
|
||||
state.CaptchaId = null;
|
||||
state.CaptchaUrl = null;
|
||||
state.CaptchaText = null;
|
||||
}
|
||||
|
||||
// require email auth
|
||||
if (loginresponse.ContainsKey("emailauth_needed") == true && (bool)loginresponse["emailauth_needed"] == true)
|
||||
{
|
||||
if (loginresponse.ContainsKey("emaildomain") == true)
|
||||
{
|
||||
var emaildomain = (string)loginresponse["emaildomain"];
|
||||
if (string.IsNullOrEmpty(emaildomain) == false)
|
||||
{
|
||||
state.EmailDomain = emaildomain;
|
||||
}
|
||||
}
|
||||
state.RequiresEmailAuth = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
state.EmailDomain = null;
|
||||
state.RequiresEmailAuth = false;
|
||||
}
|
||||
|
||||
// require email auth
|
||||
if (loginresponse.ContainsKey("requires_twofactor") == true && (bool)loginresponse["requires_twofactor"] == true)
|
||||
{
|
||||
state.Requires2FA = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
state.Requires2FA = false;
|
||||
}
|
||||
|
||||
// if we didn't login, return the result
|
||||
if (loginresponse.ContainsKey("login_complete") == false || (bool)loginresponse["login_complete"] == false || loginresponse.ContainsKey("oauth") == false)
|
||||
{
|
||||
if (loginresponse.ContainsKey("oauth") == false)
|
||||
{
|
||||
state.Error = "Invalid response from Steam (No OAuth token)";
|
||||
}
|
||||
if (loginresponse.ContainsKey("message") == true)
|
||||
{
|
||||
state.Error = (string)loginresponse["message"];
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// get the OAuth token - is stringified json
|
||||
string oauth = (string)loginresponse["oauth"];
|
||||
var oauthjson = JObject.Parse(oauth);
|
||||
state.OAuthToken = oauthjson.SelectToken("oauth_token").Value<string>();
|
||||
if (oauthjson.SelectToken("steamid") != null)
|
||||
{
|
||||
state.SteamId = oauthjson.SelectToken("steamid").Value<string>();
|
||||
}
|
||||
}
|
||||
|
||||
// login to webapi
|
||||
data.Clear();
|
||||
data.Add("access_token", state.OAuthToken);
|
||||
response = Request(WEBAPI_BASE + "/ISteamWebUserPresenceOAuth/Logon/v0001", "POST", data);
|
||||
|
||||
var sessionid = cookies.GetCookies(new Uri(COMMUNITY_BASE + "/"))["sessionid"].Value;
|
||||
|
||||
if (state.RequiresActivation == false)
|
||||
{
|
||||
data.Clear();
|
||||
data.Add("op", "has_phone");
|
||||
data.Add("arg", "null");
|
||||
data.Add("sessionid", sessionid);
|
||||
|
||||
response = Request(COMMUNITY_BASE + "/steamguard/phoneajax", "POST", data, cookies);
|
||||
var jsonresponse = JObject.Parse(response);
|
||||
bool hasPhone = jsonresponse.SelectToken("has_phone").Value<Boolean>();
|
||||
if (hasPhone == false)
|
||||
{
|
||||
state.OAuthToken = null; // force new login
|
||||
state.RequiresLogin = true;
|
||||
state.Cookies = null;
|
||||
state.Error = "Your Steam account must have a SMS-capable phone number attached. Go into Account Details of the Steam client or Steam website and click Add a Phone Number.";
|
||||
return false;
|
||||
}
|
||||
|
||||
//response = Request(COMMUNITY_BASE + "/steamguard/phone_checksms?bForTwoFactor=1&bRevoke2fOnCancel=", "GET", null, cookies);
|
||||
|
||||
// add a new authenticator
|
||||
data.Clear();
|
||||
string deviceId = BuildRandomId();
|
||||
data.Add("access_token", state.OAuthToken);
|
||||
data.Add("steamid", state.SteamId);
|
||||
data.Add("authenticator_type", "1");
|
||||
data.Add("device_identifier", deviceId);
|
||||
data.Add("sms_phone_id", "1");
|
||||
response = Request(WEBAPI_BASE + "/ITwoFactorService/AddAuthenticator/v0001", "POST", data);
|
||||
var tfaresponse = JObject.Parse(response);
|
||||
if (response.IndexOf("status") == -1 && tfaresponse.SelectToken("response.status").Value<int>() == 84)
|
||||
{
|
||||
// invalid response
|
||||
state.OAuthToken = null; // force new login
|
||||
state.RequiresLogin = true;
|
||||
state.Cookies = null;
|
||||
state.Error = "Unable to send SMS. Check your phone is registered on your Steam account.";
|
||||
return false;
|
||||
}
|
||||
if (response.IndexOf("shared_secret") == -1)
|
||||
{
|
||||
// invalid response
|
||||
state.OAuthToken = null; // force new login
|
||||
state.RequiresLogin = true;
|
||||
state.Cookies = null;
|
||||
state.Error = "Invalid response from Steam: " + response;
|
||||
return false;
|
||||
}
|
||||
|
||||
// save data into this authenticator
|
||||
var secret = tfaresponse.SelectToken("response.shared_secret").Value<string>();
|
||||
this.SecretKey = Convert.FromBase64String(secret);
|
||||
this.Serial = tfaresponse.SelectToken("response.serial_number").Value<string>();
|
||||
this.DeviceId = deviceId;
|
||||
state.RevocationCode = tfaresponse.SelectToken("response.revocation_code").Value<string>();
|
||||
|
||||
// add the steamid into the data
|
||||
var steamdata = JObject.Parse(tfaresponse.SelectToken("response").ToString());
|
||||
if (steamdata.SelectToken("steamid") == null)
|
||||
{
|
||||
steamdata.Add("steamid", state.SteamId);
|
||||
}
|
||||
if (steamdata.SelectToken("steamguard_scheme") == null)
|
||||
{
|
||||
steamdata.Add("steamguard_scheme", "2");
|
||||
}
|
||||
this.SteamData = steamdata.ToString(Newtonsoft.Json.Formatting.None);
|
||||
|
||||
// calculate server drift
|
||||
long servertime = tfaresponse.SelectToken("response.server_time").Value<long>() * 1000;
|
||||
ServerTimeDiff = servertime - CurrentTime;
|
||||
LastServerTime = DateTime.Now.Ticks;
|
||||
|
||||
state.RequiresActivation = true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
// finalize adding the authenticator
|
||||
data.Clear();
|
||||
data.Add("access_token", state.OAuthToken);
|
||||
data.Add("steamid", state.SteamId);
|
||||
data.Add("activation_code", state.ActivationCode);
|
||||
|
||||
// try and authorise
|
||||
var retries = 0;
|
||||
while (state.RequiresActivation == true && retries < ENROLL_ACTIVATE_RETRIES)
|
||||
{
|
||||
data.Add("authenticator_code", this.CalculateCode(false));
|
||||
data.Add("authenticator_time", this.ServerTime.ToString());
|
||||
response = Request(WEBAPI_BASE + "/ITwoFactorService/FinalizeAddAuthenticator/v0001", "POST", data);
|
||||
var finalizeresponse = JObject.Parse(response);
|
||||
if (response.IndexOf("status") != -1 && finalizeresponse.SelectToken("response.status").Value<int>() == INVALID_ACTIVATION_CODE)
|
||||
{
|
||||
state.Error = "Invalid activation code";
|
||||
return false;
|
||||
}
|
||||
|
||||
// reset our time
|
||||
if (response.IndexOf("server_time") != -1)
|
||||
{
|
||||
long servertime = finalizeresponse.SelectToken("response.server_time").Value<long>() * 1000;
|
||||
ServerTimeDiff = servertime - CurrentTime;
|
||||
LastServerTime = DateTime.Now.Ticks;
|
||||
}
|
||||
|
||||
// check success
|
||||
if (finalizeresponse.SelectToken("response.success").Value<bool>() == true)
|
||||
{
|
||||
if (response.IndexOf("want_more") != -1 && finalizeresponse.SelectToken("response.want_more").Value<bool>() == true)
|
||||
{
|
||||
ServerTimeDiff += ((long)this.Period * 1000L);
|
||||
retries++;
|
||||
continue;
|
||||
}
|
||||
state.RequiresActivation = false;
|
||||
break;
|
||||
}
|
||||
|
||||
ServerTimeDiff += ((long)this.Period * 1000L);
|
||||
retries++;
|
||||
}
|
||||
if (state.RequiresActivation == true)
|
||||
{
|
||||
state.Error = "There was a problem activating. There might be an issue with the Steam servers. Please try again later.";
|
||||
return false;
|
||||
}
|
||||
|
||||
// mark and successful and return key
|
||||
state.Success = true;
|
||||
state.SecretKey = Authenticator.ByteArrayToString(this.SecretKey);
|
||||
|
||||
// send confirmation email
|
||||
data.Clear();
|
||||
data.Add("access_token", state.OAuthToken);
|
||||
data.Add("steamid", state.SteamId);
|
||||
data.Add("email_type", "2");
|
||||
response = Request(WEBAPI_BASE + "/ITwoFactorService/SendEmail/v0001", "POST", data);
|
||||
|
||||
return true;
|
||||
}
|
||||
catch (UnauthorisedRequestException ex)
|
||||
{
|
||||
throw new InvalidEnrollResponseException("You are not allowed to add an authenticator. Have you enabled 'community-generated content' in Family View?", ex);
|
||||
}
|
||||
catch (InvalidRequestException ex)
|
||||
{
|
||||
throw new InvalidEnrollResponseException("Error enrolling new authenticator", ex);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Synchronise this authenticator's time with Steam.
|
||||
/// </summary>
|
||||
public override void Sync()
|
||||
{
|
||||
// check if data is protected
|
||||
if (this.SecretKey == null && this.EncryptedData != null)
|
||||
{
|
||||
throw new EncryptedSecretDataException();
|
||||
}
|
||||
|
||||
// don't retry for 5 minutes
|
||||
if (_lastSyncError >= DateTime.Now.AddMinutes(0 - SYNC_ERROR_MINUTES))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
var response = Request(SYNC_URL, "POST", null, null, null, SYNC_TIMEOUT);
|
||||
var json = JObject.Parse(response);
|
||||
|
||||
// get servertime in ms
|
||||
long servertime = json.SelectToken("response.server_time").Value<long>() * 1000;
|
||||
|
||||
// get the difference between the server time and our current time
|
||||
ServerTimeDiff = servertime - CurrentTime;
|
||||
LastServerTime = DateTime.Now.Ticks;
|
||||
|
||||
// clear any sync error
|
||||
_lastSyncError = DateTime.MinValue;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
// don't retry for a while after error
|
||||
_lastSyncError = DateTime.Now;
|
||||
throw ex;
|
||||
// set to zero to force reset
|
||||
//ServerTimeDiff = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Calculate the current code for the authenticator.
|
||||
/// </summary>
|
||||
/// <param name="resyncTime">flag to resync time</param>
|
||||
/// <returns>authenticator code</returns>
|
||||
protected override string CalculateCode(bool resyncTime = false, long interval = -1)
|
||||
{
|
||||
// sync time if required
|
||||
if (resyncTime == true || ServerTimeDiff == 0)
|
||||
{
|
||||
if (interval > 0)
|
||||
{
|
||||
ServerTimeDiff = (interval * ((long)this.Period * 1000L)) - CurrentTime;
|
||||
}
|
||||
else
|
||||
{
|
||||
Sync();
|
||||
}
|
||||
}
|
||||
|
||||
HMac hmac = new HMac(new Sha1Digest());
|
||||
hmac.Init(new KeyParameter(SecretKey));
|
||||
|
||||
byte[] codeIntervalArray = BitConverter.GetBytes(CodeInterval);
|
||||
if (BitConverter.IsLittleEndian)
|
||||
{
|
||||
Array.Reverse(codeIntervalArray);
|
||||
}
|
||||
hmac.BlockUpdate(codeIntervalArray, 0, codeIntervalArray.Length);
|
||||
|
||||
byte[] mac = new byte[hmac.GetMacSize()];
|
||||
hmac.DoFinal(mac, 0);
|
||||
|
||||
// the last 4 bits of the mac say where the code starts (e.g. if last 4 bit are 1100, we start at byte 12)
|
||||
int start = mac[19] & 0x0f;
|
||||
|
||||
// extract those 4 bytes
|
||||
byte[] bytes = new byte[4];
|
||||
Array.Copy(mac, start, bytes, 0, 4);
|
||||
if (BitConverter.IsLittleEndian)
|
||||
{
|
||||
Array.Reverse(bytes);
|
||||
}
|
||||
uint fullcode = BitConverter.ToUInt32(bytes, 0) & 0x7fffffff;
|
||||
|
||||
// build the alphanumeric code
|
||||
StringBuilder code = new StringBuilder();
|
||||
for (var i=0; i<CODE_DIGITS; i++)
|
||||
{
|
||||
code.Append(STEAMCHARS[fullcode % STEAMCHARS.Length]);
|
||||
fullcode /= (uint)STEAMCHARS.Length;
|
||||
}
|
||||
|
||||
return code.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create a random Device ID string for Enrolling
|
||||
/// </summary>
|
||||
/// <returns>Random string</returns>
|
||||
private static string BuildRandomId()
|
||||
{
|
||||
return "android:" + Guid.NewGuid().ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Log an exception from a Request
|
||||
/// </summary>
|
||||
/// <param name="method">Get or POST</param>
|
||||
/// <param name="url">Request URL</param>
|
||||
/// <param name="cookies">cookie container</param>
|
||||
/// <param name="request">Request data</param>
|
||||
/// <param name="ex">Thrown exception</param>
|
||||
private static void LogException(string method, string url, CookieContainer cookies, NameValueCollection request, Exception ex)
|
||||
{
|
||||
StringBuilder data = new StringBuilder();
|
||||
if (cookies != null)
|
||||
{
|
||||
foreach (Cookie cookie in cookies.GetCookies(new Uri(url)))
|
||||
{
|
||||
if (data.Length == 0)
|
||||
{
|
||||
data.Append("Cookies:");
|
||||
}
|
||||
else
|
||||
{
|
||||
data.Append("&");
|
||||
}
|
||||
data.Append(cookie.Name + "=" + cookie.Value);
|
||||
}
|
||||
data.Append(" ");
|
||||
}
|
||||
|
||||
if (request != null)
|
||||
{
|
||||
foreach (var key in request.AllKeys)
|
||||
{
|
||||
if (data.Length == 0)
|
||||
{
|
||||
data.Append("Req:");
|
||||
}
|
||||
else
|
||||
{
|
||||
data.Append("&");
|
||||
}
|
||||
data.Append(key + "=" + request[key]);
|
||||
}
|
||||
data.Append(" ");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Log a normal response
|
||||
/// </summary>
|
||||
/// <param name="method">Get or POST</param>
|
||||
/// <param name="url">Request URL</param>
|
||||
/// <param name="cookies">cookie container</param>
|
||||
/// <param name="request">Request data</param>
|
||||
/// <param name="response">response body</param>
|
||||
private static void LogRequest(string method, string url, CookieContainer cookies, NameValueCollection request, string response)
|
||||
{
|
||||
StringBuilder data = new StringBuilder();
|
||||
if (cookies != null)
|
||||
{
|
||||
foreach (Cookie cookie in cookies.GetCookies(new Uri(url)))
|
||||
{
|
||||
if (data.Length == 0)
|
||||
{
|
||||
data.Append("Cookies:");
|
||||
}
|
||||
else
|
||||
{
|
||||
data.Append("&");
|
||||
}
|
||||
data.Append(cookie.Name + "=" + cookie.Value);
|
||||
}
|
||||
data.Append(" ");
|
||||
}
|
||||
|
||||
if (request != null)
|
||||
{
|
||||
foreach (var key in request.AllKeys)
|
||||
{
|
||||
if (data.Length == 0)
|
||||
{
|
||||
data.Append("Req:");
|
||||
}
|
||||
else
|
||||
{
|
||||
data.Append("&");
|
||||
}
|
||||
data.Append(key + "=" + request[key]);
|
||||
}
|
||||
data.Append(" ");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Our custom exception for the internal Http Request
|
||||
/// </summary>
|
||||
class InvalidRequestException : ApplicationException
|
||||
{
|
||||
public InvalidRequestException(string msg = null, Exception ex = null) : base(msg, ex) { }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 403 forbidden responses
|
||||
/// </summary>
|
||||
class UnauthorisedRequestException : InvalidRequestException
|
||||
{
|
||||
public UnauthorisedRequestException(Exception ex = null) : base("Unauthorised", ex) { }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.IO;
|
||||
using SteamTools.Model;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace SteamTools.Helper
|
||||
{
|
||||
public static class ConfigHelper
|
||||
{
|
||||
private const string ConfigFileName = "SteamToolData.dat";
|
||||
|
||||
private static readonly string ConfigPath =
|
||||
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), ConfigFileName);
|
||||
|
||||
public static SteamToolConfig SteamToolConfig { get; set; }
|
||||
|
||||
public static void SaveConfig()
|
||||
{
|
||||
var jsonData = JsonConvert.SerializeObject(SteamToolConfig);
|
||||
File.WriteAllText(ConfigPath, jsonData, Encoding.UTF8);
|
||||
}
|
||||
|
||||
public static SteamToolConfig ReadConfig()
|
||||
{
|
||||
SteamToolConfig = JsonConvert.DeserializeObject<SteamToolConfig>(File.ReadAllText(ConfigPath, Encoding.UTF8));
|
||||
return SteamToolConfig;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,75 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.Win32;
|
||||
|
||||
namespace SteamTools.Helper
|
||||
{
|
||||
public static class RegistryKeyHelper
|
||||
{
|
||||
/// <summary>
|
||||
/// 创建注册表项
|
||||
/// </summary>
|
||||
/// <param name="registryKey"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <returns></returns>
|
||||
public static RegistryKey CreateRegistryKey(RegistryKey registryKey, string path)
|
||||
{
|
||||
return registryKey.CreateSubKey(path);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除注册表项
|
||||
/// </summary>
|
||||
/// <param name="registryKey"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <returns></returns>
|
||||
public static void DeleteRegistryKey(RegistryKey registryKey, string path)
|
||||
{
|
||||
registryKey.DeleteSubKey(path, true); //该方法无返回值,直接调用即可
|
||||
registryKey.Close();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 读取注册表值
|
||||
/// </summary>
|
||||
/// <param name="registryKey"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="key"></param>
|
||||
/// <returns></returns>
|
||||
public static string ReadRegistryKey(RegistryKey registryKey, string path, string key)
|
||||
{
|
||||
var myreg = registryKey.OpenSubKey(path);
|
||||
|
||||
if (myreg != null)
|
||||
{
|
||||
var info = myreg.GetValue(key).ToString();
|
||||
myreg.Close();
|
||||
return info;
|
||||
}
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 新增或修改注册表值
|
||||
/// </summary>
|
||||
/// <param name="registryKey"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="key"></param>
|
||||
/// <param name="value"></param>
|
||||
/// <param name="registryValueKind"></param>
|
||||
/// <returns></returns>
|
||||
public static void AddOrUpdateRegistryKey(RegistryKey registryKey, string path, string key, string value, RegistryValueKind registryValueKind)
|
||||
{
|
||||
RegistryKey myreg = registryKey.OpenSubKey(path, true); //该项必须已存在
|
||||
if (myreg != null)
|
||||
{
|
||||
myreg.SetValue(key, value, registryValueKind);
|
||||
myreg.Close();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,107 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Gameloop.Vdf.Linq;
|
||||
using Microsoft.Win32;
|
||||
using SteamTool.Common.Helper;
|
||||
using SteamTools.Model;
|
||||
|
||||
namespace SteamTools.Helper
|
||||
{
|
||||
public class SteamHelper
|
||||
{
|
||||
public static readonly SteamHelper Instance = new SteamHelper();
|
||||
|
||||
public string SteamPath { get; set; }
|
||||
|
||||
public string SteamExePath { get; set; }
|
||||
|
||||
private const string SteamRegistryPath = @"SOFTWARE\Valve\Steam";
|
||||
|
||||
public SteamHelper()
|
||||
{
|
||||
var steamExePath = RegistryKeyHelper.ReadRegistryKey(Registry.CurrentUser, SteamRegistryPath, "SteamExe");
|
||||
var steamPath = RegistryKeyHelper.ReadRegistryKey(Registry.CurrentUser, SteamRegistryPath, "SteamPath");
|
||||
if (File.Exists(steamExePath))
|
||||
{
|
||||
SteamExePath = steamExePath;
|
||||
}
|
||||
if (Directory.Exists(steamPath))
|
||||
{
|
||||
SteamPath = steamPath;
|
||||
}
|
||||
}
|
||||
|
||||
public void KillSteamProcess()
|
||||
{
|
||||
Process[] processes = Process.GetProcesses();
|
||||
foreach (Process process in processes)
|
||||
{
|
||||
if (process.ProcessName == "Steam" || process.ProcessName == "SteamService" || process.ProcessName == "steamwebhelper")
|
||||
{
|
||||
process.Kill();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void StartSteam(string param = "")
|
||||
{
|
||||
if (!string.IsNullOrEmpty(SteamExePath))
|
||||
{
|
||||
Process.Start(SteamExePath, param);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取最后一次自动登陆steam用户名称
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string GetLastLoginUserName()
|
||||
{
|
||||
return RegistryKeyHelper.ReadRegistryKey(Registry.CurrentUser, SteamRegistryPath, "AutoLoginUser");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取所有记住登陆steam用户信息
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public List<SteamUser> GetAllUser()
|
||||
{
|
||||
var users = new List<SteamUser>();
|
||||
if (SteamPath != null)
|
||||
{
|
||||
var v = VdfHelper.GetVdfModelByPath(SteamPath + "/config/loginusers.vdf");
|
||||
|
||||
foreach (var item in v.Value)
|
||||
{
|
||||
var i = item.Value;
|
||||
var user = new SteamUser
|
||||
{
|
||||
AccountName = i.AccountName.ToString(),
|
||||
PersonaName = i.PersonaName.ToString(),
|
||||
RememberPassword = Convert.ToBoolean(Convert.ToInt64(i.RememberPassword.ToString())),
|
||||
MostRecent = Convert.ToBoolean(Convert.ToInt64(i.MostRecent.ToString())),
|
||||
Timestamp = Convert.ToInt64(i.Timestamp.ToString())
|
||||
};
|
||||
user.LastLoginTime= new DateTime(1970, 1, 1, 8, 0, 0).AddSeconds(user.Timestamp);
|
||||
users.Add(user);
|
||||
}
|
||||
}
|
||||
|
||||
return users;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 设置下次登陆steam用户
|
||||
/// </summary>
|
||||
public void SetCurrentUser(string username)
|
||||
{
|
||||
RegistryKeyHelper.AddOrUpdateRegistryKey(Registry.CurrentUser, SteamRegistryPath, "AutoLoginUser", username, RegistryValueKind.String);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Gameloop.Vdf;
|
||||
using Gameloop.Vdf.Linq;
|
||||
|
||||
namespace SteamTool.Common.Helper
|
||||
{
|
||||
public static class VdfHelper
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取VDF类型内容
|
||||
/// </summary>
|
||||
/// <param name="path">vdf文件内容</param>
|
||||
/// <returns></returns>
|
||||
public static dynamic GetVdfModel(string text)
|
||||
{
|
||||
return VdfConvert.Deserialize(text);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据路径获取VDF类型内容
|
||||
/// </summary>
|
||||
/// <param name="path">vdf文件路径</param>
|
||||
/// <returns></returns>
|
||||
public static dynamic GetVdfModelByPath(string path)
|
||||
{
|
||||
string text = File.ReadAllText(path,Encoding.UTF8);
|
||||
return GetVdfModel(text); ;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SteamTools.Model
|
||||
{
|
||||
public class SteamToolConfig
|
||||
{
|
||||
/// <summary>
|
||||
/// 启动参数
|
||||
/// </summary>
|
||||
public string SteamRunParam { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 保存用户
|
||||
/// </summary>
|
||||
public List<SteamUser> SteamUsers { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,65 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SteamTools.Model
|
||||
{
|
||||
public class SteamUser
|
||||
{
|
||||
|
||||
public string SteamId3 { get; set; }
|
||||
public int SteamId3_Int { get; }
|
||||
|
||||
public string SteamId32 { get; set; }
|
||||
public int SteamId32_Int { get; }
|
||||
|
||||
public long SteamId64 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 个人资料链接
|
||||
/// </summary>
|
||||
public string ProfileUrl { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 昵称
|
||||
/// </summary>
|
||||
public string PersonaName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 用户名
|
||||
/// </summary>
|
||||
public string AccountName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否记住密码
|
||||
/// </summary>
|
||||
public bool RememberPassword { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 密码
|
||||
/// </summary>
|
||||
public string PassWord { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 最后登录时间戳
|
||||
/// </summary>
|
||||
public long Timestamp { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 最后登录时间
|
||||
/// </summary>
|
||||
public DateTime LastLoginTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 最近登录
|
||||
/// </summary>
|
||||
public bool MostRecent { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
public string Remark { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// 有关程序集的一般信息由以下
|
||||
// 控制。更改这些特性值可修改
|
||||
// 与程序集关联的信息。
|
||||
[assembly: AssemblyTitle("SteamTool.Common")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("SteamTool.Common")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2018")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// 将 ComVisible 设置为 false 会使此程序集中的类型
|
||||
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
|
||||
//请将此类型的 ComVisible 特性设置为 true。
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
|
||||
[assembly: Guid("75e148c7-5f32-4f01-9444-cedefa28748a")]
|
||||
|
||||
// 程序集的版本信息由下列四个值组成:
|
||||
//
|
||||
// 主版本
|
||||
// 次版本
|
||||
// 生成号
|
||||
// 修订号
|
||||
//
|
||||
// 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
|
||||
//通过使用 "*",如下所示:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
@@ -1,14 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SteamTool.Common.Service
|
||||
{
|
||||
public class SteamToolsService
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,74 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{75E148C7-5F32-4F01-9444-CEDEFA28748A}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>SteamTool.Common</RootNamespace>
|
||||
<AssemblyName>SteamTool.Common</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == '发布|AnyCPU'">
|
||||
<OutputPath>bin\发布\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<LangVersion>7.3</LangVersion>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Gameloop.Vdf, Version=0.6.1.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Gameloop.Vdf.0.6.1\lib\net45\Gameloop.Vdf.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Helper\ConfigHelper.cs" />
|
||||
<Compile Include="Helper\RegistryKeyHelper.cs" />
|
||||
<Compile Include="Helper\SteamHelper.cs" />
|
||||
<Compile Include="Helper\VdfHelper.cs" />
|
||||
<Compile Include="Model\SteamToolConfig.cs" />
|
||||
<Compile Include="Model\SteamUser.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Service\SteamToolsService.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
||||
@@ -1,5 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Gameloop.Vdf" version="0.6.1" targetFramework="net46" />
|
||||
<package id="Newtonsoft.Json" version="12.0.3" targetFramework="net46" />
|
||||
</packages>
|
||||
@@ -1,26 +0,0 @@
|
||||
using SteamTool.Model;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Security.Cryptography;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
using System.Text;
|
||||
|
||||
namespace SteamTool.Proxy
|
||||
{
|
||||
public static class CertificateEx
|
||||
{
|
||||
public static string GetPublicPemCertificateString(this X509Certificate2 @this)
|
||||
{
|
||||
StringBuilder builder = new StringBuilder();
|
||||
builder.AppendLine(Const.HOST_TAG);
|
||||
builder.AppendLine("-----BEGIN CERTIFICATE-----");
|
||||
builder.AppendLine(
|
||||
Convert.ToBase64String(@this.RawData, Base64FormattingOptions.InsertLineBreaks));
|
||||
builder.AppendLine("-----END CERTIFICATE-----");
|
||||
builder.AppendLine(Const.HOST_TAG);
|
||||
|
||||
return builder.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -7,382 +7,189 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "UI", "UI", "{45E5B6B2-0A6D-
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Core", "Core", "{350F425C-AF5A-4ED2-BDDC-B905A4E63A14}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SteamTool.Proxy", "SteamTool.Proxy\SteamTool.Proxy.csproj", "{A70C148D-042C-48DA-9963-0B777FC60215}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SteamTool.Proxy", "source\SteamTool.Proxy\SteamTool.Proxy.csproj", "{A70C148D-042C-48DA-9963-0B777FC60215}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Composition", "Composition", "{F62E508E-B374-4149-B9AC-0A8090AA6CD1}"
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Reference", "Reference", "{F62E508E-B374-4149-B9AC-0A8090AA6CD1}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SteamTool.Steam.Service", "SteamTool.Steam.Service\SteamTool.Steam.Service.csproj", "{2A155A7B-3DFD-4F16-929D-9693D2411B83}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SteamTool.Steam.Service", "source\SteamTool.Steam.Service\SteamTool.Steam.Service.csproj", "{2A155A7B-3DFD-4F16-929D-9693D2411B83}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SteamTool.Core", "SteamTool.Core\SteamTool.Core.csproj", "{23E26040-19A5-4623-8863-B9ED539403B0}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SteamTool.Core", "source\SteamTool.Core\SteamTool.Core.csproj", "{23E26040-19A5-4623-8863-B9ED539403B0}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SteamTools", "SteamTools\SteamTools.csproj", "{0663899A-2EC5-4929-868C-9D9620FEA4FE}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SteamTools", "source\SteamTools\SteamTools.csproj", "{0663899A-2EC5-4929-868C-9D9620FEA4FE}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SteamTool.Steam4NET.Test", "SteamTool.Steam4NET.Test\SteamTool.Steam4NET.Test.csproj", "{790D22D4-94B0-4575-8E2D-C451EC520407}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SteamTool.Steam4NET.Test", "source\SteamTool.Steam4NET.Test\SteamTool.Steam4NET.Test.csproj", "{790D22D4-94B0-4575-8E2D-C451EC520407}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SteamTool.Steam4NET", "SteamTool.Steam4NET\SteamTool.Steam4NET.csproj", "{D4157059-D31A-4A21-AF4C-2D458F768041}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SteamTool.Steam4NET", "source\SteamTool.Steam4NET\SteamTool.Steam4NET.csproj", "{D4157059-D31A-4A21-AF4C-2D458F768041}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Test", "Test", "{D245A82C-66B2-4CD5-881C-3ED4332FC91D}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SteamTool.Steamworks.Test", "SteamTool.Steamworks.Test\SteamTool.Steamworks.Test.csproj", "{C03E4CF5-D68F-4CAC-B002-3A6799ED9E15}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SteamTool.Steamworks.Test", "source\SteamTool.Steamworks.Test\SteamTool.Steamworks.Test.csproj", "{C03E4CF5-D68F-4CAC-B002-3A6799ED9E15}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "lib", "lib", "{868B3B33-14B3-49AF-AE01-28D85FD98C1F}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
Lib\MetroRadiance.Chrome.dll = Lib\MetroRadiance.Chrome.dll
|
||||
Lib\MetroRadiance.Core.dll = Lib\MetroRadiance.Core.dll
|
||||
Lib\MetroRadiance.dll = Lib\MetroRadiance.dll
|
||||
C:\Users\Dark\Desktop\Titanium-Web-Proxy-master\Titanium-Web-Proxy-master\src\Titanium.Web.Proxy\obj\Debug\netstandard2.0\Titanium.Web.Proxy.dll = C:\Users\Dark\Desktop\Titanium-Web-Proxy-master\Titanium-Web-Proxy-master\src\Titanium.Web.Proxy\obj\Debug\netstandard2.0\Titanium.Web.Proxy.dll
|
||||
EndProjectSection
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SteamTool.Proxy.Test", "source\SteamTool.Proxy.Test\SteamTool.Proxy.Test.csproj", "{4C441E34-FA65-4425-8242-4EB767BA9B95}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SteamTool.Proxy.Test", "SteamTool.Proxy.Test\SteamTool.Proxy.Test.csproj", "{4C441E34-FA65-4425-8242-4EB767BA9B95}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SteamTool.Model", "source\SteamTool.Model\SteamTool.Model.csproj", "{BDBACE3A-0138-4930-95F6-82562EA03F7A}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SteamTool.Model", "SteamTool.Model\SteamTool.Model.csproj", "{BDBACE3A-0138-4930-95F6-82562EA03F7A}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SteamTool.SteamAPI", "source\SteamTool.SteamAPI\SteamTool.SteamAPI.csproj", "{4E66F4F4-7771-4FFA-A907-3F99A95C6A7F}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SteamTool.SteamAPI", "SteamTool.SteamAPI\SteamTool.SteamAPI.csproj", "{4E66F4F4-7771-4FFA-A907-3F99A95C6A7F}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SteamTool.Authenticator", "source\SteamTool.Authenticator\SteamTool.Authenticator.csproj", "{86F6CF23-35C4-45AD-BC0D-6BD50C03F666}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SteamTool.Authenticator", "SteamTool.Authenticator\SteamTool.Authenticator.csproj", "{86F6CF23-35C4-45AD-BC0D-6BD50C03F666}"
|
||||
Project("{C7167F0D-BC9F-4E6E-AFE1-012C56B48DB5}") = "SteamTools.UWP", "source\SteamTools.UWP\SteamTools.UWP.wapproj", "{2E755C75-E472-44E0-8AC4-F40209A60172}"
|
||||
EndProject
|
||||
Project("{C7167F0D-BC9F-4E6E-AFE1-012C56B48DB5}") = "SteamTools.UWP", "SteamTools.UWP\SteamTools.UWP.wapproj", "{2E755C75-E472-44E0-8AC4-F40209A60172}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Titanium.Web.Proxy", "references\Titanium-Web-Proxy\src\Titanium.Web.Proxy\Titanium.Web.Proxy.csproj", "{BBB75CAC-2BA3-473D-935D-0E59406F5E61}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "MetroRadiance", "MetroRadiance", "{2B74A2B2-148D-4518-BF74-3408095E920B}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MetroTrilithon.Desktop", "references\MetroRadiance\source\MetroTrilithon.Desktop\MetroTrilithon.Desktop.csproj", "{4E2EB2E0-E5FE-4FEB-A3E5-5F2F05CD1A67}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MetroRadiance.Core", "references\MetroRadiance\source\MetroRadiance.Core\MetroRadiance.Core.csproj", "{AF006EF5-D4BC-49C6-8E0E-DC2B882BE767}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MetroRadiance.Chrome", "references\MetroRadiance\source\MetroRadiance.Chrome\MetroRadiance.Chrome.csproj", "{DE0B3A58-C301-4671-8B32-4F195C9457A7}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MetroRadiance", "references\MetroRadiance\source\MetroRadiance\MetroRadiance.csproj", "{2E226B1E-80F6-448D-B02B-0A029C5BC09E}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MetroTrilithon", "references\MetroRadiance\source\MetroTrilithon\MetroTrilithon.csproj", "{2EE1744F-2D3C-4032-9A9E-C57FA3B512B3}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Debug|ARM = Debug|ARM
|
||||
Debug|ARM64 = Debug|ARM64
|
||||
Debug|x64 = Debug|x64
|
||||
Debug|x86 = Debug|x86
|
||||
Release|Any CPU = Release|Any CPU
|
||||
Release|ARM = Release|ARM
|
||||
Release|ARM64 = Release|ARM64
|
||||
Release|x64 = Release|x64
|
||||
Release|x86 = Release|x86
|
||||
发布|Any CPU = 发布|Any CPU
|
||||
发布|ARM = 发布|ARM
|
||||
发布|ARM64 = 发布|ARM64
|
||||
发布|x64 = 发布|x64
|
||||
发布|x86 = 发布|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{A70C148D-042C-48DA-9963-0B777FC60215}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{A70C148D-042C-48DA-9963-0B777FC60215}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{A70C148D-042C-48DA-9963-0B777FC60215}.Debug|ARM.ActiveCfg = Debug|Any CPU
|
||||
{A70C148D-042C-48DA-9963-0B777FC60215}.Debug|ARM.Build.0 = Debug|Any CPU
|
||||
{A70C148D-042C-48DA-9963-0B777FC60215}.Debug|ARM64.ActiveCfg = Debug|Any CPU
|
||||
{A70C148D-042C-48DA-9963-0B777FC60215}.Debug|ARM64.Build.0 = Debug|Any CPU
|
||||
{A70C148D-042C-48DA-9963-0B777FC60215}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{A70C148D-042C-48DA-9963-0B777FC60215}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{A70C148D-042C-48DA-9963-0B777FC60215}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{A70C148D-042C-48DA-9963-0B777FC60215}.Debug|x86.Build.0 = Debug|x86
|
||||
{A70C148D-042C-48DA-9963-0B777FC60215}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{A70C148D-042C-48DA-9963-0B777FC60215}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{A70C148D-042C-48DA-9963-0B777FC60215}.Release|ARM.ActiveCfg = Release|Any CPU
|
||||
{A70C148D-042C-48DA-9963-0B777FC60215}.Release|ARM.Build.0 = Release|Any CPU
|
||||
{A70C148D-042C-48DA-9963-0B777FC60215}.Release|ARM64.ActiveCfg = Release|Any CPU
|
||||
{A70C148D-042C-48DA-9963-0B777FC60215}.Release|ARM64.Build.0 = Release|Any CPU
|
||||
{A70C148D-042C-48DA-9963-0B777FC60215}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{A70C148D-042C-48DA-9963-0B777FC60215}.Release|x64.Build.0 = Release|Any CPU
|
||||
{A70C148D-042C-48DA-9963-0B777FC60215}.Release|x86.ActiveCfg = Release|x86
|
||||
{A70C148D-042C-48DA-9963-0B777FC60215}.Release|x86.Build.0 = Release|x86
|
||||
{A70C148D-042C-48DA-9963-0B777FC60215}.发布|Any CPU.ActiveCfg = 发布|Any CPU
|
||||
{A70C148D-042C-48DA-9963-0B777FC60215}.发布|Any CPU.Build.0 = 发布|Any CPU
|
||||
{A70C148D-042C-48DA-9963-0B777FC60215}.发布|ARM.ActiveCfg = 发布|Any CPU
|
||||
{A70C148D-042C-48DA-9963-0B777FC60215}.发布|ARM.Build.0 = 发布|Any CPU
|
||||
{A70C148D-042C-48DA-9963-0B777FC60215}.发布|ARM64.ActiveCfg = 发布|Any CPU
|
||||
{A70C148D-042C-48DA-9963-0B777FC60215}.发布|ARM64.Build.0 = 发布|Any CPU
|
||||
{A70C148D-042C-48DA-9963-0B777FC60215}.发布|x64.ActiveCfg = 发布|Any CPU
|
||||
{A70C148D-042C-48DA-9963-0B777FC60215}.发布|x64.Build.0 = 发布|Any CPU
|
||||
{A70C148D-042C-48DA-9963-0B777FC60215}.发布|x86.ActiveCfg = 发布|x86
|
||||
{A70C148D-042C-48DA-9963-0B777FC60215}.发布|x86.Build.0 = 发布|x86
|
||||
{2A155A7B-3DFD-4F16-929D-9693D2411B83}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{2A155A7B-3DFD-4F16-929D-9693D2411B83}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{2A155A7B-3DFD-4F16-929D-9693D2411B83}.Debug|ARM.ActiveCfg = Debug|Any CPU
|
||||
{2A155A7B-3DFD-4F16-929D-9693D2411B83}.Debug|ARM.Build.0 = Debug|Any CPU
|
||||
{2A155A7B-3DFD-4F16-929D-9693D2411B83}.Debug|ARM64.ActiveCfg = Debug|Any CPU
|
||||
{2A155A7B-3DFD-4F16-929D-9693D2411B83}.Debug|ARM64.Build.0 = Debug|Any CPU
|
||||
{2A155A7B-3DFD-4F16-929D-9693D2411B83}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{2A155A7B-3DFD-4F16-929D-9693D2411B83}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{2A155A7B-3DFD-4F16-929D-9693D2411B83}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{2A155A7B-3DFD-4F16-929D-9693D2411B83}.Debug|x86.Build.0 = Debug|x86
|
||||
{2A155A7B-3DFD-4F16-929D-9693D2411B83}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{2A155A7B-3DFD-4F16-929D-9693D2411B83}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{2A155A7B-3DFD-4F16-929D-9693D2411B83}.Release|ARM.ActiveCfg = Release|Any CPU
|
||||
{2A155A7B-3DFD-4F16-929D-9693D2411B83}.Release|ARM.Build.0 = Release|Any CPU
|
||||
{2A155A7B-3DFD-4F16-929D-9693D2411B83}.Release|ARM64.ActiveCfg = Release|Any CPU
|
||||
{2A155A7B-3DFD-4F16-929D-9693D2411B83}.Release|ARM64.Build.0 = Release|Any CPU
|
||||
{2A155A7B-3DFD-4F16-929D-9693D2411B83}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{2A155A7B-3DFD-4F16-929D-9693D2411B83}.Release|x64.Build.0 = Release|Any CPU
|
||||
{2A155A7B-3DFD-4F16-929D-9693D2411B83}.Release|x86.ActiveCfg = Release|x86
|
||||
{2A155A7B-3DFD-4F16-929D-9693D2411B83}.Release|x86.Build.0 = Release|x86
|
||||
{2A155A7B-3DFD-4F16-929D-9693D2411B83}.发布|Any CPU.ActiveCfg = 发布|Any CPU
|
||||
{2A155A7B-3DFD-4F16-929D-9693D2411B83}.发布|Any CPU.Build.0 = 发布|Any CPU
|
||||
{2A155A7B-3DFD-4F16-929D-9693D2411B83}.发布|ARM.ActiveCfg = 发布|Any CPU
|
||||
{2A155A7B-3DFD-4F16-929D-9693D2411B83}.发布|ARM.Build.0 = 发布|Any CPU
|
||||
{2A155A7B-3DFD-4F16-929D-9693D2411B83}.发布|ARM64.ActiveCfg = 发布|Any CPU
|
||||
{2A155A7B-3DFD-4F16-929D-9693D2411B83}.发布|ARM64.Build.0 = 发布|Any CPU
|
||||
{2A155A7B-3DFD-4F16-929D-9693D2411B83}.发布|x64.ActiveCfg = 发布|Any CPU
|
||||
{2A155A7B-3DFD-4F16-929D-9693D2411B83}.发布|x64.Build.0 = 发布|Any CPU
|
||||
{2A155A7B-3DFD-4F16-929D-9693D2411B83}.发布|x86.ActiveCfg = 发布|x86
|
||||
{2A155A7B-3DFD-4F16-929D-9693D2411B83}.发布|x86.Build.0 = 发布|x86
|
||||
{23E26040-19A5-4623-8863-B9ED539403B0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{23E26040-19A5-4623-8863-B9ED539403B0}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{23E26040-19A5-4623-8863-B9ED539403B0}.Debug|ARM.ActiveCfg = Debug|Any CPU
|
||||
{23E26040-19A5-4623-8863-B9ED539403B0}.Debug|ARM.Build.0 = Debug|Any CPU
|
||||
{23E26040-19A5-4623-8863-B9ED539403B0}.Debug|ARM64.ActiveCfg = Debug|Any CPU
|
||||
{23E26040-19A5-4623-8863-B9ED539403B0}.Debug|ARM64.Build.0 = Debug|Any CPU
|
||||
{23E26040-19A5-4623-8863-B9ED539403B0}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{23E26040-19A5-4623-8863-B9ED539403B0}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{23E26040-19A5-4623-8863-B9ED539403B0}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{23E26040-19A5-4623-8863-B9ED539403B0}.Debug|x86.Build.0 = Debug|x86
|
||||
{23E26040-19A5-4623-8863-B9ED539403B0}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{23E26040-19A5-4623-8863-B9ED539403B0}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{23E26040-19A5-4623-8863-B9ED539403B0}.Release|ARM.ActiveCfg = Release|Any CPU
|
||||
{23E26040-19A5-4623-8863-B9ED539403B0}.Release|ARM.Build.0 = Release|Any CPU
|
||||
{23E26040-19A5-4623-8863-B9ED539403B0}.Release|ARM64.ActiveCfg = Release|Any CPU
|
||||
{23E26040-19A5-4623-8863-B9ED539403B0}.Release|ARM64.Build.0 = Release|Any CPU
|
||||
{23E26040-19A5-4623-8863-B9ED539403B0}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{23E26040-19A5-4623-8863-B9ED539403B0}.Release|x64.Build.0 = Release|Any CPU
|
||||
{23E26040-19A5-4623-8863-B9ED539403B0}.Release|x86.ActiveCfg = Release|x86
|
||||
{23E26040-19A5-4623-8863-B9ED539403B0}.Release|x86.Build.0 = Release|x86
|
||||
{23E26040-19A5-4623-8863-B9ED539403B0}.发布|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{23E26040-19A5-4623-8863-B9ED539403B0}.发布|Any CPU.Build.0 = Release|Any CPU
|
||||
{23E26040-19A5-4623-8863-B9ED539403B0}.发布|ARM.ActiveCfg = Release|Any CPU
|
||||
{23E26040-19A5-4623-8863-B9ED539403B0}.发布|ARM.Build.0 = Release|Any CPU
|
||||
{23E26040-19A5-4623-8863-B9ED539403B0}.发布|ARM64.ActiveCfg = Release|Any CPU
|
||||
{23E26040-19A5-4623-8863-B9ED539403B0}.发布|ARM64.Build.0 = Release|Any CPU
|
||||
{23E26040-19A5-4623-8863-B9ED539403B0}.发布|x64.ActiveCfg = Release|Any CPU
|
||||
{23E26040-19A5-4623-8863-B9ED539403B0}.发布|x64.Build.0 = Release|Any CPU
|
||||
{23E26040-19A5-4623-8863-B9ED539403B0}.发布|x86.ActiveCfg = Debug|x86
|
||||
{23E26040-19A5-4623-8863-B9ED539403B0}.发布|x86.Build.0 = Debug|x86
|
||||
{0663899A-2EC5-4929-868C-9D9620FEA4FE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{0663899A-2EC5-4929-868C-9D9620FEA4FE}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{0663899A-2EC5-4929-868C-9D9620FEA4FE}.Debug|ARM.ActiveCfg = Debug|Any CPU
|
||||
{0663899A-2EC5-4929-868C-9D9620FEA4FE}.Debug|ARM.Build.0 = Debug|Any CPU
|
||||
{0663899A-2EC5-4929-868C-9D9620FEA4FE}.Debug|ARM64.ActiveCfg = Debug|Any CPU
|
||||
{0663899A-2EC5-4929-868C-9D9620FEA4FE}.Debug|ARM64.Build.0 = Debug|Any CPU
|
||||
{0663899A-2EC5-4929-868C-9D9620FEA4FE}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{0663899A-2EC5-4929-868C-9D9620FEA4FE}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{0663899A-2EC5-4929-868C-9D9620FEA4FE}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{0663899A-2EC5-4929-868C-9D9620FEA4FE}.Debug|x86.Build.0 = Debug|x86
|
||||
{0663899A-2EC5-4929-868C-9D9620FEA4FE}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{0663899A-2EC5-4929-868C-9D9620FEA4FE}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{0663899A-2EC5-4929-868C-9D9620FEA4FE}.Release|ARM.ActiveCfg = Release|Any CPU
|
||||
{0663899A-2EC5-4929-868C-9D9620FEA4FE}.Release|ARM.Build.0 = Release|Any CPU
|
||||
{0663899A-2EC5-4929-868C-9D9620FEA4FE}.Release|ARM64.ActiveCfg = Release|Any CPU
|
||||
{0663899A-2EC5-4929-868C-9D9620FEA4FE}.Release|ARM64.Build.0 = Release|Any CPU
|
||||
{0663899A-2EC5-4929-868C-9D9620FEA4FE}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{0663899A-2EC5-4929-868C-9D9620FEA4FE}.Release|x64.Build.0 = Release|Any CPU
|
||||
{0663899A-2EC5-4929-868C-9D9620FEA4FE}.Release|x86.ActiveCfg = Release|x86
|
||||
{0663899A-2EC5-4929-868C-9D9620FEA4FE}.Release|x86.Build.0 = Release|x86
|
||||
{0663899A-2EC5-4929-868C-9D9620FEA4FE}.发布|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{0663899A-2EC5-4929-868C-9D9620FEA4FE}.发布|Any CPU.Build.0 = Release|Any CPU
|
||||
{0663899A-2EC5-4929-868C-9D9620FEA4FE}.发布|ARM.ActiveCfg = Release|Any CPU
|
||||
{0663899A-2EC5-4929-868C-9D9620FEA4FE}.发布|ARM.Build.0 = Release|Any CPU
|
||||
{0663899A-2EC5-4929-868C-9D9620FEA4FE}.发布|ARM64.ActiveCfg = Release|Any CPU
|
||||
{0663899A-2EC5-4929-868C-9D9620FEA4FE}.发布|ARM64.Build.0 = Release|Any CPU
|
||||
{0663899A-2EC5-4929-868C-9D9620FEA4FE}.发布|x64.ActiveCfg = Release|Any CPU
|
||||
{0663899A-2EC5-4929-868C-9D9620FEA4FE}.发布|x64.Build.0 = Release|Any CPU
|
||||
{0663899A-2EC5-4929-868C-9D9620FEA4FE}.发布|x86.ActiveCfg = Debug|x86
|
||||
{0663899A-2EC5-4929-868C-9D9620FEA4FE}.发布|x86.Build.0 = Debug|x86
|
||||
{790D22D4-94B0-4575-8E2D-C451EC520407}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{790D22D4-94B0-4575-8E2D-C451EC520407}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{790D22D4-94B0-4575-8E2D-C451EC520407}.Debug|ARM.ActiveCfg = Debug|Any CPU
|
||||
{790D22D4-94B0-4575-8E2D-C451EC520407}.Debug|ARM64.ActiveCfg = Debug|Any CPU
|
||||
{790D22D4-94B0-4575-8E2D-C451EC520407}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{790D22D4-94B0-4575-8E2D-C451EC520407}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{790D22D4-94B0-4575-8E2D-C451EC520407}.Debug|x86.Build.0 = Debug|x86
|
||||
{790D22D4-94B0-4575-8E2D-C451EC520407}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{790D22D4-94B0-4575-8E2D-C451EC520407}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{790D22D4-94B0-4575-8E2D-C451EC520407}.Release|ARM.ActiveCfg = Release|Any CPU
|
||||
{790D22D4-94B0-4575-8E2D-C451EC520407}.Release|ARM64.ActiveCfg = Release|Any CPU
|
||||
{790D22D4-94B0-4575-8E2D-C451EC520407}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{790D22D4-94B0-4575-8E2D-C451EC520407}.Release|x86.ActiveCfg = Release|x86
|
||||
{790D22D4-94B0-4575-8E2D-C451EC520407}.Release|x86.Build.0 = Release|x86
|
||||
{790D22D4-94B0-4575-8E2D-C451EC520407}.发布|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{790D22D4-94B0-4575-8E2D-C451EC520407}.发布|Any CPU.Build.0 = Release|Any CPU
|
||||
{790D22D4-94B0-4575-8E2D-C451EC520407}.发布|ARM.ActiveCfg = Release|Any CPU
|
||||
{790D22D4-94B0-4575-8E2D-C451EC520407}.发布|ARM64.ActiveCfg = Release|Any CPU
|
||||
{790D22D4-94B0-4575-8E2D-C451EC520407}.发布|x64.ActiveCfg = Release|Any CPU
|
||||
{790D22D4-94B0-4575-8E2D-C451EC520407}.发布|x86.ActiveCfg = Debug|x86
|
||||
{790D22D4-94B0-4575-8E2D-C451EC520407}.发布|x86.Build.0 = Debug|x86
|
||||
{D4157059-D31A-4A21-AF4C-2D458F768041}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{D4157059-D31A-4A21-AF4C-2D458F768041}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{D4157059-D31A-4A21-AF4C-2D458F768041}.Debug|ARM.ActiveCfg = Debug|Any CPU
|
||||
{D4157059-D31A-4A21-AF4C-2D458F768041}.Debug|ARM.Build.0 = Debug|Any CPU
|
||||
{D4157059-D31A-4A21-AF4C-2D458F768041}.Debug|ARM64.ActiveCfg = Debug|Any CPU
|
||||
{D4157059-D31A-4A21-AF4C-2D458F768041}.Debug|ARM64.Build.0 = Debug|Any CPU
|
||||
{D4157059-D31A-4A21-AF4C-2D458F768041}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{D4157059-D31A-4A21-AF4C-2D458F768041}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{D4157059-D31A-4A21-AF4C-2D458F768041}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{D4157059-D31A-4A21-AF4C-2D458F768041}.Debug|x86.Build.0 = Debug|x86
|
||||
{D4157059-D31A-4A21-AF4C-2D458F768041}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{D4157059-D31A-4A21-AF4C-2D458F768041}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{D4157059-D31A-4A21-AF4C-2D458F768041}.Release|ARM.ActiveCfg = Release|Any CPU
|
||||
{D4157059-D31A-4A21-AF4C-2D458F768041}.Release|ARM.Build.0 = Release|Any CPU
|
||||
{D4157059-D31A-4A21-AF4C-2D458F768041}.Release|ARM64.ActiveCfg = Release|Any CPU
|
||||
{D4157059-D31A-4A21-AF4C-2D458F768041}.Release|ARM64.Build.0 = Release|Any CPU
|
||||
{D4157059-D31A-4A21-AF4C-2D458F768041}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{D4157059-D31A-4A21-AF4C-2D458F768041}.Release|x64.Build.0 = Release|Any CPU
|
||||
{D4157059-D31A-4A21-AF4C-2D458F768041}.Release|x86.ActiveCfg = Release|x86
|
||||
{D4157059-D31A-4A21-AF4C-2D458F768041}.Release|x86.Build.0 = Release|x86
|
||||
{D4157059-D31A-4A21-AF4C-2D458F768041}.发布|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{D4157059-D31A-4A21-AF4C-2D458F768041}.发布|Any CPU.Build.0 = Release|Any CPU
|
||||
{D4157059-D31A-4A21-AF4C-2D458F768041}.发布|ARM.ActiveCfg = Release|Any CPU
|
||||
{D4157059-D31A-4A21-AF4C-2D458F768041}.发布|ARM.Build.0 = Release|Any CPU
|
||||
{D4157059-D31A-4A21-AF4C-2D458F768041}.发布|ARM64.ActiveCfg = Release|Any CPU
|
||||
{D4157059-D31A-4A21-AF4C-2D458F768041}.发布|ARM64.Build.0 = Release|Any CPU
|
||||
{D4157059-D31A-4A21-AF4C-2D458F768041}.发布|x64.ActiveCfg = Release|Any CPU
|
||||
{D4157059-D31A-4A21-AF4C-2D458F768041}.发布|x64.Build.0 = Release|Any CPU
|
||||
{D4157059-D31A-4A21-AF4C-2D458F768041}.发布|x86.ActiveCfg = Debug|x86
|
||||
{D4157059-D31A-4A21-AF4C-2D458F768041}.发布|x86.Build.0 = Debug|x86
|
||||
{C03E4CF5-D68F-4CAC-B002-3A6799ED9E15}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{C03E4CF5-D68F-4CAC-B002-3A6799ED9E15}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{C03E4CF5-D68F-4CAC-B002-3A6799ED9E15}.Debug|ARM.ActiveCfg = Debug|Any CPU
|
||||
{C03E4CF5-D68F-4CAC-B002-3A6799ED9E15}.Debug|ARM64.ActiveCfg = Debug|Any CPU
|
||||
{C03E4CF5-D68F-4CAC-B002-3A6799ED9E15}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{C03E4CF5-D68F-4CAC-B002-3A6799ED9E15}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{C03E4CF5-D68F-4CAC-B002-3A6799ED9E15}.Debug|x86.Build.0 = Debug|x86
|
||||
{C03E4CF5-D68F-4CAC-B002-3A6799ED9E15}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{C03E4CF5-D68F-4CAC-B002-3A6799ED9E15}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{C03E4CF5-D68F-4CAC-B002-3A6799ED9E15}.Release|ARM.ActiveCfg = Release|Any CPU
|
||||
{C03E4CF5-D68F-4CAC-B002-3A6799ED9E15}.Release|ARM64.ActiveCfg = Release|Any CPU
|
||||
{C03E4CF5-D68F-4CAC-B002-3A6799ED9E15}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{C03E4CF5-D68F-4CAC-B002-3A6799ED9E15}.Release|x86.ActiveCfg = Release|x86
|
||||
{C03E4CF5-D68F-4CAC-B002-3A6799ED9E15}.Release|x86.Build.0 = Release|x86
|
||||
{C03E4CF5-D68F-4CAC-B002-3A6799ED9E15}.发布|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{C03E4CF5-D68F-4CAC-B002-3A6799ED9E15}.发布|Any CPU.Build.0 = Release|Any CPU
|
||||
{C03E4CF5-D68F-4CAC-B002-3A6799ED9E15}.发布|ARM.ActiveCfg = Release|Any CPU
|
||||
{C03E4CF5-D68F-4CAC-B002-3A6799ED9E15}.发布|ARM64.ActiveCfg = Release|Any CPU
|
||||
{C03E4CF5-D68F-4CAC-B002-3A6799ED9E15}.发布|x64.ActiveCfg = Release|Any CPU
|
||||
{C03E4CF5-D68F-4CAC-B002-3A6799ED9E15}.发布|x86.ActiveCfg = Debug|x86
|
||||
{C03E4CF5-D68F-4CAC-B002-3A6799ED9E15}.发布|x86.Build.0 = Debug|x86
|
||||
{4C441E34-FA65-4425-8242-4EB767BA9B95}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{4C441E34-FA65-4425-8242-4EB767BA9B95}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{4C441E34-FA65-4425-8242-4EB767BA9B95}.Debug|ARM.ActiveCfg = Debug|Any CPU
|
||||
{4C441E34-FA65-4425-8242-4EB767BA9B95}.Debug|ARM.Build.0 = Debug|Any CPU
|
||||
{4C441E34-FA65-4425-8242-4EB767BA9B95}.Debug|ARM64.ActiveCfg = Debug|Any CPU
|
||||
{4C441E34-FA65-4425-8242-4EB767BA9B95}.Debug|ARM64.Build.0 = Debug|Any CPU
|
||||
{4C441E34-FA65-4425-8242-4EB767BA9B95}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{4C441E34-FA65-4425-8242-4EB767BA9B95}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{4C441E34-FA65-4425-8242-4EB767BA9B95}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{4C441E34-FA65-4425-8242-4EB767BA9B95}.Debug|x86.Build.0 = Debug|x86
|
||||
{4C441E34-FA65-4425-8242-4EB767BA9B95}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{4C441E34-FA65-4425-8242-4EB767BA9B95}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{4C441E34-FA65-4425-8242-4EB767BA9B95}.Release|ARM.ActiveCfg = Release|Any CPU
|
||||
{4C441E34-FA65-4425-8242-4EB767BA9B95}.Release|ARM.Build.0 = Release|Any CPU
|
||||
{4C441E34-FA65-4425-8242-4EB767BA9B95}.Release|ARM64.ActiveCfg = Release|Any CPU
|
||||
{4C441E34-FA65-4425-8242-4EB767BA9B95}.Release|ARM64.Build.0 = Release|Any CPU
|
||||
{4C441E34-FA65-4425-8242-4EB767BA9B95}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{4C441E34-FA65-4425-8242-4EB767BA9B95}.Release|x64.Build.0 = Release|Any CPU
|
||||
{4C441E34-FA65-4425-8242-4EB767BA9B95}.Release|x86.ActiveCfg = Release|x86
|
||||
{4C441E34-FA65-4425-8242-4EB767BA9B95}.Release|x86.Build.0 = Release|x86
|
||||
{4C441E34-FA65-4425-8242-4EB767BA9B95}.发布|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{4C441E34-FA65-4425-8242-4EB767BA9B95}.发布|Any CPU.Build.0 = Release|Any CPU
|
||||
{4C441E34-FA65-4425-8242-4EB767BA9B95}.发布|ARM.ActiveCfg = Release|Any CPU
|
||||
{4C441E34-FA65-4425-8242-4EB767BA9B95}.发布|ARM.Build.0 = Release|Any CPU
|
||||
{4C441E34-FA65-4425-8242-4EB767BA9B95}.发布|ARM64.ActiveCfg = Release|Any CPU
|
||||
{4C441E34-FA65-4425-8242-4EB767BA9B95}.发布|ARM64.Build.0 = Release|Any CPU
|
||||
{4C441E34-FA65-4425-8242-4EB767BA9B95}.发布|x64.ActiveCfg = Release|Any CPU
|
||||
{4C441E34-FA65-4425-8242-4EB767BA9B95}.发布|x64.Build.0 = Release|Any CPU
|
||||
{4C441E34-FA65-4425-8242-4EB767BA9B95}.发布|x86.ActiveCfg = Debug|x86
|
||||
{4C441E34-FA65-4425-8242-4EB767BA9B95}.发布|x86.Build.0 = Debug|x86
|
||||
{BDBACE3A-0138-4930-95F6-82562EA03F7A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{BDBACE3A-0138-4930-95F6-82562EA03F7A}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{BDBACE3A-0138-4930-95F6-82562EA03F7A}.Debug|ARM.ActiveCfg = Debug|Any CPU
|
||||
{BDBACE3A-0138-4930-95F6-82562EA03F7A}.Debug|ARM.Build.0 = Debug|Any CPU
|
||||
{BDBACE3A-0138-4930-95F6-82562EA03F7A}.Debug|ARM64.ActiveCfg = Debug|Any CPU
|
||||
{BDBACE3A-0138-4930-95F6-82562EA03F7A}.Debug|ARM64.Build.0 = Debug|Any CPU
|
||||
{BDBACE3A-0138-4930-95F6-82562EA03F7A}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{BDBACE3A-0138-4930-95F6-82562EA03F7A}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{BDBACE3A-0138-4930-95F6-82562EA03F7A}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{BDBACE3A-0138-4930-95F6-82562EA03F7A}.Debug|x86.Build.0 = Debug|x86
|
||||
{BDBACE3A-0138-4930-95F6-82562EA03F7A}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{BDBACE3A-0138-4930-95F6-82562EA03F7A}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{BDBACE3A-0138-4930-95F6-82562EA03F7A}.Release|ARM.ActiveCfg = Release|Any CPU
|
||||
{BDBACE3A-0138-4930-95F6-82562EA03F7A}.Release|ARM.Build.0 = Release|Any CPU
|
||||
{BDBACE3A-0138-4930-95F6-82562EA03F7A}.Release|ARM64.ActiveCfg = Release|Any CPU
|
||||
{BDBACE3A-0138-4930-95F6-82562EA03F7A}.Release|ARM64.Build.0 = Release|Any CPU
|
||||
{BDBACE3A-0138-4930-95F6-82562EA03F7A}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{BDBACE3A-0138-4930-95F6-82562EA03F7A}.Release|x64.Build.0 = Release|Any CPU
|
||||
{BDBACE3A-0138-4930-95F6-82562EA03F7A}.Release|x86.ActiveCfg = Release|x86
|
||||
{BDBACE3A-0138-4930-95F6-82562EA03F7A}.Release|x86.Build.0 = Release|x86
|
||||
{BDBACE3A-0138-4930-95F6-82562EA03F7A}.发布|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{BDBACE3A-0138-4930-95F6-82562EA03F7A}.发布|Any CPU.Build.0 = Release|Any CPU
|
||||
{BDBACE3A-0138-4930-95F6-82562EA03F7A}.发布|ARM.ActiveCfg = Release|Any CPU
|
||||
{BDBACE3A-0138-4930-95F6-82562EA03F7A}.发布|ARM.Build.0 = Release|Any CPU
|
||||
{BDBACE3A-0138-4930-95F6-82562EA03F7A}.发布|ARM64.ActiveCfg = Release|Any CPU
|
||||
{BDBACE3A-0138-4930-95F6-82562EA03F7A}.发布|ARM64.Build.0 = Release|Any CPU
|
||||
{BDBACE3A-0138-4930-95F6-82562EA03F7A}.发布|x64.ActiveCfg = Release|Any CPU
|
||||
{BDBACE3A-0138-4930-95F6-82562EA03F7A}.发布|x64.Build.0 = Release|Any CPU
|
||||
{BDBACE3A-0138-4930-95F6-82562EA03F7A}.发布|x86.ActiveCfg = Debug|x86
|
||||
{BDBACE3A-0138-4930-95F6-82562EA03F7A}.发布|x86.Build.0 = Debug|x86
|
||||
{4E66F4F4-7771-4FFA-A907-3F99A95C6A7F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{4E66F4F4-7771-4FFA-A907-3F99A95C6A7F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{4E66F4F4-7771-4FFA-A907-3F99A95C6A7F}.Debug|ARM.ActiveCfg = Debug|Any CPU
|
||||
{4E66F4F4-7771-4FFA-A907-3F99A95C6A7F}.Debug|ARM.Build.0 = Debug|Any CPU
|
||||
{4E66F4F4-7771-4FFA-A907-3F99A95C6A7F}.Debug|ARM64.ActiveCfg = Debug|Any CPU
|
||||
{4E66F4F4-7771-4FFA-A907-3F99A95C6A7F}.Debug|ARM64.Build.0 = Debug|Any CPU
|
||||
{4E66F4F4-7771-4FFA-A907-3F99A95C6A7F}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{4E66F4F4-7771-4FFA-A907-3F99A95C6A7F}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{4E66F4F4-7771-4FFA-A907-3F99A95C6A7F}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{4E66F4F4-7771-4FFA-A907-3F99A95C6A7F}.Debug|x86.Build.0 = Debug|x86
|
||||
{4E66F4F4-7771-4FFA-A907-3F99A95C6A7F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{4E66F4F4-7771-4FFA-A907-3F99A95C6A7F}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{4E66F4F4-7771-4FFA-A907-3F99A95C6A7F}.Release|ARM.ActiveCfg = Release|Any CPU
|
||||
{4E66F4F4-7771-4FFA-A907-3F99A95C6A7F}.Release|ARM.Build.0 = Release|Any CPU
|
||||
{4E66F4F4-7771-4FFA-A907-3F99A95C6A7F}.Release|ARM64.ActiveCfg = Release|Any CPU
|
||||
{4E66F4F4-7771-4FFA-A907-3F99A95C6A7F}.Release|ARM64.Build.0 = Release|Any CPU
|
||||
{4E66F4F4-7771-4FFA-A907-3F99A95C6A7F}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{4E66F4F4-7771-4FFA-A907-3F99A95C6A7F}.Release|x64.Build.0 = Release|Any CPU
|
||||
{4E66F4F4-7771-4FFA-A907-3F99A95C6A7F}.Release|x86.ActiveCfg = Release|x86
|
||||
{4E66F4F4-7771-4FFA-A907-3F99A95C6A7F}.Release|x86.Build.0 = Release|x86
|
||||
{4E66F4F4-7771-4FFA-A907-3F99A95C6A7F}.发布|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{4E66F4F4-7771-4FFA-A907-3F99A95C6A7F}.发布|Any CPU.Build.0 = Debug|Any CPU
|
||||
{4E66F4F4-7771-4FFA-A907-3F99A95C6A7F}.发布|ARM.ActiveCfg = Release|Any CPU
|
||||
{4E66F4F4-7771-4FFA-A907-3F99A95C6A7F}.发布|ARM.Build.0 = Release|Any CPU
|
||||
{4E66F4F4-7771-4FFA-A907-3F99A95C6A7F}.发布|ARM64.ActiveCfg = Release|Any CPU
|
||||
{4E66F4F4-7771-4FFA-A907-3F99A95C6A7F}.发布|ARM64.Build.0 = Release|Any CPU
|
||||
{4E66F4F4-7771-4FFA-A907-3F99A95C6A7F}.发布|x64.ActiveCfg = Release|Any CPU
|
||||
{4E66F4F4-7771-4FFA-A907-3F99A95C6A7F}.发布|x64.Build.0 = Release|Any CPU
|
||||
{4E66F4F4-7771-4FFA-A907-3F99A95C6A7F}.发布|x86.ActiveCfg = Debug|x86
|
||||
{4E66F4F4-7771-4FFA-A907-3F99A95C6A7F}.发布|x86.Build.0 = Debug|x86
|
||||
{86F6CF23-35C4-45AD-BC0D-6BD50C03F666}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{86F6CF23-35C4-45AD-BC0D-6BD50C03F666}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{86F6CF23-35C4-45AD-BC0D-6BD50C03F666}.Debug|ARM.ActiveCfg = Debug|Any CPU
|
||||
{86F6CF23-35C4-45AD-BC0D-6BD50C03F666}.Debug|ARM.Build.0 = Debug|Any CPU
|
||||
{86F6CF23-35C4-45AD-BC0D-6BD50C03F666}.Debug|ARM64.ActiveCfg = Debug|Any CPU
|
||||
{86F6CF23-35C4-45AD-BC0D-6BD50C03F666}.Debug|ARM64.Build.0 = Debug|Any CPU
|
||||
{86F6CF23-35C4-45AD-BC0D-6BD50C03F666}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{86F6CF23-35C4-45AD-BC0D-6BD50C03F666}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{86F6CF23-35C4-45AD-BC0D-6BD50C03F666}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{86F6CF23-35C4-45AD-BC0D-6BD50C03F666}.Debug|x86.Build.0 = Debug|x86
|
||||
{86F6CF23-35C4-45AD-BC0D-6BD50C03F666}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{86F6CF23-35C4-45AD-BC0D-6BD50C03F666}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{86F6CF23-35C4-45AD-BC0D-6BD50C03F666}.Release|ARM.ActiveCfg = Release|Any CPU
|
||||
{86F6CF23-35C4-45AD-BC0D-6BD50C03F666}.Release|ARM.Build.0 = Release|Any CPU
|
||||
{86F6CF23-35C4-45AD-BC0D-6BD50C03F666}.Release|ARM64.ActiveCfg = Release|Any CPU
|
||||
{86F6CF23-35C4-45AD-BC0D-6BD50C03F666}.Release|ARM64.Build.0 = Release|Any CPU
|
||||
{86F6CF23-35C4-45AD-BC0D-6BD50C03F666}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{86F6CF23-35C4-45AD-BC0D-6BD50C03F666}.Release|x64.Build.0 = Release|Any CPU
|
||||
{86F6CF23-35C4-45AD-BC0D-6BD50C03F666}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{86F6CF23-35C4-45AD-BC0D-6BD50C03F666}.Release|x86.Build.0 = Release|Any CPU
|
||||
{86F6CF23-35C4-45AD-BC0D-6BD50C03F666}.发布|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{86F6CF23-35C4-45AD-BC0D-6BD50C03F666}.发布|Any CPU.Build.0 = Debug|Any CPU
|
||||
{86F6CF23-35C4-45AD-BC0D-6BD50C03F666}.发布|ARM.ActiveCfg = Release|Any CPU
|
||||
{86F6CF23-35C4-45AD-BC0D-6BD50C03F666}.发布|ARM.Build.0 = Release|Any CPU
|
||||
{86F6CF23-35C4-45AD-BC0D-6BD50C03F666}.发布|ARM64.ActiveCfg = Release|Any CPU
|
||||
{86F6CF23-35C4-45AD-BC0D-6BD50C03F666}.发布|ARM64.Build.0 = Release|Any CPU
|
||||
{86F6CF23-35C4-45AD-BC0D-6BD50C03F666}.发布|x64.ActiveCfg = Release|Any CPU
|
||||
{86F6CF23-35C4-45AD-BC0D-6BD50C03F666}.发布|x64.Build.0 = Release|Any CPU
|
||||
{86F6CF23-35C4-45AD-BC0D-6BD50C03F666}.发布|x86.ActiveCfg = Debug|Any CPU
|
||||
{86F6CF23-35C4-45AD-BC0D-6BD50C03F666}.发布|x86.Build.0 = Debug|Any CPU
|
||||
{2E755C75-E472-44E0-8AC4-F40209A60172}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{2E755C75-E472-44E0-8AC4-F40209A60172}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{2E755C75-E472-44E0-8AC4-F40209A60172}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
|
||||
{2E755C75-E472-44E0-8AC4-F40209A60172}.Debug|ARM.ActiveCfg = Debug|ARM
|
||||
{2E755C75-E472-44E0-8AC4-F40209A60172}.Debug|ARM.Build.0 = Debug|ARM
|
||||
{2E755C75-E472-44E0-8AC4-F40209A60172}.Debug|ARM.Deploy.0 = Debug|ARM
|
||||
{2E755C75-E472-44E0-8AC4-F40209A60172}.Debug|ARM64.ActiveCfg = Debug|ARM64
|
||||
{2E755C75-E472-44E0-8AC4-F40209A60172}.Debug|ARM64.Build.0 = Debug|ARM64
|
||||
{2E755C75-E472-44E0-8AC4-F40209A60172}.Debug|ARM64.Deploy.0 = Debug|ARM64
|
||||
{2E755C75-E472-44E0-8AC4-F40209A60172}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{2E755C75-E472-44E0-8AC4-F40209A60172}.Debug|x64.Build.0 = Debug|x64
|
||||
{2E755C75-E472-44E0-8AC4-F40209A60172}.Debug|x64.Deploy.0 = Debug|x64
|
||||
@@ -392,33 +199,84 @@ Global
|
||||
{2E755C75-E472-44E0-8AC4-F40209A60172}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{2E755C75-E472-44E0-8AC4-F40209A60172}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{2E755C75-E472-44E0-8AC4-F40209A60172}.Release|Any CPU.Deploy.0 = Release|Any CPU
|
||||
{2E755C75-E472-44E0-8AC4-F40209A60172}.Release|ARM.ActiveCfg = Release|ARM
|
||||
{2E755C75-E472-44E0-8AC4-F40209A60172}.Release|ARM.Build.0 = Release|ARM
|
||||
{2E755C75-E472-44E0-8AC4-F40209A60172}.Release|ARM.Deploy.0 = Release|ARM
|
||||
{2E755C75-E472-44E0-8AC4-F40209A60172}.Release|ARM64.ActiveCfg = Release|ARM64
|
||||
{2E755C75-E472-44E0-8AC4-F40209A60172}.Release|ARM64.Build.0 = Release|ARM64
|
||||
{2E755C75-E472-44E0-8AC4-F40209A60172}.Release|ARM64.Deploy.0 = Release|ARM64
|
||||
{2E755C75-E472-44E0-8AC4-F40209A60172}.Release|x64.ActiveCfg = Release|x64
|
||||
{2E755C75-E472-44E0-8AC4-F40209A60172}.Release|x64.Build.0 = Release|x64
|
||||
{2E755C75-E472-44E0-8AC4-F40209A60172}.Release|x64.Deploy.0 = Release|x64
|
||||
{2E755C75-E472-44E0-8AC4-F40209A60172}.Release|x86.ActiveCfg = Release|x86
|
||||
{2E755C75-E472-44E0-8AC4-F40209A60172}.Release|x86.Build.0 = Release|x86
|
||||
{2E755C75-E472-44E0-8AC4-F40209A60172}.Release|x86.Deploy.0 = Release|x86
|
||||
{2E755C75-E472-44E0-8AC4-F40209A60172}.发布|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{2E755C75-E472-44E0-8AC4-F40209A60172}.发布|Any CPU.Build.0 = Release|Any CPU
|
||||
{2E755C75-E472-44E0-8AC4-F40209A60172}.发布|Any CPU.Deploy.0 = Release|Any CPU
|
||||
{2E755C75-E472-44E0-8AC4-F40209A60172}.发布|ARM.ActiveCfg = Debug|ARM
|
||||
{2E755C75-E472-44E0-8AC4-F40209A60172}.发布|ARM.Build.0 = Debug|ARM
|
||||
{2E755C75-E472-44E0-8AC4-F40209A60172}.发布|ARM.Deploy.0 = Debug|ARM
|
||||
{2E755C75-E472-44E0-8AC4-F40209A60172}.发布|ARM64.ActiveCfg = Debug|ARM64
|
||||
{2E755C75-E472-44E0-8AC4-F40209A60172}.发布|ARM64.Build.0 = Debug|ARM64
|
||||
{2E755C75-E472-44E0-8AC4-F40209A60172}.发布|ARM64.Deploy.0 = Debug|ARM64
|
||||
{2E755C75-E472-44E0-8AC4-F40209A60172}.发布|x64.ActiveCfg = Debug|x64
|
||||
{2E755C75-E472-44E0-8AC4-F40209A60172}.发布|x64.Build.0 = Debug|x64
|
||||
{2E755C75-E472-44E0-8AC4-F40209A60172}.发布|x64.Deploy.0 = Debug|x64
|
||||
{2E755C75-E472-44E0-8AC4-F40209A60172}.发布|x86.ActiveCfg = Debug|x86
|
||||
{2E755C75-E472-44E0-8AC4-F40209A60172}.发布|x86.Build.0 = Debug|x86
|
||||
{2E755C75-E472-44E0-8AC4-F40209A60172}.发布|x86.Deploy.0 = Debug|x86
|
||||
{BBB75CAC-2BA3-473D-935D-0E59406F5E61}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{BBB75CAC-2BA3-473D-935D-0E59406F5E61}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{BBB75CAC-2BA3-473D-935D-0E59406F5E61}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{BBB75CAC-2BA3-473D-935D-0E59406F5E61}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{BBB75CAC-2BA3-473D-935D-0E59406F5E61}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{BBB75CAC-2BA3-473D-935D-0E59406F5E61}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{BBB75CAC-2BA3-473D-935D-0E59406F5E61}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{BBB75CAC-2BA3-473D-935D-0E59406F5E61}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{BBB75CAC-2BA3-473D-935D-0E59406F5E61}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{BBB75CAC-2BA3-473D-935D-0E59406F5E61}.Release|x64.Build.0 = Release|Any CPU
|
||||
{BBB75CAC-2BA3-473D-935D-0E59406F5E61}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{BBB75CAC-2BA3-473D-935D-0E59406F5E61}.Release|x86.Build.0 = Release|Any CPU
|
||||
{4E2EB2E0-E5FE-4FEB-A3E5-5F2F05CD1A67}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{4E2EB2E0-E5FE-4FEB-A3E5-5F2F05CD1A67}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{4E2EB2E0-E5FE-4FEB-A3E5-5F2F05CD1A67}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{4E2EB2E0-E5FE-4FEB-A3E5-5F2F05CD1A67}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{4E2EB2E0-E5FE-4FEB-A3E5-5F2F05CD1A67}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{4E2EB2E0-E5FE-4FEB-A3E5-5F2F05CD1A67}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{4E2EB2E0-E5FE-4FEB-A3E5-5F2F05CD1A67}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{4E2EB2E0-E5FE-4FEB-A3E5-5F2F05CD1A67}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{4E2EB2E0-E5FE-4FEB-A3E5-5F2F05CD1A67}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{4E2EB2E0-E5FE-4FEB-A3E5-5F2F05CD1A67}.Release|x64.Build.0 = Release|Any CPU
|
||||
{4E2EB2E0-E5FE-4FEB-A3E5-5F2F05CD1A67}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{4E2EB2E0-E5FE-4FEB-A3E5-5F2F05CD1A67}.Release|x86.Build.0 = Release|Any CPU
|
||||
{AF006EF5-D4BC-49C6-8E0E-DC2B882BE767}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{AF006EF5-D4BC-49C6-8E0E-DC2B882BE767}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{AF006EF5-D4BC-49C6-8E0E-DC2B882BE767}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{AF006EF5-D4BC-49C6-8E0E-DC2B882BE767}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{AF006EF5-D4BC-49C6-8E0E-DC2B882BE767}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{AF006EF5-D4BC-49C6-8E0E-DC2B882BE767}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{AF006EF5-D4BC-49C6-8E0E-DC2B882BE767}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{AF006EF5-D4BC-49C6-8E0E-DC2B882BE767}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{AF006EF5-D4BC-49C6-8E0E-DC2B882BE767}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{AF006EF5-D4BC-49C6-8E0E-DC2B882BE767}.Release|x64.Build.0 = Release|Any CPU
|
||||
{AF006EF5-D4BC-49C6-8E0E-DC2B882BE767}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{AF006EF5-D4BC-49C6-8E0E-DC2B882BE767}.Release|x86.Build.0 = Release|Any CPU
|
||||
{DE0B3A58-C301-4671-8B32-4F195C9457A7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{DE0B3A58-C301-4671-8B32-4F195C9457A7}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{DE0B3A58-C301-4671-8B32-4F195C9457A7}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{DE0B3A58-C301-4671-8B32-4F195C9457A7}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{DE0B3A58-C301-4671-8B32-4F195C9457A7}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{DE0B3A58-C301-4671-8B32-4F195C9457A7}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{DE0B3A58-C301-4671-8B32-4F195C9457A7}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{DE0B3A58-C301-4671-8B32-4F195C9457A7}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{DE0B3A58-C301-4671-8B32-4F195C9457A7}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{DE0B3A58-C301-4671-8B32-4F195C9457A7}.Release|x64.Build.0 = Release|Any CPU
|
||||
{DE0B3A58-C301-4671-8B32-4F195C9457A7}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{DE0B3A58-C301-4671-8B32-4F195C9457A7}.Release|x86.Build.0 = Release|Any CPU
|
||||
{2E226B1E-80F6-448D-B02B-0A029C5BC09E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{2E226B1E-80F6-448D-B02B-0A029C5BC09E}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{2E226B1E-80F6-448D-B02B-0A029C5BC09E}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{2E226B1E-80F6-448D-B02B-0A029C5BC09E}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{2E226B1E-80F6-448D-B02B-0A029C5BC09E}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{2E226B1E-80F6-448D-B02B-0A029C5BC09E}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{2E226B1E-80F6-448D-B02B-0A029C5BC09E}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{2E226B1E-80F6-448D-B02B-0A029C5BC09E}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{2E226B1E-80F6-448D-B02B-0A029C5BC09E}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{2E226B1E-80F6-448D-B02B-0A029C5BC09E}.Release|x64.Build.0 = Release|Any CPU
|
||||
{2E226B1E-80F6-448D-B02B-0A029C5BC09E}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{2E226B1E-80F6-448D-B02B-0A029C5BC09E}.Release|x86.Build.0 = Release|Any CPU
|
||||
{2EE1744F-2D3C-4032-9A9E-C57FA3B512B3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{2EE1744F-2D3C-4032-9A9E-C57FA3B512B3}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{2EE1744F-2D3C-4032-9A9E-C57FA3B512B3}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{2EE1744F-2D3C-4032-9A9E-C57FA3B512B3}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{2EE1744F-2D3C-4032-9A9E-C57FA3B512B3}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{2EE1744F-2D3C-4032-9A9E-C57FA3B512B3}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{2EE1744F-2D3C-4032-9A9E-C57FA3B512B3}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{2EE1744F-2D3C-4032-9A9E-C57FA3B512B3}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{2EE1744F-2D3C-4032-9A9E-C57FA3B512B3}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{2EE1744F-2D3C-4032-9A9E-C57FA3B512B3}.Release|x64.Build.0 = Release|Any CPU
|
||||
{2EE1744F-2D3C-4032-9A9E-C57FA3B512B3}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{2EE1744F-2D3C-4032-9A9E-C57FA3B512B3}.Release|x86.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
@@ -436,6 +294,13 @@ Global
|
||||
{4E66F4F4-7771-4FFA-A907-3F99A95C6A7F} = {F62E508E-B374-4149-B9AC-0A8090AA6CD1}
|
||||
{86F6CF23-35C4-45AD-BC0D-6BD50C03F666} = {F62E508E-B374-4149-B9AC-0A8090AA6CD1}
|
||||
{2E755C75-E472-44E0-8AC4-F40209A60172} = {45E5B6B2-0A6D-4D57-804B-7B8313145B62}
|
||||
{BBB75CAC-2BA3-473D-935D-0E59406F5E61} = {F62E508E-B374-4149-B9AC-0A8090AA6CD1}
|
||||
{2B74A2B2-148D-4518-BF74-3408095E920B} = {F62E508E-B374-4149-B9AC-0A8090AA6CD1}
|
||||
{4E2EB2E0-E5FE-4FEB-A3E5-5F2F05CD1A67} = {2B74A2B2-148D-4518-BF74-3408095E920B}
|
||||
{AF006EF5-D4BC-49C6-8E0E-DC2B882BE767} = {2B74A2B2-148D-4518-BF74-3408095E920B}
|
||||
{DE0B3A58-C301-4671-8B32-4F195C9457A7} = {2B74A2B2-148D-4518-BF74-3408095E920B}
|
||||
{2E226B1E-80F6-448D-B02B-0A029C5BC09E} = {2B74A2B2-148D-4518-BF74-3408095E920B}
|
||||
{2EE1744F-2D3C-4032-9A9E-C57FA3B512B3} = {2B74A2B2-148D-4518-BF74-3408095E920B}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {5214732D-5A99-44C5-9F02-56348CC457EF}
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
using MetroTrilithon.Serialization;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SteamTools.Models.Settings
|
||||
{
|
||||
public static class AuthSettings
|
||||
{
|
||||
/// <summary>
|
||||
/// ÁîÅÆÊý¾Ý(ѹËõ´æ´¢£©
|
||||
/// </summary>
|
||||
public static SerializableProperty<string> Authenticators { get; }
|
||||
= new SerializableProperty<string>(GetKey(), Providers.Local) { AutoSave = true };
|
||||
|
||||
|
||||
private static string GetKey([CallerMemberName] string propertyName = "")
|
||||
{
|
||||
return nameof(GeneralSettings) + "." + propertyName;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
using SteamTool.Core.Common;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SteamTools
|
||||
{
|
||||
static class Program
|
||||
{
|
||||
/// <summary>
|
||||
/// 应用程序的主入口点。
|
||||
/// </summary>
|
||||
[STAThread]
|
||||
static void Main(string[] args)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (args.ContainsArg("-log"))
|
||||
{
|
||||
Logger.EnableTextLog = true;
|
||||
}
|
||||
App app = new App();
|
||||
app.InitializeComponent();
|
||||
app.Run();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.Error(ex);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
{
|
||||
"profiles": {
|
||||
"SteamTools": {
|
||||
"commandName": "Project",
|
||||
"commandLineArgs": "-log"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 106 KiB |
|
Before Width: | Height: | Size: 510 B |
@@ -1,120 +0,0 @@
|
||||
using SteamTool.Core;
|
||||
using SteamTool.Model;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Newtonsoft.Json;
|
||||
using SteamTool.Model.ToolModel;
|
||||
using SteamTools.Models;
|
||||
using SteamTool.Core.Common;
|
||||
using System.Net;
|
||||
using System.IO;
|
||||
using Livet;
|
||||
using SteamTools.Properties;
|
||||
|
||||
namespace SteamTools.Services
|
||||
{
|
||||
public class AutoUpdateService : NotificationObject
|
||||
{
|
||||
#region static members
|
||||
public static AutoUpdateService Current { get; } = new AutoUpdateService();
|
||||
#endregion
|
||||
|
||||
private readonly HttpServices httpServices = SteamToolCore.Instance.Get<HttpServices>();
|
||||
|
||||
#region 更新进度变更通知
|
||||
private double _ProgressValue;
|
||||
public double ProgressValue
|
||||
{
|
||||
get => this._ProgressValue;
|
||||
set
|
||||
{
|
||||
if (this._ProgressValue != value)
|
||||
{
|
||||
this._ProgressValue = value;
|
||||
this.RaisePropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 是否有更新
|
||||
private bool _IsExistUpdate;
|
||||
public bool IsExistUpdate
|
||||
{
|
||||
get => this._IsExistUpdate;
|
||||
set
|
||||
{
|
||||
if (this._IsExistUpdate != value)
|
||||
{
|
||||
this._IsExistUpdate = value;
|
||||
this.RaisePropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
public async void CheckUpdate()
|
||||
{
|
||||
try
|
||||
{
|
||||
StatusService.Current.Notify("正在从Github检查更新...");
|
||||
var result = await httpServices.Get(Const.GITHUB_LATEST_RELEASEAPI_URL);
|
||||
var model = JsonConvert.DeserializeObject<GithubReleaseModel>(result);
|
||||
if (!(ProductInfo.Version < model.version))
|
||||
{
|
||||
IsExistUpdate = false;
|
||||
StatusService.Current.Notify("当前已是最新版本");
|
||||
return;
|
||||
}
|
||||
IsExistUpdate = true;
|
||||
DownloadUpdate(model);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.Error("更新出错:", ex);
|
||||
WindowService.Current.ShowDialogWindow($"更新出错:{ex.Message}");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
public async void DownloadUpdate(GithubReleaseModel model)
|
||||
{
|
||||
if (WindowService.Current.MainWindow.Dialog($"检测到新版本更新内容:{model.body}\r\n是否立即更新?", $"{ProductInfo.Title} | 更新提示") == true)
|
||||
{
|
||||
//var name = model.assets.FirstOrDefault()?.name;
|
||||
var name = Path.Combine(AppContext.BaseDirectory, @$"{ProductInfo.Title} {model.version}.zip");
|
||||
if (File.Exists(name))
|
||||
{
|
||||
StatusService.Current.Notify("更新文件已经存在,不需要下载");
|
||||
return;
|
||||
}
|
||||
var fileReq = WebRequest.Create(model.assets.FirstOrDefault()?.browser_download_url);
|
||||
await fileReq?.GetResponseAsync().ContinueWith(s =>
|
||||
{
|
||||
long totalBytes = s.Result.ContentLength;
|
||||
using Stream responseStream = s.Result.GetResponseStream();
|
||||
using FileStream fileStream = new FileStream(name, FileMode.Create, FileAccess.Write);
|
||||
long totalDownloadBytes = 0;
|
||||
byte[] bs = new byte[4096];
|
||||
int size = responseStream.Read(bs, 0, bs.Length);
|
||||
while (size > 0)
|
||||
{
|
||||
totalDownloadBytes += size;
|
||||
fileStream.Write(bs, 0, size);
|
||||
ProgressValue = ((double)totalDownloadBytes / (double)totalBytes);
|
||||
StatusService.Current.Set($"下载更新{ProgressValue:P}");
|
||||
size = responseStream.Read(bs, 0, bs.Length);
|
||||
}
|
||||
fileStream.Flush();
|
||||
fileStream.Close();
|
||||
StatusService.Current.Set(Resources.Ready);
|
||||
StatusService.Current.Notify($"{ProductInfo.Title} {model.version}版本已经下载到程序根目录下,暂时请手动替换更新");
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,164 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Livet;
|
||||
using SteamTool.Core.Common;
|
||||
using SteamTool.Model;
|
||||
using SteamTool.Steam.Service;
|
||||
using SteamTool.Steam.Service.Local;
|
||||
using SteamTool.Steam.Service.Web;
|
||||
using SteamTools.Properties;
|
||||
using SteamTools.ViewModels;
|
||||
|
||||
namespace SteamTools.Services
|
||||
{
|
||||
public class SteamConnectService : NotificationObject
|
||||
{
|
||||
#region static members
|
||||
public static SteamConnectService Current { get; } = new SteamConnectService();
|
||||
#endregion
|
||||
|
||||
//public readonly SteamDLLService DLLService = SteamService.Instance.Get<SteamDLLService>();
|
||||
public readonly SteamworksApiService ApiService = SteamService.Instance.Get<SteamworksApiService>();
|
||||
|
||||
public readonly SteamworksWebApiService SteamworksWebApiService = SteamService.Instance.Get<SteamworksWebApiService>();
|
||||
public readonly SteamDbApiService steamDbApiService = SteamService.Instance.Get<SteamDbApiService>();
|
||||
|
||||
#region Steam游戏列表
|
||||
private IReadOnlyCollection<SteamApp> _SteamApps;
|
||||
public IReadOnlyCollection<SteamApp> SteamApps
|
||||
{
|
||||
get => _SteamApps;
|
||||
set
|
||||
{
|
||||
if (_SteamApps != value)
|
||||
{
|
||||
_SteamApps = value;
|
||||
this.RaisePropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 运行中的游戏列表
|
||||
private IList<SteamApp> _RuningSteamApps = new List<SteamApp>();
|
||||
public IList<SteamApp> RuningSteamApps
|
||||
{
|
||||
get => _RuningSteamApps;
|
||||
set
|
||||
{
|
||||
if (_RuningSteamApps != value)
|
||||
{
|
||||
_RuningSteamApps = value;
|
||||
this.RaisePropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 当前steam登录用户
|
||||
private SteamUser _CurrentSteamUser;
|
||||
public SteamUser CurrentSteamUser
|
||||
{
|
||||
get => _CurrentSteamUser;
|
||||
set
|
||||
{
|
||||
if (_CurrentSteamUser != value)
|
||||
{
|
||||
_CurrentSteamUser = value;
|
||||
this.RaisePropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 连接steamclient是否成功
|
||||
private bool _IsConnectToSteam;
|
||||
public bool IsConnectToSteam
|
||||
{
|
||||
get => _IsConnectToSteam;
|
||||
set
|
||||
{
|
||||
if (_IsConnectToSteam != value)
|
||||
{
|
||||
_IsConnectToSteam = value;
|
||||
this.RaisePropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
public void Initialize()
|
||||
{
|
||||
var t = new Task(async () =>
|
||||
{
|
||||
Thread.CurrentThread.IsBackground = true;
|
||||
while (true)
|
||||
{
|
||||
if (Process.GetProcessesByName("steam").Length > 0)
|
||||
{
|
||||
if (!IsConnectToSteam)
|
||||
{
|
||||
if (ApiService.Initialize())
|
||||
{
|
||||
var id = ApiService.GetSteamId64();
|
||||
if (id == 76561197960265728)
|
||||
{
|
||||
//该64位id的steamID3等于0,是steam未获取到当前登录用户的默认返回值,所以直接重新获取,
|
||||
//希望这位用户不会用steam++,嗯...
|
||||
ApiService.SteamClient.Dispose();
|
||||
continue;
|
||||
}
|
||||
IsConnectToSteam = true;
|
||||
CurrentSteamUser = await steamDbApiService.GetUserInfo(id);
|
||||
CurrentSteamUser.IPCountry = ApiService.GetIPCountry();
|
||||
|
||||
var mainViewModel = (WindowService.Current.MainWindow as MainWindowViewModel);
|
||||
await mainViewModel.SteamAppPage.Initialize();
|
||||
#if DEBUG
|
||||
await mainViewModel.SystemTabItems[mainViewModel.SystemTabItems.Count - 1].Initialize();
|
||||
#endif
|
||||
SteamConnectService.Current.DisposeSteamClient();
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
IsConnectToSteam = false;
|
||||
//StatusService.Current.Notify(Resources.Steam_Not_Runing);
|
||||
}
|
||||
await Task.Delay(1500);
|
||||
}
|
||||
}, TaskCreationOptions.LongRunning);
|
||||
|
||||
t.ContinueWith(s => { Logger.Error(s.Exception); WindowService.Current.ShowDialogWindow(s.Exception.Message); }, TaskContinuationOptions.OnlyOnFaulted);
|
||||
t.Start();
|
||||
}
|
||||
|
||||
public void Initialize(int appid)
|
||||
{
|
||||
if (Process.GetProcessesByName("steam").Length > 0)
|
||||
{
|
||||
IsConnectToSteam = ApiService.Initialize(appid);
|
||||
}
|
||||
}
|
||||
|
||||
public void Shutdown()
|
||||
{
|
||||
foreach (var app in SteamConnectService.Current.RuningSteamApps)
|
||||
{
|
||||
if (!app.Process.HasExited)
|
||||
app.Process.Kill();
|
||||
}
|
||||
}
|
||||
|
||||
public void DisposeSteamClient()
|
||||
{
|
||||
ApiService.SteamClient.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,70 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Input;
|
||||
using System.Windows;
|
||||
using SteamTools.Win32;
|
||||
using MetroRadiance.Interop.Win32;
|
||||
using System.Diagnostics;
|
||||
using SteamTool.Core.Common;
|
||||
using System.Runtime.InteropServices;
|
||||
using SteamTools.Services;
|
||||
using SteamTool.Steam.Service.Web;
|
||||
using SteamTool.Core;
|
||||
using SteamTool.Steam.Service;
|
||||
using SteamTool.Model;
|
||||
using Newtonsoft.Json;
|
||||
using SteamTools.Models.Settings;
|
||||
using System.IO;
|
||||
|
||||
namespace SteamTools.ViewModels
|
||||
{
|
||||
public class SettingsGeneralViewModel : Livet.ViewModel
|
||||
{
|
||||
private SteamworksWebApiService SteamworksWebApi => SteamService.Instance.Get<SteamworksWebApiService>();
|
||||
private SteamToolService SteamTool => SteamToolCore.Instance.Get<SteamToolService>();
|
||||
|
||||
private bool IsRefreshGameListCache;
|
||||
|
||||
public void RefreshGameListCache()
|
||||
{
|
||||
if (SteamConnectService.Current.IsConnectToSteam)
|
||||
{
|
||||
if (IsRefreshGameListCache)
|
||||
{
|
||||
StatusService.Current.Notify("正在下载Steam游戏数据中...");
|
||||
return;
|
||||
}
|
||||
StatusService.Current.Notify("刷新Steam游戏数据");
|
||||
IsRefreshGameListCache = true;
|
||||
Task.Run(async () =>
|
||||
{
|
||||
var result = await SteamworksWebApi.GetAllSteamAppsString();
|
||||
if (GeneralSettings.IsSteamAppListLocalCache)
|
||||
SteamTool.UpdateAppListJson(result, Path.Combine(AppContext.BaseDirectory, Const.APP_LIST_FILE));
|
||||
var apps = JsonConvert.DeserializeObject<SteamApps>(result).AppList.Apps;
|
||||
apps = apps.DistinctBy(d => d.AppId).ToList();
|
||||
//SteamConnectService.Current.SteamApps = apps;
|
||||
SteamConnectService.Current.SteamApps = SteamConnectService.Current.ApiService.OwnsApps(apps);
|
||||
}).ContinueWith(s => { Logger.Error(s.Exception); WindowService.Current.ShowDialogWindow(s.Exception.Message); }, TaskContinuationOptions.OnlyOnFaulted).ContinueWith(s =>
|
||||
{
|
||||
StatusService.Current.Notify("刷新Steam游戏数据完成");
|
||||
IsRefreshGameListCache = false;
|
||||
s.Dispose();
|
||||
});
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
StatusService.Current.Notify("未检测到Steam运行");
|
||||
}
|
||||
}
|
||||
|
||||
public void CheckUpdate_Click()
|
||||
{
|
||||
AutoUpdateService.Current.CheckUpdate();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SteamTools.ViewModels
|
||||
{
|
||||
public class SteamIdlePageViewModel : TabItemViewModel
|
||||
{
|
||||
|
||||
public override string Name
|
||||
{
|
||||
get { return Properties.Resources.IdleCard; }
|
||||
protected set { throw new NotImplementedException(); }
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
using Microsoft.Win32;
|
||||
using SteamTools.Models;
|
||||
using SteamTools.Models.Settings;
|
||||
using SteamTools.Properties;
|
||||
using SteamTools.Services;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using SteamTool.Core.Common;
|
||||
using System.Threading.Tasks;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using WinAuth;
|
||||
|
||||
namespace SteamTools.ViewModels
|
||||
{
|
||||
public class AuthTradeWindowViewModel : MainWindowViewModelBase
|
||||
{
|
||||
private SteamAuthenticator _Authenticator;
|
||||
|
||||
public AuthTradeWindowViewModel()
|
||||
{
|
||||
this.Title = ProductInfo.Title + " | " + Resources.Auth_TradeTitle;
|
||||
}
|
||||
|
||||
public AuthTradeWindowViewModel(WinAuthAuthenticator auth)
|
||||
{
|
||||
_Authenticator = auth.AuthenticatorData as SteamAuthenticator;
|
||||
this.Title = ProductInfo.Title + " | " + Resources.Auth_TradeTitle;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,104 +0,0 @@
|
||||
<UserControl x:Class="SteamTools.Views.Content.AboutUpdateHistory"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:SteamTools.Views.Content"
|
||||
xmlns:viewModel="clr-namespace:SteamTools.ViewModels"
|
||||
xmlns:services="clr-namespace:SteamTools.Services"
|
||||
xmlns:metro="http://schemes.grabacr.net/winfx/2014/controls"
|
||||
xmlns:metro2="http://schemes.grabacr.net/winfx/2015/personal/controls"
|
||||
xmlns:model="clr-namespace:SteamTool.Model;assembly=SteamTool.Model"
|
||||
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
|
||||
xmlns:livet="http://schemas.livet-mvvm.net/2011/wpf"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="400"
|
||||
d:DesignWidth="600"
|
||||
Background="{DynamicResource ThemeBrushKey}">
|
||||
<UserControl.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="..\Common.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
</UserControl.Resources>
|
||||
<ScrollViewer Padding="8" VerticalScrollBarVisibility="Auto">
|
||||
<DockPanel>
|
||||
<TextBlock DockPanel.Dock="Top" Text="{Binding Resources.AboutUpdateHistory, Source={x:Static services:ResourceService.Current}, Mode=OneWay}"
|
||||
Style="{DynamicResource SettingsHeaderTextStyleKey}" />
|
||||
<Border Grid.Column="1">
|
||||
<FlowDocumentScrollViewer Padding="0,-18,0,0"
|
||||
HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Auto">
|
||||
<FlowDocument FontSize="12"
|
||||
Foreground="{DynamicResource ForegroundBrushKey}"
|
||||
FontFamily="Meiryo UI"
|
||||
TextAlignment="Left"
|
||||
MaxPageWidth="900">
|
||||
<Paragraph Language="zh-cn">
|
||||
<Run Text="Steam++ v1.0.2" FontSize="16"/>
|
||||
<Run Text=" "/>
|
||||
<Run Text="2020-12-21" FontSize="10" />
|
||||
<LineBreak />
|
||||
<Run Text="更新内容"></Run>
|
||||
<LineBreak />
|
||||
<Run Text="    "/>
|
||||
<Run Text="更新了由Benares制作的图标" />
|
||||
<LineBreak/>
|
||||
<Run Text="    "/>
|
||||
<Run Text="新增帐户切换删除功能" />
|
||||
<LineBreak/>
|
||||
<Run Text="    "/>
|
||||
<Run Text="添加github图片资源文件代理服务与discord代理服务支持" />
|
||||
<LineBreak/>
|
||||
<Run Text="    "/>
|
||||
<Run Text="因为有问题暂时去掉了GOG Galaxy代理选项"></Run>
|
||||
<LineBreak/>
|
||||
<Run Text="    "/>
|
||||
<Run Text="修复一个会导致程序启动没有反应的bug"></Run>
|
||||
<LineBreak/>
|
||||
<Run Text="    "/>
|
||||
<Run Text="修复托盘菜单steam昵称过长ui错位bug"></Run>
|
||||
<LineBreak/>
|
||||
<Run Text="    "/>
|
||||
<Run Text="新增steam启动参数设置"></Run>
|
||||
<LineBreak/>
|
||||
<Run Text="    "/>
|
||||
<Run Text="新增启动时程序最小化到托盘菜单设置"></Run>
|
||||
<LineBreak/>
|
||||
<Run Text="    "/>
|
||||
<Run Text="新增捐助列表的展示"></Run>
|
||||
<LineBreak/>
|
||||
<Run Text="    "/>
|
||||
<Run Text="新增工具自动更新功能"></Run>
|
||||
<LineBreak />
|
||||
<LineBreak />
|
||||
<Run Text="已知的未修复问题"></Run>
|
||||
<LineBreak />
|
||||
<Run Text="    "/>
|
||||
<Run Text="(严重)经反馈,程序运行时可能会影响部分steam游戏掉帧,GPU占用率变低,这个BUG目前在作者的机器上无法复现所以暂时没有修复,如果你遇到这个问题可以手动关闭steam++解决。" />
|
||||
<LineBreak />
|
||||
<Run Text="    "/>
|
||||
<Run Text="程序在高DPI缩放分辨率下可能会UI布局错位,目前暂时拖动程序可恢复。" />
|
||||
<LineBreak />
|
||||
<Run Text="    "/>
|
||||
<Run Text="部分用户无法加载游戏列表,无法复现,原因暂时不明。" />
|
||||
</Paragraph>
|
||||
<Paragraph Language="zh-cn">
|
||||
<Run Text="Steam++ v1.0.0" FontSize="16"/>
|
||||
<Run Text=" "/>
|
||||
<Run Text="2020-12-14" FontSize="10" />
|
||||
<LineBreak />
|
||||
<Run Text="发布第一个版本" />
|
||||
<LineBreak/>
|
||||
<Run Text="    "/>
|
||||
<Run Text="主要功能:社区反代,帐户切换,成就解锁,本地令牌。"></Run>
|
||||
<LineBreak/>
|
||||
<Run Text="    "/>
|
||||
<Run Text="次要功能:强制无边框窗口化以及CSGO VAC屏蔽修复。"></Run>
|
||||
</Paragraph>
|
||||
</FlowDocument>
|
||||
</FlowDocumentScrollViewer>
|
||||
</Border>
|
||||
</DockPanel>
|
||||
</ScrollViewer>
|
||||
</UserControl>
|
||||
@@ -1,79 +0,0 @@
|
||||
<UserControl x:Class="SteamTools.Views.Controls.StatusBar"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:SteamTools.Views.Controls"
|
||||
xmlns:metro="http://schemes.grabacr.net/winfx/2014/controls"
|
||||
xmlns:services="clr-namespace:SteamTools.Services"
|
||||
xmlns:vm="clr-namespace:SteamTools.ViewModels"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="25" d:DesignWidth="780"
|
||||
d:DataContext="{d:DesignInstance vm:StatusBarViewModel}">
|
||||
<Grid Grid.Row="2" Background="{DynamicResource AccentBrushKey}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="23" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Grid.Column="0"
|
||||
FontSize="13"
|
||||
Style="{DynamicResource DefaultTextStyleKey}"
|
||||
Foreground="{DynamicResource AccentForegroundBrushKey}"
|
||||
TextWrapping="NoWrap"
|
||||
Margin="8,0" >
|
||||
<Run
|
||||
Text="{Binding Source={x:Static services:StatusService.Current}, Path=Message}"/>
|
||||
|
||||
</TextBlock>
|
||||
<ContentControl Grid.Column="1"
|
||||
Content="{Binding}">
|
||||
<ContentControl.Resources>
|
||||
<DataTemplate DataType="{x:Type vm:WelcomePageViewModel}" />
|
||||
<DataTemplate DataType="{x:Type vm:CommunityProxyPageViewModel}" />
|
||||
<DataTemplate DataType="{x:Type vm:SteamAccountPageViewModel}" />
|
||||
<DataTemplate DataType="{x:Type vm:SteamAppPageViewModel}" >
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<StackPanel.Resources>
|
||||
<Style TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground"
|
||||
Value="{DynamicResource AccentForegroundBrushKey}" />
|
||||
<Setter Property="FontFamily"
|
||||
Value="{DynamicResource DefaultFontFamilyKey}" />
|
||||
<Setter Property="FontSize"
|
||||
Value="{DynamicResource DefaultFontSizeKey}" />
|
||||
<Setter Property="VerticalAlignment"
|
||||
Value="Center" />
|
||||
</Style>
|
||||
</StackPanel.Resources>
|
||||
<TextBlock VerticalAlignment="Center" Text="{Binding Source={x:Static services:ResourceService.Current}, Path=Resources.Steam_Not_Runing_Tips}"
|
||||
Visibility="{Binding Source={x:Static services:SteamConnectService.Current}, Path=IsConnectToSteam,Mode=OneWay,Converter={StaticResource ReverseBooleanToVisibilityConverter}}">
|
||||
</TextBlock>
|
||||
<TextBlock Text="{Binding Source={x:Static services:ResourceService.Current}, Path=Resources.Game_Total, StringFormat='{}{0}: '}" />
|
||||
<TextBlock Text="{Binding Games.Count,Mode=OneWay}"
|
||||
MinWidth="45" />
|
||||
<TextBlock Text="{Binding Source={x:Static services:ResourceService.Current}, Path=Resources.Game_Install, StringFormat='{}{0}: '}" />
|
||||
<TextBlock Text="{Binding InstalledCount,Mode=OneWay}"
|
||||
MinWidth="65" />
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
<DataTemplate DataType="{x:Type vm:SettingsPageViewModel}" />
|
||||
<DataTemplate DataType="{x:Type vm:OtherPlatformPageViewModel}" />
|
||||
<DataTemplate DataType="{x:Type vm:LocalAuthPageViewModel}" />
|
||||
<DataTemplate DataType="{x:Type vm:GameRelatedPageViewModel}" />
|
||||
<DataTemplate DataType="{x:Type vm:ArchiSteamFarmPlusPageViewModel}" />
|
||||
<DataTemplate DataType="{x:Type vm:AboutPageViewModel}" />
|
||||
<DataTemplate DataType="{x:Type vm:DebugPageViewModel}" />
|
||||
<DataTemplate DataType="{x:Type vm:AchievementWindowViewModel}" />
|
||||
<DataTemplate DataType="{x:Type vm:SteamIdlePageViewModel}" />
|
||||
</ContentControl.Resources>
|
||||
</ContentControl>
|
||||
<!--<metro:CaptionButton Grid.Column="2" VerticalAlignment="Center"
|
||||
ToolTip="{Binding Path=Badge,StringFormat=Resources.NotificationString,Source={x:Static services:ResourceService.Current}, Mode=OneWay}"
|
||||
Style="{DynamicResource StatusButtonStyleKey}" >
|
||||
<svgc:SvgViewbox IsHitTestVisible="False" Source="pack://application:,,,/Resources/Asstes/bell.svg" Width="11" />
|
||||
</metro:CaptionButton>-->
|
||||
<metro:ResizeGrip Grid.Column="3" />
|
||||
</Grid>
|
||||
</UserControl>
|
||||
@@ -1,208 +0,0 @@
|
||||
<UserControl x:Class="SteamTools.Views.Controls.TaskBarPopup"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:metro2="http://schemes.grabacr.net/winfx/2015/personal/controls"
|
||||
xmlns:vm="clr-namespace:SteamTools.ViewModels"
|
||||
xmlns:services="clr-namespace:SteamTools.Services"
|
||||
xmlns:metro="http://schemes.grabacr.net/winfx/2014/controls"
|
||||
xmlns:models="clr-namespace:SteamTools.Models"
|
||||
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
|
||||
xmlns:livet="http://schemas.livet-mvvm.net/2011/wpf"
|
||||
mc:Ignorable="d"
|
||||
Height="350" Width="180"
|
||||
FontSize="14"
|
||||
UseLayoutRounding="True"
|
||||
TextOptions.TextFormattingMode="Display"
|
||||
TextOptions.TextRenderingMode="Auto"
|
||||
SnapsToDevicePixels="True"
|
||||
Foreground="{DynamicResource ForegroundBrushKey}"
|
||||
d:DataContext="{d:DesignInstance vm:TaskBarViewModel}">
|
||||
<Border>
|
||||
<Grid>
|
||||
<Rectangle Stroke="{DynamicResource AccentBrushKey}"
|
||||
StrokeThickness="3">
|
||||
<Rectangle.Effect>
|
||||
<BlurEffect Radius="8" />
|
||||
</Rectangle.Effect>
|
||||
</Rectangle>
|
||||
<Border Background="{DynamicResource ThemeBrushKey}"
|
||||
BorderBrush="{DynamicResource AccentBrushKey}"
|
||||
BorderThickness=".99">
|
||||
<Grid Margin="8,0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="70"></RowDefinition>
|
||||
<RowDefinition Height="*"></RowDefinition>
|
||||
<RowDefinition Height="Auto"></RowDefinition>
|
||||
</Grid.RowDefinitions>
|
||||
<DockPanel Grid.Row="0" Margin="0,8,0,0" Visibility="{Binding ElementName=user,Path=IsVisible,Converter={StaticResource ReverseBooleanToVisibilityConverter}}">
|
||||
<Image Source="pack://application:,,,/Resources/Asstes/app.ico" Width="64" Height="64" Cursor="Hand">
|
||||
<i:Interaction.Triggers>
|
||||
<i:EventTrigger EventName="MouseLeftButtonDown">
|
||||
<livet:LivetCallMethodAction MethodName="ShowUrl"
|
||||
MethodTarget="{Binding}" />
|
||||
</i:EventTrigger>
|
||||
</i:Interaction.Triggers>
|
||||
</Image>
|
||||
<StackPanel VerticalAlignment="Center">
|
||||
<TextBlock Text="{Binding Source={x:Static services:ResourceService.Current}, Path=Resources.WinTitle,Mode=OneWay}"
|
||||
Foreground="{DynamicResource HighlightForegroundBrushKey}" Style="{StaticResource HeaderTextStyleKey}" FontSize="16"/>
|
||||
<TextBlock Text="{Binding Source={x:Static models:ProductInfo.VersionString}, StringFormat=版本 {0}, Mode=OneWay}"
|
||||
Foreground="{DynamicResource HighlightForegroundBrushKey}" Style="{StaticResource DetailTextStyleKey}"/>
|
||||
</StackPanel>
|
||||
|
||||
</DockPanel>
|
||||
<DockPanel x:Name="user" Grid.Row="0" Margin="0,8,0,0" Visibility="{Binding CurrentSteamUser,Source={x:Static services:SteamConnectService.Current},Mode=OneWay,Converter={StaticResource NullToVisibilityConverter}}">
|
||||
<Image Source="{Binding CurrentSteamUser.AvatarMedium,Source={x:Static services:SteamConnectService.Current},Mode=OneWay}" Width="64" Height="64" Cursor="Hand">
|
||||
<Image.Clip>
|
||||
<!--设置图像如何显示-->
|
||||
<EllipseGeometry RadiusX="32" RadiusY="32" Center="32,32"/>
|
||||
</Image.Clip>
|
||||
<i:Interaction.Triggers>
|
||||
<i:EventTrigger EventName="MouseLeftButtonDown">
|
||||
<livet:LivetCallMethodAction MethodName="ShowUrl"
|
||||
MethodTarget="{Binding}" />
|
||||
</i:EventTrigger>
|
||||
</i:Interaction.Triggers>
|
||||
</Image>
|
||||
<StackPanel VerticalAlignment="Center" Margin="8,0,0,0">
|
||||
<TextBlock Text="{Binding CurrentSteamUser.SteamID,Source={x:Static services:SteamConnectService.Current},Mode=OneWay}" VerticalAlignment="Center" TextTrimming="CharacterEllipsis"
|
||||
Foreground="{DynamicResource HighlightForegroundBrushKey}"
|
||||
Style="{StaticResource HeaderTextStyleKey}" FontSize="16"></TextBlock>
|
||||
<TextBlock
|
||||
Foreground="{DynamicResource HighlightForegroundBrushKey}"
|
||||
Style="{StaticResource DetailTextStyleKey}">
|
||||
<Run Text="{Binding Source={x:Static models:ProductInfo.Title}, Mode=OneWay}"></Run>
|
||||
<LineBreak/>
|
||||
<Run Text="{Binding Source={x:Static models:ProductInfo.VersionString}, StringFormat=版本 {0}, Mode=OneWay}"></Run>
|
||||
</TextBlock>
|
||||
</StackPanel>
|
||||
</DockPanel>
|
||||
<StackPanel Grid.Row="1">
|
||||
<Rectangle Height=".99"
|
||||
Fill="{DynamicResource InactiveForegroundBrushKey}"
|
||||
Margin="0,8" />
|
||||
<DockPanel>
|
||||
<TextBlock VerticalAlignment="Center" Foreground="{DynamicResource HighlightForegroundBrushKey}" FontFamily="{StaticResource DefaultFontFamilyKey}">
|
||||
<TextBlock.Style>
|
||||
<Style TargetType="TextBlock">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding ProxyStatus,Source={x:Static services:ProxyService.Current},Mode=OneWay}" Value="False">
|
||||
<Setter Property="Text" Value="{Binding Resources.StartService,Source={x:Static services:ResourceService.Current}, Mode=OneWay}"></Setter>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding ProxyStatus,Source={x:Static services:ProxyService.Current},Mode=OneWay}" Value="True">
|
||||
<Setter Property="Text" Value="{Binding Resources.StopService,Source={x:Static services:ResourceService.Current}, Mode=OneWay}"></Setter>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</TextBlock.Style>
|
||||
</TextBlock>
|
||||
<CheckBox x:Name="service" Style="{DynamicResource SliderCheckBox}" Margin="5" HorizontalAlignment="Right"
|
||||
IsChecked="{Binding ProxyStatus,Source={x:Static services:ProxyService.Current},Mode=TwoWay}">
|
||||
</CheckBox>
|
||||
</DockPanel>
|
||||
<!--<metro:LinkButton Text="{Binding Source={x:Static services:ResourceService.Current}, Path=Resources.Exit}">
|
||||
<i:Interaction.Triggers>
|
||||
<i:EventTrigger EventName="Click">
|
||||
<livet:LivetCallMethodAction MethodName="ExitApplication"
|
||||
MethodTarget="{Binding}" />
|
||||
</i:EventTrigger>
|
||||
</i:Interaction.Triggers>
|
||||
</metro:LinkButton>-->
|
||||
<Rectangle Height=".99"
|
||||
Fill="{DynamicResource InactiveForegroundBrushKey}"
|
||||
Margin="0,8" />
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Row="2" VerticalAlignment="Bottom">
|
||||
<ListBox Style="{StaticResource MetroListBox}" FontSize="12" FontFamily="{StaticResource CaptionFontFamilyKey}" BorderThickness="0" Margin="-8,0">
|
||||
<ListBoxItem>
|
||||
<Border Padding="8">
|
||||
<StackPanel>
|
||||
<TextBlock Text="{Binding Source={x:Static services:ResourceService.Current}, Path=Resources.CommunityFix}" VerticalAlignment="Center"></TextBlock>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
<i:Interaction.Triggers>
|
||||
<i:EventTrigger EventName="MouseLeftButtonUp">
|
||||
<livet:LivetCallMethodAction MethodName="NavigateTabItem"
|
||||
MethodTarget="{Binding}" MethodParameter="1"/>
|
||||
</i:EventTrigger>
|
||||
</i:Interaction.Triggers>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem>
|
||||
<Border Padding="8">
|
||||
<StackPanel>
|
||||
<TextBlock Text="{Binding Source={x:Static services:ResourceService.Current}, Path=Resources.UserFastChange}" VerticalAlignment="Center"></TextBlock>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
<i:Interaction.Triggers>
|
||||
<i:EventTrigger EventName="MouseLeftButtonUp">
|
||||
<livet:LivetCallMethodAction MethodName="NavigateTabItem"
|
||||
MethodTarget="{Binding}" MethodParameter="2"/>
|
||||
</i:EventTrigger>
|
||||
</i:Interaction.Triggers>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem>
|
||||
<Border Padding="8">
|
||||
<StackPanel>
|
||||
<TextBlock Text="{Binding Source={x:Static services:ResourceService.Current}, Path=Resources.GameList}" VerticalAlignment="Center"></TextBlock>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
<i:Interaction.Triggers>
|
||||
<i:EventTrigger EventName="MouseLeftButtonUp">
|
||||
<livet:LivetCallMethodAction MethodName="NavigateTabItem"
|
||||
MethodTarget="{Binding}" MethodParameter="3"/>
|
||||
</i:EventTrigger>
|
||||
</i:Interaction.Triggers>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem>
|
||||
<Border Padding="8">
|
||||
<StackPanel>
|
||||
<TextBlock Text="{Binding Source={x:Static services:ResourceService.Current}, Path=Resources.SteamAuth}" VerticalAlignment="Center"></TextBlock>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
<i:Interaction.Triggers>
|
||||
<i:EventTrigger EventName="MouseLeftButtonUp">
|
||||
<livet:LivetCallMethodAction MethodName="NavigateTabItem"
|
||||
MethodTarget="{Binding}" MethodParameter="4"/>
|
||||
</i:EventTrigger>
|
||||
</i:Interaction.Triggers>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem IsEnabled="False" Margin="0,5">
|
||||
<Rectangle Height=".99"
|
||||
Fill="{DynamicResource InactiveForegroundBrushKey}"
|
||||
Margin="8,0" />
|
||||
</ListBoxItem>
|
||||
<ListBoxItem>
|
||||
<Border Padding="8">
|
||||
<StackPanel>
|
||||
<TextBlock Text="{Binding Source={x:Static services:ResourceService.Current}, Path=Resources.Settings}" VerticalAlignment="Center"></TextBlock>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
<i:Interaction.Triggers>
|
||||
<i:EventTrigger EventName="MouseLeftButtonUp">
|
||||
<livet:LivetCallMethodAction MethodName="NavigateTabItem"
|
||||
MethodTarget="{Binding}" MethodParameter="-1"/>
|
||||
</i:EventTrigger>
|
||||
</i:Interaction.Triggers>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem>
|
||||
<Border Padding="8">
|
||||
<StackPanel>
|
||||
<TextBlock Text="{Binding Source={x:Static services:ResourceService.Current}, Path=Resources.Exit}" VerticalAlignment="Center"></TextBlock>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
<i:Interaction.Triggers>
|
||||
<i:EventTrigger EventName="MouseLeftButtonUp">
|
||||
<livet:LivetCallMethodAction MethodName="ExitApplication"
|
||||
MethodTarget="{Binding}" />
|
||||
</i:EventTrigger>
|
||||
</i:Interaction.Triggers>
|
||||
</ListBoxItem>
|
||||
</ListBox>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Border>
|
||||
</Grid>
|
||||
</Border>
|
||||
</UserControl>
|
||||
@@ -1,97 +0,0 @@
|
||||
<metro:MetroWindow x:Class="SteamTools.AuthTradeWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
|
||||
xmlns:livet="http://schemas.livet-mvvm.net/2011/wpf"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:metro="http://schemes.grabacr.net/winfx/2014/controls"
|
||||
xmlns:metro2="clr-namespace:MetroTrilithon.UI.Controls;assembly=MetroTrilithon.Desktop"
|
||||
xmlns:viewModel="clr-namespace:SteamTools.ViewModels"
|
||||
xmlns:prop="clr-namespace:SteamTools.Properties"
|
||||
xmlns:services="clr-namespace:SteamTools.Services"
|
||||
xmlns:input="clr-namespace:System.Windows.Input;assembly=PresentationCore"
|
||||
xmlns:controls="clr-namespace:SteamTools.Views.Controls"
|
||||
xmlns:models="clr-namespace:SteamTools.Models"
|
||||
mc:Ignorable="d"
|
||||
Width="600"
|
||||
Height="400"
|
||||
IsRestoringWindowPlacement="True"
|
||||
WindowStartupLocation="CenterScreen"
|
||||
Title="{Binding Title}"
|
||||
Background="{DynamicResource ThemeBrushKey}"
|
||||
Foreground="{DynamicResource ActiveForegroundBrushKey}"
|
||||
FontFamily="{StaticResource DefaultFontFamilyKey}"
|
||||
FontSize="16"
|
||||
ResizeMode="NoResize"
|
||||
UseLayoutRounding="True"
|
||||
TextOptions.TextFormattingMode="Display"
|
||||
SnapsToDevicePixels="True"
|
||||
d:DataContext="{d:DesignInstance viewModel:ShowAuthWindowViewModel}">
|
||||
<i:Interaction.Triggers>
|
||||
<i:EventTrigger EventName="ContentRendered">
|
||||
<livet:LivetCallMethodAction MethodTarget="{Binding}"
|
||||
MethodName="Initialize" />
|
||||
</i:EventTrigger>
|
||||
|
||||
<i:EventTrigger EventName="Closed">
|
||||
<livet:DataContextDisposeAction />
|
||||
</i:EventTrigger>
|
||||
<livet:InteractionMessageTrigger Messenger="{Binding Messenger, Mode=OneWay}"
|
||||
MessageKey="Window.Activate">
|
||||
<livet:WindowInteractionMessageAction InvokeActionOnlyWhenWindowIsActive="False" />
|
||||
</livet:InteractionMessageTrigger>
|
||||
<livet:InteractionMessageTrigger Messenger="{Binding Messenger}"
|
||||
MessageKey="Window.Transition">
|
||||
<livet:TransitionInteractionMessageAction InvokeActionOnlyWhenWindowIsActive="False"
|
||||
IsOwned="False" />
|
||||
</livet:InteractionMessageTrigger>
|
||||
<livet:InteractionMessageTrigger Messenger="{Binding Messenger}"
|
||||
MessageKey="Window.Transition.Child">
|
||||
<livet:TransitionInteractionMessageAction InvokeActionOnlyWhenWindowIsActive="False"
|
||||
IsOwned="True" />
|
||||
</livet:InteractionMessageTrigger>
|
||||
</i:Interaction.Triggers>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<!--Title-->
|
||||
<Border Grid.Row="0"
|
||||
metro:MetroWindow.IsCaptionBar="True" >
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
<metro:CaptionIcon Grid.Column="0" Padding="6,3">
|
||||
<Image Source="pack://application:,,,/Resources/Asstes/app.ico" Width="32" Height="32"></Image>
|
||||
</metro:CaptionIcon>
|
||||
<TextBlock Grid.Column="1"
|
||||
Grid.Row="0"
|
||||
Text="{Binding RelativeSource={RelativeSource AncestorType={x:Type Window}}, Path=Title}"
|
||||
TextTrimming="CharacterEllipsis"
|
||||
Foreground="{DynamicResource ForegroundBrushKey}"
|
||||
FontSize="16"
|
||||
VerticalAlignment="Center" />
|
||||
<metro:SystemButtons Grid.Column="2"
|
||||
Grid.Row="0"
|
||||
VerticalAlignment="Top" />
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
<!--Body-->
|
||||
|
||||
<Grid Grid.Row="1">
|
||||
<Grid Margin="0,8,0,0">
|
||||
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</metro:MetroWindow>
|
||||
@@ -1,79 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Threading.Tasks;
|
||||
using FILETIME = System.Runtime.InteropServices.ComTypes.FILETIME;
|
||||
|
||||
namespace SteamTools.Win32
|
||||
{
|
||||
internal class WinInet
|
||||
{
|
||||
// For PInvoke: Initiates the enumeration of the cache groups in the Internet cache
|
||||
[DllImport(@"wininet",
|
||||
SetLastError = true,
|
||||
CharSet = CharSet.Auto,
|
||||
EntryPoint = "FindFirstUrlCacheGroup",
|
||||
CallingConvention = CallingConvention.StdCall)]
|
||||
public static extern IntPtr FindFirstUrlCacheGroup(
|
||||
int dwFlags,
|
||||
int dwFilter,
|
||||
IntPtr lpSearchCondition,
|
||||
int dwSearchCondition,
|
||||
ref long lpGroupId,
|
||||
IntPtr lpReserved);
|
||||
|
||||
// For PInvoke: Retrieves the next cache group in a cache group enumeration
|
||||
[DllImport(@"wininet",
|
||||
SetLastError = true,
|
||||
CharSet = CharSet.Auto,
|
||||
EntryPoint = "FindNextUrlCacheGroup",
|
||||
CallingConvention = CallingConvention.StdCall)]
|
||||
public static extern bool FindNextUrlCacheGroup(
|
||||
IntPtr hFind,
|
||||
ref long lpGroupId,
|
||||
IntPtr lpReserved);
|
||||
|
||||
// For PInvoke: Releases the specified GROUPID and any associated state in the cache index file
|
||||
[DllImport(@"wininet",
|
||||
SetLastError = true,
|
||||
CharSet = CharSet.Auto,
|
||||
EntryPoint = "DeleteUrlCacheGroup",
|
||||
CallingConvention = CallingConvention.StdCall)]
|
||||
public static extern bool DeleteUrlCacheGroup(
|
||||
long groupId,
|
||||
int dwFlags,
|
||||
IntPtr lpReserved);
|
||||
|
||||
// For PInvoke: Begins the enumeration of the Internet cache
|
||||
[DllImport(@"wininet",
|
||||
SetLastError = true,
|
||||
CharSet = CharSet.Auto,
|
||||
EntryPoint = "FindFirstUrlCacheEntryA",
|
||||
CallingConvention = CallingConvention.StdCall)]
|
||||
public static extern IntPtr FindFirstUrlCacheEntry(
|
||||
[MarshalAs(UnmanagedType.LPTStr)] string lpszUrlSearchPattern,
|
||||
IntPtr lpFirstCacheEntryInfo,
|
||||
ref int lpdwFirstCacheEntryInfoBufferSize);
|
||||
|
||||
// For PInvoke: Retrieves the next entry in the Internet cache
|
||||
[DllImport(@"wininet",
|
||||
SetLastError = true,
|
||||
CharSet = CharSet.Auto,
|
||||
EntryPoint = "FindNextUrlCacheEntryA",
|
||||
CallingConvention = CallingConvention.StdCall)]
|
||||
public static extern bool FindNextUrlCacheEntry(
|
||||
IntPtr hFind,
|
||||
IntPtr lpNextCacheEntryInfo,
|
||||
ref int lpdwNextCacheEntryInfoBufferSize);
|
||||
|
||||
// For PInvoke: Removes the file that is associated with the source name from the cache, if the file exists
|
||||
[DllImport(@"wininet",
|
||||
SetLastError = true,
|
||||
CharSet = CharSet.Auto,
|
||||
EntryPoint = "DeleteUrlCacheEntryA",
|
||||
CallingConvention = CallingConvention.StdCall)]
|
||||
public static extern bool DeleteUrlCacheEntry(
|
||||
IntPtr lpszUrlName);
|
||||
}
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
// ==UserScript==
|
||||
// @name GM
|
||||
// @namespace
|
||||
// @version 0.1
|
||||
// @description 基础脚本框架
|
||||
// @author 软妹币玩家
|
||||
// @match *
|
||||
// @enable true
|
||||
// @grant GM_xmlhttpRequest
|
||||
// ==/UserScript==
|
||||
|
||||
var unsafeWindow = this;
|
||||
function GM_xmlhttpRequest(details)
|
||||
{
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
dotnet publish SteamTools -c Release -f net5.0-windows -r win-x86 -p:PublishSingleFile=true -p:UseAppHost=true --self-contained false -o out/result
|
||||
@@ -0,0 +1 @@
|
||||
dotnet publish ..\source\SteamTools -c Release -f net5.0-windows -r win-x86 - /p:PublishSingleFile=true /p:PublishTrimmed=true -o out/result
|
||||
@@ -0,0 +1,318 @@
|
||||
function Main
|
||||
{
|
||||
begin
|
||||
{
|
||||
$ErrorActionPreference = 'stop'
|
||||
|
||||
$target = 'net472'
|
||||
$result = 'Steam++'
|
||||
$bin = '..\source\SteamTools\bin\x86\Release\'
|
||||
# '*.exe.config'
|
||||
$targetKeywords = '*.exe','*.dll','*.txt','*.VisualElementsManifest.xml','*.pak','*.bin','*.js','Log4net.config'
|
||||
$ignoreKeywords = '*.vshost.*','Microsoft.*.resources.dll','ExPlugin.*.dll'
|
||||
|
||||
$exeSource = '\Steam++.exe'
|
||||
|
||||
if (-not(Test-Path $bin))
|
||||
{
|
||||
throw 'Script detected as locate in invalid path exception!! Make sure exist in <SteamTools repository root>\tools-release\'
|
||||
}
|
||||
}
|
||||
|
||||
end
|
||||
{
|
||||
try
|
||||
{
|
||||
# clean up current
|
||||
Get-ChildItem -Directory | Remove-item -Recurse
|
||||
Get-ChildItem | where { $_.Extension -eq ".zip" } | Remove-Item
|
||||
|
||||
Copy-StrictedFilterFileWithDirectoryStructure -Path $(Join-Path $bin $target) -Destination '.\' -Targets $targetKeywords -Exclude $ignoreKeywords
|
||||
|
||||
# valid path check
|
||||
$versionSource = Join-Path $target $exeSource -Resolve
|
||||
|
||||
if ((Test-Path $versionSource) -and (Test-Path $target))
|
||||
{
|
||||
$version = (Get-ChildItem $versionSource).VersionInfo
|
||||
$result = $result + ' v{0}.{1}.{2}' -f $version.ProductMajorPart, $version.ProductMinorPart,$version.ProductBuildPart
|
||||
|
||||
Rename-Item -NewName $result -Path $target
|
||||
New-ZipCompression -source $(Join-Path $(Get-Location) $result) -destination $(Join-Path $(Get-Location).Path ('./' + $result + '.zip'))
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
throw $_
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# https://gist.github.com/guitarrapc/e78bbd4ddc07389e17d6
|
||||
function Copy-StrictedFilterFileWithDirectoryStructure
|
||||
{
|
||||
[CmdletBinding()]
|
||||
param
|
||||
(
|
||||
[parameter(
|
||||
mandatory = 1,
|
||||
position = 0,
|
||||
ValueFromPipeline = 1,
|
||||
ValueFromPipelineByPropertyName = 1)]
|
||||
[string]
|
||||
$Path,
|
||||
|
||||
[parameter(
|
||||
mandatory = 1,
|
||||
position = 1,
|
||||
ValueFromPipelineByPropertyName = 1)]
|
||||
[string]
|
||||
$Destination,
|
||||
|
||||
[parameter(
|
||||
mandatory = 1,
|
||||
position = 2,
|
||||
ValueFromPipelineByPropertyName = 1)]
|
||||
[string[]]
|
||||
$Targets,
|
||||
|
||||
[parameter(
|
||||
mandatory = 0,
|
||||
position = 3,
|
||||
ValueFromPipelineByPropertyName = 1)]
|
||||
[string[]]
|
||||
$Excludes
|
||||
)
|
||||
|
||||
begin
|
||||
{
|
||||
$list = New-Object 'System.Collections.Generic.List[String]'
|
||||
}
|
||||
|
||||
process
|
||||
{
|
||||
Foreach ($target in $Targets)
|
||||
{
|
||||
# Copy "All Directory Structure" and "File" which Extension type is $ex
|
||||
Copy-Item -Path $Path -Destination $Destination -Force -Recurse -Filter $target
|
||||
}
|
||||
}
|
||||
|
||||
end
|
||||
{
|
||||
# Remove -Exclude Item
|
||||
Foreach ($exclude in $Excludes)
|
||||
{
|
||||
Get-ChildItem -Path $Destination -Recurse -File | where Name -like $exclude | Remove-Item
|
||||
}
|
||||
|
||||
# search Folder which include file
|
||||
$allFolder = Get-ChildItem $Destination -Recurse -Directory
|
||||
$containsFile = $allFolder | where {$_.GetFiles()}
|
||||
$containsFile.FullName `
|
||||
| %{
|
||||
$fileContains = $_
|
||||
$result = $allFolder.FullName `
|
||||
| where {$_ -notin $list} `
|
||||
| where {
|
||||
$shortPath = $_
|
||||
$fileContains -like "$shortPath*"
|
||||
}
|
||||
$result | %{$list.Add($_)}
|
||||
}
|
||||
$folderToKeep = $list | sort -Unique
|
||||
|
||||
# Remove All Empty (none file exist) folders
|
||||
Get-ChildItem -Path $Destination -Recurse -Directory | where fullName -notin $folderToKeep | Remove-Item -Recurse
|
||||
}
|
||||
}
|
||||
|
||||
# http://tech.guitarrapc.com/entry/2013/10/08/040325
|
||||
function New-ZipCompression
|
||||
{
|
||||
[CmdletBinding()]
|
||||
param
|
||||
(
|
||||
[parameter(
|
||||
mandatory,
|
||||
position = 0,
|
||||
valuefrompipeline,
|
||||
valuefrompipelinebypropertyname)]
|
||||
[string]
|
||||
$source,
|
||||
|
||||
[parameter(
|
||||
mandatory = 0,
|
||||
position = 1,
|
||||
valuefrompipeline,
|
||||
valuefrompipelinebypropertyname)]
|
||||
[string]
|
||||
$destination,
|
||||
|
||||
[parameter(
|
||||
mandatory = 0,
|
||||
position = 2)]
|
||||
[switch]
|
||||
$quiet,
|
||||
|
||||
[parameter(
|
||||
mandatory = 0,
|
||||
position = 3)]
|
||||
[switch]
|
||||
$force
|
||||
)
|
||||
|
||||
try
|
||||
{
|
||||
Add-Type -AssemblyName 'System.IO.Compression.FileSystem'
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
|
||||
# check file is directory
|
||||
$file = Get-Item -Path $source
|
||||
|
||||
# set zip extension
|
||||
$zipExtension = '.zip'
|
||||
|
||||
# set desktop as destination path if it null
|
||||
if ([string]::IsNullOrWhiteSpace($destination))
|
||||
{
|
||||
if ($file.Mode -like 'd*')
|
||||
{
|
||||
$destination = (Join-Path ([System.Environment]::GetFolderPath([Environment+SpecialFolder]::Desktop)) [System.IO.Path]::GetFileNameWithoutExtension($source + $zipExtension))
|
||||
}
|
||||
else
|
||||
{
|
||||
$destination = (Join-Path ([System.Environment]::GetFolderPath([Environment+SpecialFolder]::Desktop)) [System.IO.Path]::GetFileNameWithoutExtension(($file | select -First 1 -ExpandProperty fullname))) + $zipExtension
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
# check destination is input as .zip
|
||||
if (-not($destination.EndsWith($zipExtension)))
|
||||
{
|
||||
throw ('destination parameter value [{0}] not end with extension {1}' -f $destination, $zipExtension)
|
||||
}
|
||||
|
||||
# check destination is already exist or not
|
||||
if (Test-Path $destination)
|
||||
{
|
||||
Remove-Item -Path $destination -Confirm
|
||||
}
|
||||
|
||||
|
||||
# compressionLevel
|
||||
$compressionLevel = [System.IO.Compression.CompressionLevel]::Optimal
|
||||
|
||||
# check file mode for source
|
||||
Write-Verbose ('file.mode = {0}' -f $file.Mode)
|
||||
|
||||
if ($file.Mode -like 'd*') # Directory should be d---
|
||||
{
|
||||
try # create zip from directory
|
||||
{
|
||||
# force output zip file to new destination path, avoiding destination zip name conflict.
|
||||
if ($force)
|
||||
{
|
||||
# check destination is already exist, CreateFromDirectory will fail with same name of destination file.
|
||||
if (Test-Path $destination)
|
||||
{
|
||||
# show warning for same destination exist.
|
||||
Write-Verbose ('Detected destination name {0} is already exist. Force trying output to new destination zip name.' -f $destination)
|
||||
|
||||
# get current destination information
|
||||
$destinationRoot = [System.IO.Path]::GetDirectoryName($destination)
|
||||
$destinationfile = [System.IO.Path]::GetFileNameWithoutExtension($destination)
|
||||
$destinationExtension = [System.IO.Path]::GetExtension($destination)
|
||||
|
||||
# renew destination name with (2)...(x) until no more same name catch.
|
||||
$count = 2
|
||||
$destination = Join-Path $destinationRoot ($destinationfile + '(' + $count + ')' + $destinationExtension)
|
||||
while (Test-Path $destination)
|
||||
{
|
||||
++$count
|
||||
$destination = Join-Path $destinationRoot ($destinationfile + '(' + $count + ')' + $destinationExtension)
|
||||
}
|
||||
|
||||
# show warning as destination name had been changed due to escape error.
|
||||
Write-Verbose ('Deistination name change to new name {0}' -f $destination)
|
||||
}
|
||||
}
|
||||
|
||||
# include BaseDirectory
|
||||
$includeBaseDirectory = $true
|
||||
|
||||
Write-Verbose ('destination = {0}' -f $destination)
|
||||
|
||||
Write-Verbose ('file.fullname = {0}' -f $file.FullName)
|
||||
Write-Verbose ('compressionLevel = {0}' -f $compressionLevel)
|
||||
Write-Verbose ('includeBaseDirectory = {0}' -f $includeBaseDirectory)
|
||||
|
||||
if ($quiet)
|
||||
{
|
||||
Write-Verbose ('zipping up folder {0} to {1}' -f $file.FullName,$destination)
|
||||
[System.IO.Compression.ZipFile]::CreateFromDirectory($file.fullname,$destination,$compressionLevel,$includeBaseDirectory) > $null
|
||||
$?
|
||||
}
|
||||
else
|
||||
{
|
||||
Write-Verbose ('zipping up folder {0} to {1}' -f $file.FullName,$destination)
|
||||
[System.IO.Compression.ZipFile]::CreateFromDirectory($file.fullname,$destination,$compressionLevel,$includeBaseDirectory)
|
||||
Get-Item $destination
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
Write-Error $_
|
||||
$?
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
try # create zip from files
|
||||
{
|
||||
# create zip to add
|
||||
$destzip = [System.IO.Compression.Zipfile]::Open($destination,'Update')
|
||||
|
||||
# get items
|
||||
$files = Get-ChildItem -Path $source
|
||||
|
||||
foreach ($file in $files)
|
||||
{
|
||||
$file2 = $file.name
|
||||
|
||||
Write-Verbose ('destzip = {0}' -f $destzip)
|
||||
Write-Verbose ('file.fullname = {0}' -f $file.FullName)
|
||||
Write-Verbose ('file2 = {0}' -f $file2)
|
||||
Write-Verbose ('compressionLevel = {0}' -f $compressionLevel)
|
||||
|
||||
if ($quiet)
|
||||
{
|
||||
Write-Verbose ('zipping up files {0} to {1}' -f $file.FullName,$destzip)
|
||||
[System.IO.Compression.ZipFileExtensions]::CreateEntryFromFile($destzip,$file.fullname,$file2,$compressionLevel) > $null
|
||||
$?
|
||||
}
|
||||
else
|
||||
{
|
||||
Write-Verbose ('zipping up files {0} to {1}' -f $file.FullName,$destzip)
|
||||
[System.IO.Compression.ZipFileExtensions]::CreateEntryFromFile($destzip,$file.fullname,$file2,$compressionLevel)
|
||||
}
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
Write-Error $_
|
||||
$?
|
||||
}
|
||||
finally
|
||||
{
|
||||
# dispose opened zip
|
||||
$destzip.Dispose()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Main
|
||||
@@ -8,40 +8,33 @@ Steam++只在keylol论坛与github发布,为了账号安全,请不要到其
|
||||
|
||||
|
||||
## 已知的未修复问题
|
||||
|
||||
|
||||
|
||||
|
||||
* (严重)经反馈,程序运行时可能会影响部分steam游戏掉帧,GPU占用率变低,这个BUG目前在作者的机器上无法复现所以暂时没有修复,如果你遇到这个问题可以手动关闭steam++解决。
|
||||
* 程序在高DPI缩放分辨率下可能会UI布局错位,目前暂时拖动程序可恢复。
|
||||
* 部分用户无法加载游戏列表,无法复现,原因暂时不明。
|
||||
* 部分用户无法加载游戏列表,原因可能是因为第一次加载游戏列表时未加载完成程序停止运行了,导致生成了错误的缓存文件apps.json,如果遇到此问题可尝试手动删除程序目录下的apps.json然后重启程序。
|
||||
|
||||
|
||||
## 更新内容
|
||||
|
||||
|
||||
### 1.0.2
|
||||
|
||||
### 1.1.0
|
||||
```
|
||||
更新了由Benares制作的图标
|
||||
新增帐户切换删除功能
|
||||
添加github图片资源文件代理服务与discord代理服务支持
|
||||
因为有问题暂时去掉了GOG Galaxy代理选项
|
||||
修复一个会导致程序启动没有反应的bug
|
||||
修复托盘菜单steam昵称过长ui错位bug
|
||||
新增steam启动参数设置
|
||||
新增启动时程序最小化到托盘菜单设置
|
||||
新增捐助列表的展示
|
||||
新增工具自动更新功能
|
||||
本地令牌市场交易确认功能上线啦(目前功能较简单,待完善)
|
||||
新增内置steam史低查询脚本
|
||||
新增Steam启动消息通知设置项
|
||||
新增github gist代理服务支持
|
||||
修复某些情况配置文件读取出错
|
||||
修复discord更新下载和图片失效
|
||||
修复twitch聊天频道连接失效
|
||||
修复gihub头像资源加载失败
|
||||
新增pixiv图片的代理选项来修复pixiv图片失效
|
||||
修改了本地反代解析域名的方式,这样出问题以后可以直接热更新
|
||||
还修复了一些没有记下来的bug...
|
||||
```
|
||||
|
||||
|
||||
## 工具介绍
|
||||
|
||||
`Steam++`是一个包含多种Steam工具功能的工具箱,开源发布于[Github](https://github.com/rmbadmin/SteamTools),如果您对发布的二进制文件不放心,可以自行下载源码编译运行。
|
||||
此工具的大部分功能都是需要您下载安装Steam才能使用。
|
||||
工具预计将整合进大部分常用的Steam相关工具,并且尽力做到比原工具更好用,在各种整合添加功能的同时,也会注意体积尽量的控制到最小。
|
||||
查毒链接[https://www.virustotal.com/gui/file/3889babb8b0dcf79b16045679a5cb57a70cc6d60447078fb65b8a8979da2f14d/detection](https://www.virustotal.com/gui/file/3889babb8b0dcf79b16045679a5cb57a70cc6d60447078fb65b8a8979da2f14d/detection)
|
||||
虽然没有什么杀毒软件报毒,但是使用过程中可能遇到windows defender误报,您可以选择添加信任。
|
||||
|
||||
软件截图
|
||||
[hide]
|
||||
[attachimg]1228394[/attachimg]
|
||||
@@ -55,7 +48,7 @@ Steam++只在keylol论坛与github发布,为了账号安全,请不要到其
|
||||
|
||||
### 1. 反代Steam的社区网页使其能正常访问
|
||||
|
||||
功能类似羽翼城大佬的steamcommunity_302,使用[Titanium-Web-Proxy](https://github.com/justcoding121/Titanium-Web-Proxy)开源项目进行本地反代,相比302工具具有更快的启动速度,以及支持简单的脚本注入。该功能也可以配合羽翼城大佬的[UsbEAm Hosts Editor](https://www.dogfight360.com/blog/475/)里的网页相关-steamcommunity_302 社区/api/商店加载速度选项的hosts提升加载速度。
|
||||
功能类似羽翼城大佬的[steamcommunity_302](https://www.dogfight360.com/blog/686/),使用[Titanium-Web-Proxy](https://github.com/justcoding121/Titanium-Web-Proxy)开源项目进行本地反代,相比302工具具有更快的启动速度,以及支持简单的脚本注入。该功能也可以配合羽翼城大佬的[UsbEAm Hosts Editor](https://www.dogfight360.com/blog/475/)里的网页相关-steamcommunity_302 社区/api/商店加载速度选项的hosts提升加载速度。
|
||||
[attachimg]1228388[/attachimg]
|
||||
|
||||
### 2. 快速切换当前PC已经记住登陆的Steam账号
|
||||
@@ -71,14 +64,17 @@ Steam++只在keylol论坛与github发布,为了账号安全,请不要到其
|
||||
### 4. Steam本地两步身份验证器
|
||||
|
||||
功能参考[WinAuth](https://github.com/winauth/winauth)开发,可以使您不用启动移动版Steam App也能查看您的令牌,功能类似的软件有[WinAuth](https://github.com/winauth/winauth)、[SteamDesktopAuthenticator](https://github.com/Jessecar96/SteamDesktopAuthenticator)。
|
||||
[attachimg]1228391[/attachimg]
|
||||
[attachimg]1228391[/attachimg]
|
||||
|
||||
本地令牌交易市场报价确认
|
||||
[attachimg]1262615[/attachimg]
|
||||
|
||||
### 5. 一些游戏工具
|
||||
|
||||
目前已有强制游戏无边框窗口化,CSGO修复VAC屏蔽。
|
||||
这一块是随缘做一些我经常用或者闲着没事捣鼓的功能。
|
||||
将任何游戏强制无边框窗口化
|
||||
[attachimg]1228392[/attachimg]
|
||||
[attachimg]1228392[/attachimg]
|
||||
使任何窗口化游戏变成动态桌面壁纸(终于可以用《山》当壁纸了)
|
||||
[attachimg]1228393[/attachimg]
|
||||
|
||||
@@ -116,9 +112,11 @@ Steam++只在keylol论坛与github发布,为了账号安全,请不要到其
|
||||
> [Github](https://github.com/rmbadmin/SteamTools/releases)
|
||||
> 分流下载:
|
||||
> [hide]
|
||||
> [蓝奏云](https://wws.lanzous.com/ihW80jkylcb)
|
||||
> [百度云](https://pan.baidu.com/s/1um0YboiVGZTs4rC6uCCa1g)
|
||||
> 提取码:pz3t
|
||||
> [蓝奏云](https://wws.lanzous.com/icwdPkpnu1e)
|
||||
> [百度云](https://pan.baidu.com/s/1EG8e1Oi4Mg2KCiF42oKnig)
|
||||
> 提取码:stpp
|
||||
> [/hide]
|
||||
> EXE 大小:4.85MB
|
||||
> MD5:F819FEAA3463E0B9DED7E94AB87088B0
|
||||
> EXE 大小:4.87MB
|
||||
> MD5:8965D1A2EC7688F1EDEF3DA81667A009
|
||||
> [查毒链接](https://www.virustotal.com/gui/file/9931d6034c3b8f6c362ecb991a21d205623734fbee201e62f813d05f50347e64/detection)
|
||||
虽然没有什么杀毒软件报毒,但是使用过程中可能遇到windows defender误报,您可以选择添加信任。
|
||||
|
Before Width: | Height: | Size: 145 KiB After Width: | Height: | Size: 145 KiB |
|
Before Width: | Height: | Size: 148 KiB After Width: | Height: | Size: 148 KiB |
|
Before Width: | Height: | Size: 322 KiB After Width: | Height: | Size: 322 KiB |
|
After Width: | Height: | Size: 58 KiB |
|
Before Width: | Height: | Size: 130 KiB After Width: | Height: | Size: 130 KiB |
|
Before Width: | Height: | Size: 427 KiB After Width: | Height: | Size: 427 KiB |
|
Before Width: | Height: | Size: 1.8 MiB After Width: | Height: | Size: 1.8 MiB |
@@ -0,0 +1,362 @@
|
||||
[
|
||||
{
|
||||
"Name": "*瑞",
|
||||
"Amount": 5,
|
||||
"OrderNumber": "",
|
||||
"PayType": 1,
|
||||
"Remark": "请大佬喝瓶饮料",
|
||||
"PayTime": "2020-12-17 19:41:57"
|
||||
},
|
||||
{
|
||||
"Name": "**耀",
|
||||
"Amount": 5,
|
||||
"OrderNumber": "",
|
||||
"PayType": 1,
|
||||
"Remark": "小小支持一波!",
|
||||
"PayTime": "2020-12-17 20:46:01"
|
||||
},
|
||||
{
|
||||
"Name": "**皓",
|
||||
"Amount": 1,
|
||||
"OrderNumber": "",
|
||||
"PayType": 1,
|
||||
"Remark": "2077掏空了我,等挂卡出来。在。。em",
|
||||
"PayTime": "2020-12-17 22:41:27"
|
||||
},
|
||||
{
|
||||
"Name": "**宇",
|
||||
"Amount": 1,
|
||||
"OrderNumber": "",
|
||||
"PayType": 1,
|
||||
"Remark": "",
|
||||
"PayTime": "2020-12-18 08:39:42"
|
||||
},
|
||||
{
|
||||
"Name": "*钊",
|
||||
"Amount": 20,
|
||||
"OrderNumber": "",
|
||||
"PayType": 1,
|
||||
"Remark": "其乐坛友bzll6538一点心意",
|
||||
"PayTime": "2020-12-19 17:10:44"
|
||||
},
|
||||
{
|
||||
"Name": "R*n",
|
||||
"Amount": 20,
|
||||
"OrderNumber": "",
|
||||
"PayType": 2,
|
||||
"Remark": "绿豆",
|
||||
"PayTime": "2020-12-17 14:32:00"
|
||||
},
|
||||
{
|
||||
"Name": "*炜",
|
||||
"Amount": 100,
|
||||
"OrderNumber": "",
|
||||
"PayType": 1,
|
||||
"Remark": "其乐坛友Davyheaven",
|
||||
"PayTime": "2020-12-20 12:02:17"
|
||||
},
|
||||
{
|
||||
"Name": "**智",
|
||||
"Amount": 20,
|
||||
"OrderNumber": "",
|
||||
"PayType": 1,
|
||||
"Remark": "派大星",
|
||||
"PayTime": "2020-12-20 12:21:04"
|
||||
},
|
||||
{
|
||||
"Name": "*森",
|
||||
"Amount": 66,
|
||||
"OrderNumber": "",
|
||||
"PayType": 1,
|
||||
"Remark": "区区心意,不成敬意(三个六给不起)",
|
||||
"PayTime": "2020-12-21 23:03:26"
|
||||
},
|
||||
{
|
||||
"Name": "*珂",
|
||||
"Amount": 50,
|
||||
"OrderNumber": "",
|
||||
"PayType": 1,
|
||||
"Remark": "其乐YK93,支持大佬",
|
||||
"PayTime": "2020-12-21 23:18:09"
|
||||
},
|
||||
{
|
||||
"Name": "**丰",
|
||||
"Amount": 1,
|
||||
"OrderNumber": "",
|
||||
"PayType": 1,
|
||||
"Remark": "",
|
||||
"PayTime": "2020-12-22 12:33:46"
|
||||
},
|
||||
{
|
||||
"Name": "Ruby",
|
||||
"Amount": 77,
|
||||
"OrderNumber": "",
|
||||
"PayType": 2,
|
||||
"Remark": "资瓷一下",
|
||||
"PayTime": "2020-12-24 19:40:25"
|
||||
},
|
||||
{
|
||||
"Name": "**桐",
|
||||
"Amount": 1,
|
||||
"OrderNumber": "",
|
||||
"PayType": 1,
|
||||
"Remark": "",
|
||||
"PayTime": "2020-12-26 09:32:57"
|
||||
},
|
||||
{
|
||||
"Name": "**珂",
|
||||
"Amount": 5,
|
||||
"OrderNumber": "",
|
||||
"PayType": 1,
|
||||
"Remark": "其乐坛友wjkhj123,小小支持一波",
|
||||
"PayTime": "2020-12-26 13:28:07"
|
||||
},
|
||||
{
|
||||
"Name": "z.w",
|
||||
"Amount": 10,
|
||||
"OrderNumber": "",
|
||||
"PayType": 2,
|
||||
"Remark": "滋瓷一下",
|
||||
"PayTime": "2020-12-26 15:34:50"
|
||||
},
|
||||
{
|
||||
"Name": "**林",
|
||||
"Amount": 6,
|
||||
"OrderNumber": "",
|
||||
"PayType": 2,
|
||||
"Remark": "一丶心意,大佬加油!",
|
||||
"PayTime": "2020-12-26 18:25:06"
|
||||
},
|
||||
{
|
||||
"Name": "**立",
|
||||
"Amount": 1,
|
||||
"OrderNumber": "",
|
||||
"PayType": 2,
|
||||
"Remark": "",
|
||||
"PayTime": "2020-12-26 18:56:57"
|
||||
},
|
||||
{
|
||||
"Name": "*易",
|
||||
"Amount": 6.66,
|
||||
"OrderNumber": "",
|
||||
"PayType": 1,
|
||||
"Remark": "其乐Kenagi,给大佬递冰阔落",
|
||||
"PayTime": "2020-12-27 13:55:11"
|
||||
},
|
||||
{
|
||||
"Name": "*明",
|
||||
"Amount": 10,
|
||||
"OrderNumber": "",
|
||||
"PayType": 1,
|
||||
"Remark": "感谢大佬",
|
||||
"PayTime": "2020-12-27 21:28:40"
|
||||
},
|
||||
{
|
||||
"Name": "山山为川",
|
||||
"Amount": 1,
|
||||
"OrderNumber": "",
|
||||
"PayType": 2,
|
||||
"Remark": "",
|
||||
"PayTime": "2020-12-27 22:17:22"
|
||||
},
|
||||
{
|
||||
"Name": "*梁",
|
||||
"Amount": 3,
|
||||
"OrderNumber": "",
|
||||
"PayType": 1,
|
||||
"Remark": "其乐wuwang23333 给大佬递",
|
||||
"PayTime": "2020-12-28 11:59:20"
|
||||
},
|
||||
{
|
||||
"Name": "**男",
|
||||
"Amount": 1,
|
||||
"OrderNumber": "",
|
||||
"PayType": 1,
|
||||
"Remark": "越做越好",
|
||||
"PayTime": "2020-12-28 14:54:48"
|
||||
},
|
||||
{
|
||||
"Name": "匿名",
|
||||
"Amount": 14.61,
|
||||
"OrderNumber": "",
|
||||
"PayType": 2,
|
||||
"Remark": "",
|
||||
"PayTime": "2020-12-28 14:07:44"
|
||||
},
|
||||
{
|
||||
"Name": "jiwuwang",
|
||||
"Amount": 10,
|
||||
"OrderNumber": "",
|
||||
"PayType": 2,
|
||||
"Remark": "希望挂卡早点安排上",
|
||||
"PayTime": "2020-12-29 03:14:35"
|
||||
},
|
||||
{
|
||||
"Name": "缄默",
|
||||
"Amount": 10,
|
||||
"OrderNumber": "",
|
||||
"PayType": 2,
|
||||
"Remark": "给软软打call!steam++是目前接触的最好用的插件!",
|
||||
"PayTime": "2020-12-29 12:35:07"
|
||||
},
|
||||
{
|
||||
"Name": "**宇",
|
||||
"Amount": 6,
|
||||
"OrderNumber": "",
|
||||
"PayType": 1,
|
||||
"Remark": "",
|
||||
"PayTime": "2020-12-31 20:14:05"
|
||||
},
|
||||
{
|
||||
"Name": "**东",
|
||||
"Amount": 1,
|
||||
"OrderNumber": "",
|
||||
"PayType": 1,
|
||||
"Remark": "一点绵薄之力,希望继续完善!",
|
||||
"PayTime": "2021-01-03 21:28:08"
|
||||
},
|
||||
{
|
||||
"Name": "**羽",
|
||||
"Amount": 5,
|
||||
"OrderNumber": "",
|
||||
"PayType": 2,
|
||||
"Remark": "感谢大佬",
|
||||
"PayTime": "2021-01-05 16:22:11"
|
||||
},
|
||||
{
|
||||
"Name": "**彬",
|
||||
"Amount": 5,
|
||||
"OrderNumber": "",
|
||||
"PayType": 1,
|
||||
"Remark": "平其心论天下之事,定其心应天下之变",
|
||||
"PayTime": "2021-01-06 17:08:36"
|
||||
},
|
||||
{
|
||||
"Name": "K",
|
||||
"Amount": 10,
|
||||
"OrderNumber": "",
|
||||
"PayType": 2,
|
||||
"Remark": "支持一下",
|
||||
"PayTime": "2021-01-07 14:46:04"
|
||||
},
|
||||
{
|
||||
"Name": "*鹏",
|
||||
"Amount": 10,
|
||||
"OrderNumber": "",
|
||||
"PayType": 1,
|
||||
"Remark": "加油💪",
|
||||
"PayTime": "2021-01-07 11:42:38"
|
||||
},
|
||||
{
|
||||
"Name": "*成",
|
||||
"Amount": 6.66,
|
||||
"OrderNumber": "",
|
||||
"PayType": 1,
|
||||
"Remark": "",
|
||||
"PayTime": "2021-01-07 12:25:59"
|
||||
},
|
||||
{
|
||||
"Name": "素年",
|
||||
"Amount": 5,
|
||||
"OrderNumber": "",
|
||||
"PayType": 2,
|
||||
"Remark": "不闪退了。支持一下",
|
||||
"PayTime": "2021-01-08 22:37:11"
|
||||
},
|
||||
{
|
||||
"Name": "kingburial",
|
||||
"Amount": 1,
|
||||
"OrderNumber": "",
|
||||
"PayType": 2,
|
||||
"Remark": "不是很常用,但是切换账号就很方便。谢谢啦",
|
||||
"PayTime": "2021-01-09 10:16:04"
|
||||
},
|
||||
{
|
||||
"Name": "**宇",
|
||||
"Amount": 5,
|
||||
"OrderNumber": "",
|
||||
"PayType": 1,
|
||||
"Remark": "",
|
||||
"PayTime": "2021-01-12 20:39:26"
|
||||
},
|
||||
{
|
||||
"Name": "Mixer",
|
||||
"Amount": 20,
|
||||
"OrderNumber": "",
|
||||
"PayType": 2,
|
||||
"Remark": "非常感谢!很好用",
|
||||
"PayTime": "2021-01-14 06:15:26"
|
||||
},
|
||||
{
|
||||
"Name": "**政",
|
||||
"Amount": 5,
|
||||
"OrderNumber": "",
|
||||
"PayType": 2,
|
||||
"Remark": "给个建议 令牌页面保持前端显示",
|
||||
"PayTime": "2021-01-14 11:07:54"
|
||||
},
|
||||
{
|
||||
"Name": "**浩",
|
||||
"Amount": 6.66,
|
||||
"OrderNumber": "",
|
||||
"PayType": 1,
|
||||
"Remark": "",
|
||||
"PayTime": "2021-01-16 09:48:57"
|
||||
},
|
||||
{
|
||||
"Name": "*圣",
|
||||
"Amount": 10,
|
||||
"OrderNumber": "",
|
||||
"PayType": 1,
|
||||
"Remark": "感谢开发出如此好用的工具,略表心意请笑纳",
|
||||
"PayTime": "2021-01-23 00:04:36"
|
||||
},
|
||||
{
|
||||
"Name": "Sheri",
|
||||
"Amount": 10,
|
||||
"OrderNumber": "",
|
||||
"PayType": 2,
|
||||
"Remark": "Sherry",
|
||||
"PayTime": "2021-01-23 09:16:11"
|
||||
},
|
||||
{
|
||||
"Name": "**志",
|
||||
"Amount": 10,
|
||||
"OrderNumber": "",
|
||||
"PayType": 1,
|
||||
"Remark": "谢谢开发出这么方便的软件(*`▽´*)",
|
||||
"PayTime": "2021-01-24 10:40:50"
|
||||
},
|
||||
{
|
||||
"Name": "匿名",
|
||||
"Amount": 5,
|
||||
"OrderNumber": "",
|
||||
"PayType": 2,
|
||||
"Remark": "From keylol",
|
||||
"PayTime": "2021-01-25 04:01:59"
|
||||
},
|
||||
{
|
||||
"Name": "**炜",
|
||||
"Amount": 23.33,
|
||||
"OrderNumber": "",
|
||||
"PayType": 1,
|
||||
"Remark": "更新很给力,支持一下,希望早日出挂卡功能",
|
||||
"PayTime": "2021-01-27 23:08:25"
|
||||
},
|
||||
{
|
||||
"Name": "匿名",
|
||||
"Amount": 1,
|
||||
"OrderNumber": "",
|
||||
"PayType": 2,
|
||||
"Remark": "加油加油",
|
||||
"PayTime": "2021-01-28 11:11:38"
|
||||
},
|
||||
{
|
||||
"Name": "*枫",
|
||||
"Amount": 6.66,
|
||||
"OrderNumber": "",
|
||||
"PayType": 1,
|
||||
"Remark": "",
|
||||
"PayTime": "2021-01-28 16:42:49"
|
||||
}
|
||||
]
|
||||
|
Before Width: | Height: | Size: 199 KiB After Width: | Height: | Size: 199 KiB |
|
Before Width: | Height: | Size: 128 KiB After Width: | Height: | Size: 128 KiB |
|
Before Width: | Height: | Size: 364 KiB After Width: | Height: | Size: 364 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 364 KiB After Width: | Height: | Size: 364 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 236 KiB After Width: | Height: | Size: 236 KiB |
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
@@ -0,0 +1,887 @@
|
||||
/*
|
||||
* Copyright (C) 2015 Colin Mackie.
|
||||
* This software is distributed under the terms of the GNU General Public License.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections.Specialized;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Net.Cache;
|
||||
using System.Security.Cryptography;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Web;
|
||||
using System.Xml;
|
||||
using System.Xml.Serialization;
|
||||
using System.Xml.XPath;
|
||||
|
||||
using Org.BouncyCastle.Crypto;
|
||||
using Org.BouncyCastle.Crypto.Engines;
|
||||
using Org.BouncyCastle.Crypto.Macs;
|
||||
using Org.BouncyCastle.Crypto.Parameters;
|
||||
using Org.BouncyCastle.Crypto.Paddings;
|
||||
using Org.BouncyCastle.Crypto.Digests;
|
||||
using Org.BouncyCastle.Crypto.Generators;
|
||||
|
||||
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
using System.Net.Security;
|
||||
|
||||
#if NUNIT
|
||||
using NUnit.Framework;
|
||||
#endif
|
||||
|
||||
#if NETCF
|
||||
using OpenNETCF.Security.Cryptography;
|
||||
#endif
|
||||
|
||||
namespace WinAuth
|
||||
{
|
||||
/// <summary>
|
||||
/// Class that implements Steam's SteamGuadrd version of the RFC6238 Authenticator
|
||||
/// </summary>
|
||||
public class SteamAuthenticator : Authenticator
|
||||
{
|
||||
/// <summary>
|
||||
/// Number of characters in code
|
||||
/// </summary>
|
||||
private const int CODE_DIGITS = 5;
|
||||
|
||||
/// <summary>
|
||||
/// Number of minutes to ignore syncing if network error
|
||||
/// </summary>
|
||||
private const int SYNC_ERROR_MINUTES = 60;
|
||||
|
||||
/// <summary>
|
||||
/// Number of attempts to activate
|
||||
/// </summary>
|
||||
private const int ENROLL_ACTIVATE_RETRIES = 30;
|
||||
|
||||
/// <summary>
|
||||
/// Incorrect activation code
|
||||
/// </summary>
|
||||
private const int INVALID_ACTIVATION_CODE = 89;
|
||||
|
||||
/// <summary>
|
||||
/// Time for http request when calling Sync in ms
|
||||
/// </summary>
|
||||
private const int SYNC_TIMEOUT = 30000;
|
||||
|
||||
/// <summary>
|
||||
/// Steam issuer for KeyUri
|
||||
/// </summary>
|
||||
private const string STEAM_ISSUER = "Steam";
|
||||
|
||||
/// <summary>
|
||||
/// URLs for all mobile services
|
||||
/// </summary>
|
||||
private static string COMMUNITY_BASE = "https://steamcommunity.com";
|
||||
private static string WEBAPI_BASE = "https://api.steampowered.com";
|
||||
private static string SYNC_URL = "https://api.steampowered.com:443/ITwoFactorService/QueryTime/v0001";
|
||||
|
||||
/// <summary>
|
||||
/// Character set for authenticator code
|
||||
/// </summary>
|
||||
private static char[] STEAMCHARS = new char[] {
|
||||
'2', '3', '4', '5', '6', '7', '8', '9', 'B', 'C',
|
||||
'D', 'F', 'G', 'H', 'J', 'K', 'M', 'N', 'P', 'Q',
|
||||
'R', 'T', 'V', 'W', 'X', 'Y'};
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Enrolling state
|
||||
/// </summary>
|
||||
public class EnrollState
|
||||
{
|
||||
public string Username { get; set; }
|
||||
public string Password { get; set; }
|
||||
public string CaptchaId { get; set; }
|
||||
public string CaptchaUrl { get; set; }
|
||||
public string CaptchaText { get; set; }
|
||||
public string EmailDomain { get; set; }
|
||||
public string EmailAuthText { get; set; }
|
||||
public string ActivationCode { get; set; }
|
||||
public CookieContainer Cookies { get; set; }
|
||||
|
||||
public string SteamId { get; set; }
|
||||
public string OAuthToken { get; set; }
|
||||
|
||||
public bool RequiresLogin { get; set; }
|
||||
public bool RequiresCaptcha { get; set; }
|
||||
public bool Requires2FA { get; set; }
|
||||
public bool RequiresEmailAuth { get; set; }
|
||||
public bool RequiresActivation { get; set; }
|
||||
|
||||
public string RevocationCode { get; set; }
|
||||
public string SecretKey { get; set; }
|
||||
public bool Success { get; set; }
|
||||
|
||||
public string Error { get; set; }
|
||||
}
|
||||
|
||||
#region Authenticator data
|
||||
|
||||
/// <summary>
|
||||
/// Time of last Sync error
|
||||
/// </summary>
|
||||
private static DateTime _lastSyncError = DateTime.MinValue;
|
||||
|
||||
/// <summary>
|
||||
/// Returned serial number of authenticator
|
||||
/// </summary>
|
||||
public string Serial { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Random device ID we created and registered
|
||||
/// </summary>
|
||||
public string DeviceId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// JSON steam data
|
||||
/// </summary>
|
||||
public string SteamData { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// JSON session data
|
||||
/// </summary>
|
||||
public string SessionData { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string PollData { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Current Steam client instance
|
||||
/// </summary>
|
||||
public SteamClient Client { get; protected set; }
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// Expanding offsets to retry when creating first code
|
||||
/// </summary>
|
||||
private int[] ENROLL_OFFSETS = new int[] { 0, -30, 30, -60, 60, -90, 90, -120, 120 };
|
||||
|
||||
/// <summary>
|
||||
/// Create a new Authenticator object
|
||||
/// </summary>
|
||||
public SteamAuthenticator()
|
||||
: base(CODE_DIGITS)
|
||||
{
|
||||
Issuer = STEAM_ISSUER;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get/set the combined secret data value
|
||||
/// </summary>
|
||||
public override string SecretData
|
||||
{
|
||||
get
|
||||
{
|
||||
if (this.Client != null && this.Client.Session != null)
|
||||
{
|
||||
this.SessionData = this.Client.Session.ToString();
|
||||
}
|
||||
|
||||
//if (Logger != null)
|
||||
//{
|
||||
// Logger.Debug("Get Steam data: {0}, Session:{1}", (SteamData ?? string.Empty).Replace("\n"," ").Replace("\r",""), (SessionData ?? string.Empty).Replace("\n", " ").Replace("\r", ""));
|
||||
//}
|
||||
|
||||
// this is the key | serial | deviceid
|
||||
return base.SecretData
|
||||
+ "|" + Authenticator.ByteArrayToString(Encoding.UTF8.GetBytes(Serial))
|
||||
+ "|" + Authenticator.ByteArrayToString(Encoding.UTF8.GetBytes(DeviceId))
|
||||
+ "|" + Authenticator.ByteArrayToString(Encoding.UTF8.GetBytes(SteamData))
|
||||
+ "|" + (string.IsNullOrEmpty(SessionData) == false ? Authenticator.ByteArrayToString(Encoding.UTF8.GetBytes(SessionData)) : string.Empty);
|
||||
}
|
||||
set
|
||||
{
|
||||
// extract key + serial + deviceid
|
||||
if (string.IsNullOrEmpty(value) == false)
|
||||
{
|
||||
string[] parts = value.Split('|');
|
||||
base.SecretData = value;
|
||||
Serial = (parts.Length > 1 ? Encoding.UTF8.GetString(Authenticator.StringToByteArray(parts[1])) : null);
|
||||
DeviceId = (parts.Length > 2 ? Encoding.UTF8.GetString(Authenticator.StringToByteArray(parts[2])) : null);
|
||||
SteamData = (parts.Length > 3 ? Encoding.UTF8.GetString(Authenticator.StringToByteArray(parts[3])) : string.Empty);
|
||||
|
||||
if (string.IsNullOrEmpty(SteamData) == false && SteamData[0] != '{')
|
||||
{
|
||||
// convert old recovation code into SteamData json
|
||||
SteamData = "{\"revocation_code\":\"" + SteamData + "\"}";
|
||||
}
|
||||
string session = (parts.Length > 4 ? Encoding.UTF8.GetString(Authenticator.StringToByteArray(parts[4])) : null);
|
||||
|
||||
//if (Logger != null)
|
||||
//{
|
||||
// Logger.Debug("Set Steam data: {0}, Session:{1}", (SteamData ?? string.Empty).Replace("\n", " ").Replace("\r", ""), (SessionData ?? string.Empty).Replace("\n", " ").Replace("\r", ""));
|
||||
//}
|
||||
|
||||
if (string.IsNullOrEmpty(session) == false)
|
||||
{
|
||||
SessionData = session;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
SecretKey = null;
|
||||
Serial = null;
|
||||
DeviceId = null;
|
||||
SteamData = null;
|
||||
SessionData = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get (or create) the current Steam client for this Authenticator
|
||||
/// </summary>
|
||||
/// <returns>current or new SteamClient</returns>
|
||||
public SteamClient GetClient()
|
||||
{
|
||||
lock (this)
|
||||
{
|
||||
if (this.Client == null)
|
||||
{
|
||||
this.Client = new SteamClient(this, this.SessionData);
|
||||
}
|
||||
|
||||
return this.Client;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Perform a request to the Steam WebAPI service
|
||||
/// </summary>
|
||||
/// <param name="url">API url</param>
|
||||
/// <param name="method">GET or POST</param>
|
||||
/// <param name="data">Name-data pairs</param>
|
||||
/// <param name="cookies">current cookie container</param>
|
||||
/// <returns>response body</returns>
|
||||
private string Request(string url, string method, NameValueCollection data = null, CookieContainer cookies = null, NameValueCollection headers = null, int timeout = 0)
|
||||
{
|
||||
// create form-encoded data for query or body
|
||||
string query = (data == null ? string.Empty : string.Join("&", Array.ConvertAll(data.AllKeys, key => String.Format("{0}={1}", HttpUtility.UrlEncode(key), HttpUtility.UrlEncode(data[key])))));
|
||||
if (string.Compare(method, "GET", true) == 0)
|
||||
{
|
||||
url += (url.IndexOf("?") == -1 ? "?" : "&") + query;
|
||||
}
|
||||
|
||||
ServicePointManager.ServerCertificateValidationCallback = new RemoteCertificateValidationCallback((sender, certificate, chain, sslPolicyErrors) =>
|
||||
{
|
||||
return true;
|
||||
});
|
||||
// call the server
|
||||
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
|
||||
request.Method = method;
|
||||
request.Accept = "text/javascript, text/html, application/xml, text/xml, */*";
|
||||
request.ServicePoint.Expect100Continue = false;
|
||||
request.UserAgent = "Mozilla/5.0 (Linux; U; Android 4.1.1; en-us; Google Nexus 4 - 4.1.1 - API 16 - 768x1280 Build/JRO03S) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30";
|
||||
request.AutomaticDecompression = DecompressionMethods.Deflate | DecompressionMethods.GZip;
|
||||
request.Referer = COMMUNITY_BASE; // + "/mobilelogin?oauth_client_id=DE45CD61&oauth_scope=read_profile%20write_profile%20read_client%20write_client";
|
||||
if (headers != null)
|
||||
{
|
||||
request.Headers.Add(headers);
|
||||
}
|
||||
if (cookies != null)
|
||||
{
|
||||
request.CookieContainer = cookies;
|
||||
}
|
||||
if (timeout != 0)
|
||||
{
|
||||
request.Timeout = timeout;
|
||||
}
|
||||
|
||||
if (string.Compare(method, "POST", true) == 0)
|
||||
{
|
||||
request.ContentType = "application/x-www-form-urlencoded; charset=UTF-8";
|
||||
request.ContentLength = query.Length;
|
||||
|
||||
StreamWriter requestStream = new StreamWriter(request.GetRequestStream());
|
||||
requestStream.Write(query);
|
||||
requestStream.Close();
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
using (HttpWebResponse response = (HttpWebResponse)request.GetResponse())
|
||||
{
|
||||
LogRequest(method, url, cookies, data, response.StatusCode.ToString() + " " + response.StatusDescription);
|
||||
|
||||
// OK?
|
||||
if (response.StatusCode != HttpStatusCode.OK)
|
||||
{
|
||||
throw new InvalidRequestException(string.Format("{0}: {1}", (int)response.StatusCode, response.StatusDescription));
|
||||
}
|
||||
|
||||
// load the response
|
||||
using (StreamReader responseStream = new StreamReader(response.GetResponseStream()))
|
||||
{
|
||||
string responseData = responseStream.ReadToEnd();
|
||||
LogRequest(method, url, cookies, data, responseData);
|
||||
return responseData;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LogException(method, url, cookies, data, ex);
|
||||
|
||||
if (ex is WebException && ((WebException)ex).Response != null && ((HttpWebResponse)((WebException)ex).Response).StatusCode == HttpStatusCode.Forbidden)
|
||||
{
|
||||
throw new UnauthorisedRequestException(ex);
|
||||
}
|
||||
|
||||
throw new InvalidRequestException(ex.Message, ex);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Enroll the authenticator with the server
|
||||
/// </summary>
|
||||
public bool Enroll(EnrollState state)
|
||||
{
|
||||
// clear error
|
||||
state.Error = null;
|
||||
|
||||
try
|
||||
{
|
||||
var data = new NameValueCollection();
|
||||
var cookies = state.Cookies = state.Cookies ?? new CookieContainer();
|
||||
string response;
|
||||
|
||||
if (string.IsNullOrEmpty(state.OAuthToken) == true)
|
||||
{
|
||||
// get session
|
||||
if (cookies.Count == 0)
|
||||
{
|
||||
cookies.Add(new Uri(COMMUNITY_BASE + "/"), new Cookie("mobileClientVersion", "3067969+%282.1.3%29"));
|
||||
cookies.Add(new Uri(COMMUNITY_BASE + "/"), new Cookie("mobileClient", "android"));
|
||||
cookies.Add(new Uri(COMMUNITY_BASE + "/"), new Cookie("steamid", ""));
|
||||
cookies.Add(new Uri(COMMUNITY_BASE + "/"), new Cookie("steamLogin", ""));
|
||||
cookies.Add(new Uri(COMMUNITY_BASE + "/"), new Cookie("Steam_Language", "english"));
|
||||
cookies.Add(new Uri(COMMUNITY_BASE + "/"), new Cookie("dob", ""));
|
||||
|
||||
NameValueCollection headers = new NameValueCollection();
|
||||
headers.Add("X-Requested-With", "com.valvesoftware.android.steam.community");
|
||||
|
||||
response = Request("https://steamcommunity.com/mobilelogin?oauth_client_id=DE45CD61&oauth_scope=read_profile%20write_profile%20read_client%20write_client", "GET", null, cookies, headers);
|
||||
}
|
||||
|
||||
// Steam strips any non-ascii chars from username and password
|
||||
state.Username = Regex.Replace(state.Username, @"[^\u0000-\u007F]", string.Empty);
|
||||
state.Password = Regex.Replace(state.Password, @"[^\u0000-\u007F]", string.Empty);
|
||||
|
||||
// get the user's RSA key
|
||||
data.Add("username", state.Username);
|
||||
response = Request(COMMUNITY_BASE + "/mobilelogin/getrsakey", "POST", data, cookies);
|
||||
var rsaresponse = JObject.Parse(response);
|
||||
if (rsaresponse.SelectToken("success").Value<bool>() != true)
|
||||
{
|
||||
throw new InvalidEnrollResponseException("Cannot get steam information for user: " + state.Username);
|
||||
}
|
||||
|
||||
// encrypt password with RSA key
|
||||
RNGCryptoServiceProvider random = new RNGCryptoServiceProvider();
|
||||
byte[] encryptedPassword;
|
||||
using (var rsa = new RSACryptoServiceProvider())
|
||||
{
|
||||
var passwordBytes = Encoding.ASCII.GetBytes(state.Password);
|
||||
var p = rsa.ExportParameters(false);
|
||||
p.Exponent = Authenticator.StringToByteArray(rsaresponse.SelectToken("publickey_exp").Value<string>());
|
||||
p.Modulus = Authenticator.StringToByteArray(rsaresponse.SelectToken("publickey_mod").Value<string>());
|
||||
rsa.ImportParameters(p);
|
||||
encryptedPassword = rsa.Encrypt(passwordBytes, false);
|
||||
}
|
||||
|
||||
// login request
|
||||
data = new NameValueCollection();
|
||||
data.Add("password", Convert.ToBase64String(encryptedPassword));
|
||||
data.Add("username", state.Username);
|
||||
data.Add("twofactorcode", "");
|
||||
data.Add("emailauth", (state.EmailAuthText != null ? state.EmailAuthText : string.Empty));
|
||||
data.Add("loginfriendlyname", "#login_emailauth_friendlyname_mobile");
|
||||
data.Add("captchagid", (state.CaptchaId != null ? state.CaptchaId : "-1"));
|
||||
data.Add("captcha_text", (state.CaptchaText != null ? state.CaptchaText : "enter above characters"));
|
||||
data.Add("emailsteamid", (state.EmailAuthText != null ? state.SteamId ?? string.Empty : string.Empty));
|
||||
data.Add("rsatimestamp", rsaresponse.SelectToken("timestamp").Value<string>());
|
||||
data.Add("remember_login", "false");
|
||||
data.Add("oauth_client_id", "DE45CD61");
|
||||
data.Add("oauth_scope", "read_profile write_profile read_client write_client");
|
||||
data.Add("donotache", new DateTime().ToUniversalTime().Subtract(new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc)).TotalMilliseconds.ToString());
|
||||
response = Request(COMMUNITY_BASE + "/mobilelogin/dologin/", "POST", data, cookies);
|
||||
Dictionary<string, object> loginresponse = JsonConvert.DeserializeObject<Dictionary<string, object>>(response);
|
||||
|
||||
if (loginresponse.ContainsKey("emailsteamid") == true)
|
||||
{
|
||||
state.SteamId = loginresponse["emailsteamid"] as string;
|
||||
}
|
||||
|
||||
// require captcha
|
||||
if (loginresponse.ContainsKey("captcha_needed") == true && (bool)loginresponse["captcha_needed"] == true)
|
||||
{
|
||||
state.RequiresCaptcha = true;
|
||||
state.CaptchaId = (string)loginresponse["captcha_gid"];
|
||||
state.CaptchaUrl = COMMUNITY_BASE + "/public/captcha.php?gid=" + state.CaptchaId;
|
||||
}
|
||||
else
|
||||
{
|
||||
state.RequiresCaptcha = false;
|
||||
state.CaptchaId = null;
|
||||
state.CaptchaUrl = null;
|
||||
state.CaptchaText = null;
|
||||
}
|
||||
|
||||
// require email auth
|
||||
if (loginresponse.ContainsKey("emailauth_needed") == true && (bool)loginresponse["emailauth_needed"] == true)
|
||||
{
|
||||
if (loginresponse.ContainsKey("emaildomain") == true)
|
||||
{
|
||||
var emaildomain = (string)loginresponse["emaildomain"];
|
||||
if (string.IsNullOrEmpty(emaildomain) == false)
|
||||
{
|
||||
state.EmailDomain = emaildomain;
|
||||
}
|
||||
}
|
||||
state.RequiresEmailAuth = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
state.EmailDomain = null;
|
||||
state.RequiresEmailAuth = false;
|
||||
}
|
||||
|
||||
// require email auth
|
||||
if (loginresponse.ContainsKey("requires_twofactor") == true && (bool)loginresponse["requires_twofactor"] == true)
|
||||
{
|
||||
state.Requires2FA = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
state.Requires2FA = false;
|
||||
}
|
||||
|
||||
// if we didn't login, return the result
|
||||
if (loginresponse.ContainsKey("login_complete") == false || (bool)loginresponse["login_complete"] == false || loginresponse.ContainsKey("oauth") == false)
|
||||
{
|
||||
if (loginresponse.ContainsKey("oauth") == false)
|
||||
{
|
||||
state.Error = "Invalid response from Steam (No OAuth token)";
|
||||
}
|
||||
if (loginresponse.ContainsKey("message") == true)
|
||||
{
|
||||
state.Error = (string)loginresponse["message"];
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// get the OAuth token - is stringified json
|
||||
string oauth = (string)loginresponse["oauth"];
|
||||
var oauthjson = JObject.Parse(oauth);
|
||||
state.OAuthToken = oauthjson.SelectToken("oauth_token").Value<string>();
|
||||
if (oauthjson.SelectToken("steamid") != null)
|
||||
{
|
||||
state.SteamId = oauthjson.SelectToken("steamid").Value<string>();
|
||||
}
|
||||
}
|
||||
|
||||
// login to webapi
|
||||
data.Clear();
|
||||
data.Add("access_token", state.OAuthToken);
|
||||
response = Request(WEBAPI_BASE + "/ISteamWebUserPresenceOAuth/Logon/v0001", "POST", data);
|
||||
|
||||
var sessionid = cookies.GetCookies(new Uri(COMMUNITY_BASE + "/"))["sessionid"].Value;
|
||||
|
||||
if (state.RequiresActivation == false)
|
||||
{
|
||||
data.Clear();
|
||||
data.Add("op", "has_phone");
|
||||
data.Add("arg", "null");
|
||||
data.Add("sessionid", sessionid);
|
||||
|
||||
response = Request(COMMUNITY_BASE + "/steamguard/phoneajax", "POST", data, cookies);
|
||||
var jsonresponse = JObject.Parse(response);
|
||||
bool hasPhone = jsonresponse.SelectToken("has_phone").Value<Boolean>();
|
||||
if (hasPhone == false)
|
||||
{
|
||||
state.OAuthToken = null; // force new login
|
||||
state.RequiresLogin = true;
|
||||
state.Cookies = null;
|
||||
state.Error = "Your Steam account must have a SMS-capable phone number attached. Go into Account Details of the Steam client or Steam website and click Add a Phone Number.";
|
||||
return false;
|
||||
}
|
||||
|
||||
//response = Request(COMMUNITY_BASE + "/steamguard/phone_checksms?bForTwoFactor=1&bRevoke2fOnCancel=", "GET", null, cookies);
|
||||
|
||||
// add a new authenticator
|
||||
data.Clear();
|
||||
string deviceId = BuildRandomId();
|
||||
data.Add("access_token", state.OAuthToken);
|
||||
data.Add("steamid", state.SteamId);
|
||||
data.Add("authenticator_type", "1");
|
||||
data.Add("device_identifier", deviceId);
|
||||
data.Add("sms_phone_id", "1");
|
||||
response = Request(WEBAPI_BASE + "/ITwoFactorService/AddAuthenticator/v0001", "POST", data);
|
||||
var tfaresponse = JObject.Parse(response);
|
||||
if (response.IndexOf("status") == -1 && tfaresponse.SelectToken("response.status").Value<int>() == 84)
|
||||
{
|
||||
// invalid response
|
||||
state.OAuthToken = null; // force new login
|
||||
state.RequiresLogin = true;
|
||||
state.Cookies = null;
|
||||
state.Error = "Unable to send SMS. Check your phone is registered on your Steam account.";
|
||||
return false;
|
||||
}
|
||||
if (response.IndexOf("shared_secret") == -1)
|
||||
{
|
||||
// invalid response
|
||||
state.OAuthToken = null; // force new login
|
||||
state.RequiresLogin = true;
|
||||
state.Cookies = null;
|
||||
state.Error = "Invalid response from Steam: " + response;
|
||||
return false;
|
||||
}
|
||||
|
||||
// save data into this authenticator
|
||||
var secret = tfaresponse.SelectToken("response.shared_secret").Value<string>();
|
||||
this.SecretKey = Convert.FromBase64String(secret);
|
||||
this.Serial = tfaresponse.SelectToken("response.serial_number").Value<string>();
|
||||
this.DeviceId = deviceId;
|
||||
state.RevocationCode = tfaresponse.SelectToken("response.revocation_code").Value<string>();
|
||||
|
||||
// add the steamid into the data
|
||||
var steamdata = JObject.Parse(tfaresponse.SelectToken("response").ToString());
|
||||
if (steamdata.SelectToken("steamid") == null)
|
||||
{
|
||||
steamdata.Add("steamid", state.SteamId);
|
||||
}
|
||||
if (steamdata.SelectToken("steamguard_scheme") == null)
|
||||
{
|
||||
steamdata.Add("steamguard_scheme", "2");
|
||||
}
|
||||
this.SteamData = steamdata.ToString(Newtonsoft.Json.Formatting.None);
|
||||
|
||||
// calculate server drift
|
||||
long servertime = tfaresponse.SelectToken("response.server_time").Value<long>() * 1000;
|
||||
ServerTimeDiff = servertime - CurrentTime;
|
||||
LastServerTime = DateTime.Now.Ticks;
|
||||
|
||||
state.RequiresActivation = true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
// finalize adding the authenticator
|
||||
data.Clear();
|
||||
data.Add("access_token", state.OAuthToken);
|
||||
data.Add("steamid", state.SteamId);
|
||||
data.Add("activation_code", state.ActivationCode);
|
||||
|
||||
// try and authorise
|
||||
var retries = 0;
|
||||
while (state.RequiresActivation == true && retries < ENROLL_ACTIVATE_RETRIES)
|
||||
{
|
||||
data.Add("authenticator_code", this.CalculateCode(false));
|
||||
data.Add("authenticator_time", this.ServerTime.ToString());
|
||||
response = Request(WEBAPI_BASE + "/ITwoFactorService/FinalizeAddAuthenticator/v0001", "POST", data);
|
||||
var finalizeresponse = JObject.Parse(response);
|
||||
if (response.IndexOf("status") != -1 && finalizeresponse.SelectToken("response.status").Value<int>() == INVALID_ACTIVATION_CODE)
|
||||
{
|
||||
state.Error = "Invalid activation code";
|
||||
return false;
|
||||
}
|
||||
|
||||
// reset our time
|
||||
if (response.IndexOf("server_time") != -1)
|
||||
{
|
||||
long servertime = finalizeresponse.SelectToken("response.server_time").Value<long>() * 1000;
|
||||
ServerTimeDiff = servertime - CurrentTime;
|
||||
LastServerTime = DateTime.Now.Ticks;
|
||||
}
|
||||
|
||||
// check success
|
||||
if (finalizeresponse.SelectToken("response.success").Value<bool>() == true)
|
||||
{
|
||||
if (response.IndexOf("want_more") != -1 && finalizeresponse.SelectToken("response.want_more").Value<bool>() == true)
|
||||
{
|
||||
ServerTimeDiff += ((long)this.Period * 1000L);
|
||||
retries++;
|
||||
continue;
|
||||
}
|
||||
state.RequiresActivation = false;
|
||||
break;
|
||||
}
|
||||
|
||||
ServerTimeDiff += ((long)this.Period * 1000L);
|
||||
retries++;
|
||||
}
|
||||
if (state.RequiresActivation == true)
|
||||
{
|
||||
state.Error = "There was a problem activating. There might be an issue with the Steam servers. Please try again later.";
|
||||
return false;
|
||||
}
|
||||
|
||||
// mark and successful and return key
|
||||
state.Success = true;
|
||||
state.SecretKey = Authenticator.ByteArrayToString(this.SecretKey);
|
||||
|
||||
// send confirmation email
|
||||
data.Clear();
|
||||
data.Add("access_token", state.OAuthToken);
|
||||
data.Add("steamid", state.SteamId);
|
||||
data.Add("email_type", "2");
|
||||
response = Request(WEBAPI_BASE + "/ITwoFactorService/SendEmail/v0001", "POST", data);
|
||||
|
||||
return true;
|
||||
}
|
||||
catch (UnauthorisedRequestException ex)
|
||||
{
|
||||
throw new InvalidEnrollResponseException("You are not allowed to add an authenticator. Have you enabled 'community-generated content' in Family View?", ex);
|
||||
}
|
||||
catch (InvalidRequestException ex)
|
||||
{
|
||||
throw new InvalidEnrollResponseException("Error enrolling new authenticator", ex);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Synchronise this authenticator's time with Steam.
|
||||
/// </summary>
|
||||
public override void Sync()
|
||||
{
|
||||
// check if data is protected
|
||||
if (this.SecretKey == null && this.EncryptedData != null)
|
||||
{
|
||||
throw new EncryptedSecretDataException();
|
||||
}
|
||||
|
||||
// don't retry for 5 minutes
|
||||
if (_lastSyncError >= DateTime.Now.AddMinutes(0 - SYNC_ERROR_MINUTES))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
var response = Request(SYNC_URL, "POST", null, null, null, SYNC_TIMEOUT);
|
||||
var json = JObject.Parse(response);
|
||||
|
||||
// get servertime in ms
|
||||
long servertime = json.SelectToken("response.server_time").Value<long>() * 1000;
|
||||
|
||||
// get the difference between the server time and our current time
|
||||
ServerTimeDiff = servertime - CurrentTime;
|
||||
LastServerTime = DateTime.Now.Ticks;
|
||||
|
||||
// clear any sync error
|
||||
_lastSyncError = DateTime.MinValue;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
// don't retry for a while after error
|
||||
_lastSyncError = DateTime.Now;
|
||||
throw ex;
|
||||
// set to zero to force reset
|
||||
//ServerTimeDiff = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Calculate the current code for the authenticator.
|
||||
/// </summary>
|
||||
/// <param name="resyncTime">flag to resync time</param>
|
||||
/// <returns>authenticator code</returns>
|
||||
protected override string CalculateCode(bool resyncTime = false, long interval = -1)
|
||||
{
|
||||
// sync time if required
|
||||
if (resyncTime == true || ServerTimeDiff == 0)
|
||||
{
|
||||
if (interval > 0)
|
||||
{
|
||||
ServerTimeDiff = (interval * ((long)this.Period * 1000L)) - CurrentTime;
|
||||
}
|
||||
else
|
||||
{
|
||||
Sync();
|
||||
}
|
||||
}
|
||||
|
||||
HMac hmac = new HMac(new Sha1Digest());
|
||||
hmac.Init(new KeyParameter(SecretKey));
|
||||
|
||||
byte[] codeIntervalArray = BitConverter.GetBytes(CodeInterval);
|
||||
if (BitConverter.IsLittleEndian)
|
||||
{
|
||||
Array.Reverse(codeIntervalArray);
|
||||
}
|
||||
hmac.BlockUpdate(codeIntervalArray, 0, codeIntervalArray.Length);
|
||||
|
||||
byte[] mac = new byte[hmac.GetMacSize()];
|
||||
hmac.DoFinal(mac, 0);
|
||||
|
||||
// the last 4 bits of the mac say where the code starts (e.g. if last 4 bit are 1100, we start at byte 12)
|
||||
int start = mac[19] & 0x0f;
|
||||
|
||||
// extract those 4 bytes
|
||||
byte[] bytes = new byte[4];
|
||||
Array.Copy(mac, start, bytes, 0, 4);
|
||||
if (BitConverter.IsLittleEndian)
|
||||
{
|
||||
Array.Reverse(bytes);
|
||||
}
|
||||
uint fullcode = BitConverter.ToUInt32(bytes, 0) & 0x7fffffff;
|
||||
|
||||
// build the alphanumeric code
|
||||
StringBuilder code = new StringBuilder();
|
||||
for (var i = 0; i < CODE_DIGITS; i++)
|
||||
{
|
||||
code.Append(STEAMCHARS[fullcode % STEAMCHARS.Length]);
|
||||
fullcode /= (uint)STEAMCHARS.Length;
|
||||
}
|
||||
|
||||
return code.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create a random Device ID string for Enrolling
|
||||
/// </summary>
|
||||
/// <returns>Random string</returns>
|
||||
private static string BuildRandomId()
|
||||
{
|
||||
return "android:" + Guid.NewGuid().ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Log an exception from a Request
|
||||
/// </summary>
|
||||
/// <param name="method">Get or POST</param>
|
||||
/// <param name="url">Request URL</param>
|
||||
/// <param name="cookies">cookie container</param>
|
||||
/// <param name="request">Request data</param>
|
||||
/// <param name="ex">Thrown exception</param>
|
||||
private static void LogException(string method, string url, CookieContainer cookies, NameValueCollection request, Exception ex)
|
||||
{
|
||||
StringBuilder data = new StringBuilder();
|
||||
if (cookies != null)
|
||||
{
|
||||
foreach (Cookie cookie in cookies.GetCookies(new Uri(url)))
|
||||
{
|
||||
if (data.Length == 0)
|
||||
{
|
||||
data.Append("Cookies:");
|
||||
}
|
||||
else
|
||||
{
|
||||
data.Append("&");
|
||||
}
|
||||
data.Append(cookie.Name + "=" + cookie.Value);
|
||||
}
|
||||
data.Append(" ");
|
||||
}
|
||||
|
||||
if (request != null)
|
||||
{
|
||||
foreach (var key in request.AllKeys)
|
||||
{
|
||||
if (data.Length == 0)
|
||||
{
|
||||
data.Append("Req:");
|
||||
}
|
||||
else
|
||||
{
|
||||
data.Append("&");
|
||||
}
|
||||
data.Append(key + "=" + request[key]);
|
||||
}
|
||||
data.Append(" ");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Log a normal response
|
||||
/// </summary>
|
||||
/// <param name="method">Get or POST</param>
|
||||
/// <param name="url">Request URL</param>
|
||||
/// <param name="cookies">cookie container</param>
|
||||
/// <param name="request">Request data</param>
|
||||
/// <param name="response">response body</param>
|
||||
private static void LogRequest(string method, string url, CookieContainer cookies, NameValueCollection request, string response)
|
||||
{
|
||||
StringBuilder data = new StringBuilder();
|
||||
if (cookies != null)
|
||||
{
|
||||
foreach (Cookie cookie in cookies.GetCookies(new Uri(url)))
|
||||
{
|
||||
if (data.Length == 0)
|
||||
{
|
||||
data.Append("Cookies:");
|
||||
}
|
||||
else
|
||||
{
|
||||
data.Append("&");
|
||||
}
|
||||
data.Append(cookie.Name + "=" + cookie.Value);
|
||||
}
|
||||
data.Append(" ");
|
||||
}
|
||||
|
||||
if (request != null)
|
||||
{
|
||||
foreach (var key in request.AllKeys)
|
||||
{
|
||||
if (data.Length == 0)
|
||||
{
|
||||
data.Append("Req:");
|
||||
}
|
||||
else
|
||||
{
|
||||
data.Append("&");
|
||||
}
|
||||
data.Append(key + "=" + request[key]);
|
||||
}
|
||||
data.Append(" ");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Our custom exception for the internal Http Request
|
||||
/// </summary>
|
||||
class InvalidRequestException : ApplicationException
|
||||
{
|
||||
public InvalidRequestException(string msg = null, Exception ex = null) : base(msg, ex) { }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 403 forbidden responses
|
||||
/// </summary>
|
||||
class UnauthorisedRequestException : InvalidRequestException
|
||||
{
|
||||
public UnauthorisedRequestException(Exception ex = null) : base("Unauthorised", ex) { }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
|
||||
<PackageReference Include="Portable.BouncyCastle" Version="1.8.8" />
|
||||
<PackageReference Include="Portable.BouncyCastle" Version="1.8.9" />
|
||||
<PackageReference Include="System.Security.Cryptography.ProtectedData" Version="5.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
@@ -0,0 +1,76 @@
|
||||
using Org.BouncyCastle.Crypto;
|
||||
using Org.BouncyCastle.OpenSsl;
|
||||
using Org.BouncyCastle.Security;
|
||||
using SteamTool.Model;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Security.Cryptography;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace SteamTool.Proxy
|
||||
{
|
||||
public static class CertificateEx
|
||||
{
|
||||
public static string GetPublicPemCertificateString(this X509Certificate2 @this)
|
||||
{
|
||||
StringBuilder builder = new StringBuilder();
|
||||
builder.AppendLine(Const.HOST_TAG);
|
||||
builder.AppendLine("-----BEGIN CERTIFICATE-----");
|
||||
builder.AppendLine(
|
||||
Convert.ToBase64String(@this.RawData, Base64FormattingOptions.InsertLineBreaks));
|
||||
builder.AppendLine("-----END CERTIFICATE-----");
|
||||
builder.AppendLine(Const.HOST_TAG);
|
||||
return builder.ToString();
|
||||
}
|
||||
|
||||
public static string GetPrivatePemCertificateString(this X509Certificate2 @this)
|
||||
{
|
||||
RSACryptoServiceProvider pkey = (RSACryptoServiceProvider)@this.PrivateKey;
|
||||
|
||||
AsymmetricCipherKeyPair keyPair = DotNetUtilities.GetRsaKeyPair(pkey);
|
||||
using TextWriter tw = new StreamWriter(Path.Combine(AppContext.BaseDirectory, @this.IssuerName.Name + ".key"), false, new UTF8Encoding(false));
|
||||
PemWriter pw = new PemWriter(tw);
|
||||
pw.WriteObject(keyPair.Private);
|
||||
tw.Flush();
|
||||
return tw.ToString();
|
||||
}
|
||||
|
||||
public static List<string> GetSubjectAlternativeNames(this X509Certificate2 certificate)
|
||||
{
|
||||
foreach (X509Extension extension in certificate.Extensions)
|
||||
{
|
||||
// Create an AsnEncodedData object using the extensions information.
|
||||
AsnEncodedData asndata = new AsnEncodedData(extension.Oid, extension.RawData);
|
||||
if (string.Equals(extension.Oid.FriendlyName, "Subject Alternative Name"))
|
||||
{
|
||||
//Console.WriteLine("Extension type: {0}", extension.Oid.FriendlyName);
|
||||
//Console.WriteLine("Oid value: {0}", asndata.Oid.Value);
|
||||
//Console.WriteLine("Raw data length: {0} {1}", asndata.RawData.Length, Environment.NewLine);
|
||||
//Console.WriteLine(asndata.Format(true));
|
||||
|
||||
return new List<string>(
|
||||
asndata.Format(true).Split(new string[] { Environment.NewLine, "DNS Name=" },
|
||||
StringSplitOptions.RemoveEmptyEntries));
|
||||
}
|
||||
|
||||
}
|
||||
return new List<string>();
|
||||
}
|
||||
|
||||
|
||||
public static void SaveCerCertificateFile(this X509Certificate2 @this, string pathOrName)
|
||||
{
|
||||
StringBuilder builder = new StringBuilder();
|
||||
builder.AppendLine("-----BEGIN CERTIFICATE-----");
|
||||
builder.AppendLine(
|
||||
Convert.ToBase64String(@this.Export(X509ContentType.Cert), Base64FormattingOptions.InsertLineBreaks));
|
||||
builder.AppendLine("-----END CERTIFICATE-----");
|
||||
|
||||
File.WriteAllText(pathOrName, builder.ToString(), new UTF8Encoding(false));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -9,6 +9,15 @@ namespace SteamTool.Core.Common
|
||||
{
|
||||
public static class Common
|
||||
{
|
||||
/// <summary>
|
||||
/// 时间戳转DateTime(系统时区)
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static DateTime ToDateTime(this long timestamp)
|
||||
{
|
||||
return TimeZoneInfo.ConvertTimeFromUtc(new DateTime(1970, 1, 1, 0, 0, 0).AddSeconds(timestamp), TimeZoneInfo.Local);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 返回当前时间戳
|
||||
/// </summary>
|
||||
@@ -37,6 +46,16 @@ namespace SteamTool.Core.Common
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 移除字符串内所有\r \n \t
|
||||
/// </summary>
|
||||
/// <param name="str"></param>
|
||||
/// <returns></returns>
|
||||
public static string RemovePattern(this string inputString)
|
||||
{
|
||||
return inputString.Replace("\t", "").Replace("\r", "").Replace("\n", "");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取两个字符串中间的字符串
|
||||
/// </summary>
|
||||
@@ -15,6 +15,10 @@ namespace SteamTool.Core.Common
|
||||
/// <returns></returns>
|
||||
public static string CompressString(this string text)
|
||||
{
|
||||
if (string.IsNullOrEmpty(text))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
byte[] buffer = Encoding.UTF8.GetBytes(text);
|
||||
var memoryStream = new MemoryStream();
|
||||
using (var gZipStream = new GZipStream(memoryStream, CompressionMode.Compress, true))
|
||||
@@ -40,6 +44,10 @@ namespace SteamTool.Core.Common
|
||||
/// <returns></returns>
|
||||
public static string DecompressString(this string compressedText)
|
||||
{
|
||||
if (string.IsNullOrEmpty(compressedText))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
byte[] gZipBuffer = Convert.FromBase64String(compressedText);
|
||||
using var memoryStream = new MemoryStream();
|
||||
int dataLength = BitConverter.ToInt32(gZipBuffer, 0);
|
||||
@@ -0,0 +1,71 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
|
||||
namespace SteamTool.Core.Common
|
||||
{
|
||||
/// <summary>
|
||||
/// 类名 :MD5加密<br/>
|
||||
/// 说明 :<br/>
|
||||
/// </summary>
|
||||
public static class Md5Method
|
||||
{
|
||||
/// <summary>
|
||||
/// 用MD5加密一段字符串
|
||||
/// </summary>
|
||||
/// <param name="str">字符串</param>
|
||||
/// <param name="isLower">是否小写</param>
|
||||
/// <returns>MD5串</returns>
|
||||
public static string MD5Encrypt(string str, bool isLower = false)
|
||||
{
|
||||
using (var md5 = MD5.Create())
|
||||
{
|
||||
var result = md5.ComputeHash(Encoding.UTF8.GetBytes(str));
|
||||
var strResult = BitConverter.ToString(result).Replace("-", "");
|
||||
return isLower ? strResult.ToLower() : strResult;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 用MD5加密流
|
||||
/// </summary>
|
||||
/// <param name="myStream">流</param>
|
||||
/// <returns>str</returns>
|
||||
public static byte[] MD5Encrypt(Stream inputStream)
|
||||
{
|
||||
System.Security.Cryptography.MD5CryptoServiceProvider md5 = new System.Security.Cryptography.MD5CryptoServiceProvider();
|
||||
return md5.ComputeHash(inputStream);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 用MD5加密字节数组
|
||||
/// </summary>
|
||||
/// <param name="myBytes">字节数组</param>
|
||||
/// <returns></returns>
|
||||
public static byte[] MD5Encrypt(byte[] myBytes)
|
||||
{
|
||||
System.Security.Cryptography.MD5CryptoServiceProvider md5 = new System.Security.Cryptography.MD5CryptoServiceProvider();
|
||||
return md5.ComputeHash(myBytes, 0, myBytes.Length);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 文件路径
|
||||
/// </summary>
|
||||
/// <param name="path"></param>
|
||||
/// <returns></returns>
|
||||
public static string FileMD5Encrypt(string path)
|
||||
{
|
||||
using FileStream fs = new FileStream(path, FileMode.Open);
|
||||
MD5CryptoServiceProvider provider = new MD5CryptoServiceProvider();
|
||||
byte[] data = provider.ComputeHash(fs);
|
||||
StringBuilder builder = new StringBuilder();
|
||||
for (int i = 0; i < data.Length; i++)
|
||||
{
|
||||
builder.Append(data[i].ToString("X2"));
|
||||
}
|
||||
return builder.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,322 @@
|
||||
using ICSharpCode.SharpZipLib.Checksum;
|
||||
using ICSharpCode.SharpZipLib.Zip;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace SteamTool.Core.Common
|
||||
{
|
||||
public static class ZipHelper
|
||||
{
|
||||
/// <summary>
|
||||
/// 压缩
|
||||
/// </summary>
|
||||
/// <param name="filename"> 压缩后的文件名(包含物理路径)</param>
|
||||
/// <param name="directory">待压缩的文件夹(包含物理路径)</param>
|
||||
public static void PackFiles(string filename, string directory)
|
||||
{
|
||||
try
|
||||
{
|
||||
FastZip fz = new FastZip();
|
||||
fz.CreateEmptyDirectories = true;
|
||||
fz.CreateZip(filename, directory, true, "");
|
||||
fz = null;
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 解压缩
|
||||
/// </summary>
|
||||
/// <param name="file">待解压文件名(包含物理路径)</param>
|
||||
/// <param name="dir"> 解压到哪个目录中(包含物理路径)</param>
|
||||
public static bool UnpackFiles(string file, string dir)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!Directory.Exists(dir))
|
||||
{
|
||||
Directory.CreateDirectory(dir);
|
||||
}
|
||||
ZipInputStream s = new ZipInputStream(File.OpenRead(file));
|
||||
ZipEntry theEntry;
|
||||
while ((theEntry = s.GetNextEntry()) != null)
|
||||
{
|
||||
string directoryName = Path.GetDirectoryName(theEntry.Name);
|
||||
string fileName = Path.GetFileName(theEntry.Name);
|
||||
if (directoryName != String.Empty)
|
||||
{
|
||||
Directory.CreateDirectory(Path.Combine(dir, directoryName));
|
||||
}
|
||||
if (fileName != String.Empty)
|
||||
{
|
||||
FileStream streamWriter = File.Create(Path.Combine(dir, theEntry.Name));
|
||||
int size = 2048;
|
||||
byte[] data = new byte[2048];
|
||||
while (true)
|
||||
{
|
||||
size = s.Read(data, 0, data.Length);
|
||||
if (size > 0)
|
||||
{
|
||||
streamWriter.Write(data, 0, size);
|
||||
}
|
||||
else
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
streamWriter.Close();
|
||||
}
|
||||
}
|
||||
s.Close();
|
||||
return true;
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
throw;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static class ClassZip
|
||||
{
|
||||
#region 私有方法
|
||||
/// <summary>
|
||||
/// 递归压缩文件夹方法
|
||||
/// </summary>
|
||||
private static bool ZipFileDictory(string FolderToZip, ZipOutputStream s, string ParentFolderName)
|
||||
{
|
||||
bool res = true;
|
||||
string[] folders, filenames;
|
||||
ZipEntry entry = null;
|
||||
FileStream fs = null;
|
||||
Crc32 crc = new Crc32();
|
||||
try
|
||||
{
|
||||
entry = new ZipEntry(Path.Combine(ParentFolderName, Path.GetFileName(FolderToZip) + "/"));
|
||||
s.PutNextEntry(entry);
|
||||
s.Flush();
|
||||
filenames = Directory.GetFiles(FolderToZip);
|
||||
foreach (string file in filenames)
|
||||
{
|
||||
fs = File.OpenRead(file);
|
||||
byte[] buffer = new byte[fs.Length];
|
||||
fs.Read(buffer, 0, buffer.Length);
|
||||
entry = new ZipEntry(Path.Combine(ParentFolderName, Path.GetFileName(FolderToZip) + "/" + Path.GetFileName(file)));
|
||||
entry.DateTime = DateTime.Now;
|
||||
entry.Size = fs.Length;
|
||||
fs.Close();
|
||||
crc.Reset();
|
||||
crc.Update(buffer);
|
||||
entry.Crc = crc.Value;
|
||||
s.PutNextEntry(entry);
|
||||
s.Write(buffer, 0, buffer.Length);
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
res = false;
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (fs != null)
|
||||
{
|
||||
fs.Close();
|
||||
fs = null;
|
||||
}
|
||||
if (entry != null)
|
||||
{
|
||||
entry = null;
|
||||
}
|
||||
GC.Collect();
|
||||
GC.Collect(1);
|
||||
}
|
||||
folders = Directory.GetDirectories(FolderToZip);
|
||||
foreach (string folder in folders)
|
||||
{
|
||||
if (!ZipFileDictory(folder, s, Path.Combine(ParentFolderName, Path.GetFileName(FolderToZip))))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 压缩目录
|
||||
/// </summary>
|
||||
/// <param name="FolderToZip">待压缩的文件夹,全路径格式</param>
|
||||
/// <param name="ZipedFile">压缩后的文件名,全路径格式</param>
|
||||
private static bool ZipFileDictory(string FolderToZip, string ZipedFile, int level)
|
||||
{
|
||||
bool res;
|
||||
if (!Directory.Exists(FolderToZip))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
ZipOutputStream s = new ZipOutputStream(File.Create(ZipedFile));
|
||||
s.SetLevel(level);
|
||||
res = ZipFileDictory(FolderToZip, s, "");
|
||||
s.Finish();
|
||||
s.Close();
|
||||
return res;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 压缩文件
|
||||
/// </summary>
|
||||
/// <param name="FileToZip">要进行压缩的文件名</param>
|
||||
/// <param name="ZipedFile">压缩后生成的压缩文件名</param>
|
||||
private static bool ZipFile(string FileToZip, string ZipedFile, int level)
|
||||
{
|
||||
if (!File.Exists(FileToZip))
|
||||
{
|
||||
throw new System.IO.FileNotFoundException("指定要压缩的文件: " + FileToZip + " 不存在!");
|
||||
}
|
||||
FileStream ZipFile = null;
|
||||
ZipOutputStream ZipStream = null;
|
||||
ZipEntry ZipEntry = null;
|
||||
bool res = true;
|
||||
try
|
||||
{
|
||||
ZipFile = File.OpenRead(FileToZip);
|
||||
byte[] buffer = new byte[ZipFile.Length];
|
||||
ZipFile.Read(buffer, 0, buffer.Length);
|
||||
ZipFile.Close();
|
||||
|
||||
ZipFile = File.Create(ZipedFile);
|
||||
ZipStream = new ZipOutputStream(ZipFile);
|
||||
ZipEntry = new ZipEntry(Path.GetFileName(FileToZip));
|
||||
ZipStream.PutNextEntry(ZipEntry);
|
||||
ZipStream.SetLevel(level);
|
||||
|
||||
ZipStream.Write(buffer, 0, buffer.Length);
|
||||
}
|
||||
catch
|
||||
{
|
||||
res = false;
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (ZipEntry != null)
|
||||
{
|
||||
ZipEntry = null;
|
||||
}
|
||||
if (ZipStream != null)
|
||||
{
|
||||
ZipStream.Finish();
|
||||
ZipStream.Close();
|
||||
}
|
||||
if (ZipFile != null)
|
||||
{
|
||||
ZipFile.Close();
|
||||
ZipFile = null;
|
||||
}
|
||||
GC.Collect();
|
||||
GC.Collect(1);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// 压缩
|
||||
/// </summary>
|
||||
/// <param name="FileToZip">待压缩的文件目录</param>
|
||||
/// <param name="ZipedFile">生成的目标文件</param>
|
||||
/// <param name="level">6</param>
|
||||
public static bool Zip(String FileToZip, String ZipedFile, int level)
|
||||
{
|
||||
if (Directory.Exists(FileToZip))
|
||||
{
|
||||
return ZipFileDictory(FileToZip, ZipedFile, level);
|
||||
}
|
||||
else if (File.Exists(FileToZip))
|
||||
{
|
||||
return ZipFile(FileToZip, ZipedFile, level);
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 解压
|
||||
/// </summary>
|
||||
/// <param name="FileToUpZip">待解压的文件</param>
|
||||
/// <param name="ZipedFolder">解压目标存放目录</param>
|
||||
public static void UnZip(string FileToUpZip, string ZipedFolder)
|
||||
{
|
||||
if (!File.Exists(FileToUpZip))
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (!Directory.Exists(ZipedFolder))
|
||||
{
|
||||
Directory.CreateDirectory(ZipedFolder);
|
||||
}
|
||||
ZipInputStream s = null;
|
||||
ZipEntry theEntry = null;
|
||||
string fileName;
|
||||
FileStream streamWriter = null;
|
||||
try
|
||||
{
|
||||
s = new ZipInputStream(File.OpenRead(FileToUpZip));
|
||||
while ((theEntry = s.GetNextEntry()) != null)
|
||||
{
|
||||
if (theEntry.Name != String.Empty)
|
||||
{
|
||||
fileName = Path.Combine(ZipedFolder, theEntry.Name);
|
||||
if (fileName.EndsWith("/") || fileName.EndsWith("\\"))
|
||||
{
|
||||
Directory.CreateDirectory(fileName);
|
||||
continue;
|
||||
}
|
||||
streamWriter = File.Create(fileName);
|
||||
int size = 2048;
|
||||
byte[] data = new byte[2048];
|
||||
while (true)
|
||||
{
|
||||
size = s.Read(data, 0, data.Length);
|
||||
if (size > 0)
|
||||
{
|
||||
streamWriter.Write(data, 0, size);
|
||||
}
|
||||
else
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (streamWriter != null)
|
||||
{
|
||||
streamWriter.Close();
|
||||
streamWriter = null;
|
||||
}
|
||||
if (theEntry != null)
|
||||
{
|
||||
theEntry = null;
|
||||
}
|
||||
if (s != null)
|
||||
{
|
||||
s.Close();
|
||||
s = null;
|
||||
}
|
||||
GC.Collect();
|
||||
GC.Collect(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -13,12 +13,25 @@ namespace SteamTool.Core
|
||||
{
|
||||
public class HostsService
|
||||
{
|
||||
public readonly static string HostsPath = $"{Environment.GetFolderPath(Environment.SpecialFolder.System)}\\drivers\\etc\\hosts";
|
||||
public readonly static string HostsPath = @$"{Environment.SystemDirectory}\drivers\etc\hosts";
|
||||
|
||||
static HostsService()
|
||||
{
|
||||
if (!File.Exists(HostsPath))
|
||||
{
|
||||
using var fs = File.Create(HostsPath);
|
||||
fs.Close();
|
||||
}
|
||||
}
|
||||
|
||||
public OperationResult<List<string>> ReadHostsAllLines()
|
||||
{
|
||||
var result = new OperationResult<List<string>>(OperationResultType.Error, Resources.Hosts_ReadError);
|
||||
if (!File.Exists(HostsPath))
|
||||
{
|
||||
result.Message = "hosts file was not found";
|
||||
return result;
|
||||
}
|
||||
try
|
||||
{
|
||||
var dataLines = File.ReadAllLines(HostsPath).ToList();
|
||||
@@ -48,7 +61,11 @@ namespace SteamTool.Core
|
||||
public OperationResult UpdateHosts(string ip, string domain)
|
||||
{
|
||||
var result = new OperationResult(OperationResultType.Error, Resources.Hosts_WirteError);
|
||||
|
||||
if (!File.Exists(HostsPath))
|
||||
{
|
||||
result.Message = "hosts file was not found";
|
||||
return result;
|
||||
}
|
||||
//操作前取消只读属性
|
||||
File.SetAttributes(HostsPath, FileAttributes.Normal);
|
||||
|
||||
@@ -75,7 +92,7 @@ namespace SteamTool.Core
|
||||
try
|
||||
{
|
||||
dataLines.Add($"{ip} {domain} {Const.HOST_TAG}");
|
||||
File.WriteAllLines(HostsPath, dataLines);
|
||||
File.WriteAllLines(HostsPath, dataLines, Encoding.UTF8);
|
||||
|
||||
//File.SetAttributes(HostsPath, FileAttributes.ReadOnly);
|
||||
result.ResultType = OperationResultType.Success;
|
||||
@@ -94,7 +111,11 @@ namespace SteamTool.Core
|
||||
public OperationResult UpdateHosts(List<(string ip, string domain)> hosts)
|
||||
{
|
||||
var result = new OperationResult(OperationResultType.Error, Resources.Hosts_WirteError);
|
||||
|
||||
if (!File.Exists(HostsPath))
|
||||
{
|
||||
result.Message = "hosts file was not found";
|
||||
return result;
|
||||
}
|
||||
if (hosts.Count == 0)
|
||||
{
|
||||
return result;
|
||||
@@ -132,7 +153,7 @@ namespace SteamTool.Core
|
||||
}
|
||||
try
|
||||
{
|
||||
File.WriteAllLines(HostsPath, dataLines);
|
||||
File.WriteAllLines(HostsPath, dataLines, Encoding.UTF8);
|
||||
//File.SetAttributes(HostsPath, FileAttributes.ReadOnly);
|
||||
result.ResultType = OperationResultType.Success;
|
||||
result.Message = Resources.Hosts_UpdateSuccess;
|
||||
@@ -150,7 +171,11 @@ namespace SteamTool.Core
|
||||
public OperationResult RemoveHosts(string ip, string domain)
|
||||
{
|
||||
var result = new OperationResult(OperationResultType.Error, Resources.Hosts_WirteError);
|
||||
|
||||
if (!File.Exists(HostsPath))
|
||||
{
|
||||
result.Message = "hosts file was not found";
|
||||
return result;
|
||||
}
|
||||
//操作前取消只读属性
|
||||
File.SetAttributes(HostsPath, FileAttributes.Normal);
|
||||
|
||||
@@ -172,7 +197,7 @@ namespace SteamTool.Core
|
||||
|
||||
try
|
||||
{
|
||||
File.WriteAllLines(HostsPath, dataLines);
|
||||
File.WriteAllLines(HostsPath, dataLines, Encoding.UTF8);
|
||||
|
||||
//File.SetAttributes(HostsPath, FileAttributes.ReadOnly);
|
||||
result.ResultType = OperationResultType.Success;
|
||||
@@ -191,16 +216,18 @@ namespace SteamTool.Core
|
||||
public OperationResult RemoveHostsByTag()
|
||||
{
|
||||
var result = new OperationResult(OperationResultType.Error, Resources.Hosts_WirteError);
|
||||
|
||||
if (!File.Exists(HostsPath))
|
||||
{
|
||||
result.Message = "hosts file was not found";
|
||||
return result;
|
||||
}
|
||||
//操作前取消只读属性
|
||||
File.SetAttributes(HostsPath, FileAttributes.Normal);
|
||||
|
||||
//避免重复写入
|
||||
var dataLines = File.ReadAllLines(HostsPath, Encoding.Default).ToList().FindAll(s =>
|
||||
{
|
||||
var temp = s.Trim().Split(' ').ToList();
|
||||
temp = temp.FindAll(s => !string.IsNullOrEmpty(s));
|
||||
//一行内至少要有两列数据
|
||||
var temp = s.Trim().Split(' ').ToList().FindAll(w => !string.IsNullOrEmpty(w));
|
||||
//有效数据一行内至少要有两列数据
|
||||
if (temp.Count >= 2)
|
||||
{
|
||||
if (!temp[0].StartsWith("#"))
|
||||
@@ -213,7 +240,7 @@ namespace SteamTool.Core
|
||||
|
||||
try
|
||||
{
|
||||
File.WriteAllLines(HostsPath, dataLines);
|
||||
File.WriteAllLines(HostsPath, dataLines, Encoding.UTF8);
|
||||
//File.SetAttributes(HostsPath, FileAttributes.ReadOnly);
|
||||
result.ResultType = OperationResultType.Success;
|
||||
result.Message = Resources.Hosts_UpdateSuccess;
|
||||
@@ -1,5 +1,6 @@
|
||||
using Newtonsoft.Json;
|
||||
using Ninject.Modules;
|
||||
using SteamTool.Core.Common;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Dynamic;
|
||||
@@ -15,27 +16,51 @@ namespace SteamTool.Core
|
||||
{
|
||||
private readonly HttpClient _client = new HttpClient();
|
||||
|
||||
public string UserAgent { get; set; } = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36";
|
||||
public string UserAgent { get; set; } = "Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko";
|
||||
|
||||
public string Accept { get; set; } = "application/json";
|
||||
|
||||
private async Task<string> SendAsync(HttpRequestMessage request)
|
||||
{
|
||||
try
|
||||
{
|
||||
var response = await _client.SendAsync(request).ConfigureAwait(false);
|
||||
|
||||
if (response.IsSuccessStatusCode)
|
||||
{
|
||||
return await response.Content.ReadAsStringAsync().ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.Error(ex);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
private async Task<Stream> SendAsyncAsStream(HttpRequestMessage request)
|
||||
{
|
||||
try
|
||||
{
|
||||
var response = await _client.SendAsync(request).ConfigureAwait(false);
|
||||
|
||||
if (response.IsSuccessStatusCode)
|
||||
{
|
||||
return await response.Content.ReadAsStreamAsync().ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.Error(ex);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public async Task<string> Get(string url)
|
||||
{
|
||||
var request = new HttpRequestMessage(HttpMethod.Get, url);
|
||||
request.Headers.Add("User-Agent", UserAgent);
|
||||
request.Headers.Add("Accept", Accept);
|
||||
|
||||
var response = await _client.SendAsync(request).ConfigureAwait(false);
|
||||
|
||||
if (response.IsSuccessStatusCode)
|
||||
{
|
||||
return await response.Content.ReadAsStringAsync().ConfigureAwait(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return await SendAsync(request);
|
||||
}
|
||||
public async Task<string> Get(string url, Dictionary<string, string> keyValuePairs)
|
||||
{
|
||||
@@ -53,20 +78,7 @@ namespace SteamTool.Core
|
||||
{
|
||||
request.Headers.Add("Accept", Accept);
|
||||
}
|
||||
|
||||
|
||||
var response = await _client.SendAsync(request).ConfigureAwait(false);
|
||||
|
||||
if (response.IsSuccessStatusCode)
|
||||
{
|
||||
return await response.Content.ReadAsStringAsync().ConfigureAwait(false);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return await SendAsync(request);
|
||||
}
|
||||
public async Task<Stream> GetStream(string url, Dictionary<string, string> keyValuePairs)
|
||||
{
|
||||
@@ -85,18 +97,7 @@ namespace SteamTool.Core
|
||||
request.Headers.Add("Accept", Accept);
|
||||
}
|
||||
|
||||
|
||||
var response = await _client.SendAsync(request).ConfigureAwait(false);
|
||||
|
||||
if (response.IsSuccessStatusCode)
|
||||
{
|
||||
return await response.Content.ReadAsStreamAsync().ConfigureAwait(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return await SendAsyncAsStream(request);
|
||||
}
|
||||
|
||||
public async Task<string> Post(string url, string content)
|
||||
@@ -107,18 +108,7 @@ namespace SteamTool.Core
|
||||
};
|
||||
request.Headers.Add("User-Agent", UserAgent);
|
||||
request.Headers.Add("Accept", Accept);
|
||||
|
||||
var response = await _client.SendAsync(request).ConfigureAwait(false);
|
||||
|
||||
if (response.IsSuccessStatusCode)
|
||||
{
|
||||
return await response.Content.ReadAsStringAsync().ConfigureAwait(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return await SendAsync(request);
|
||||
}
|
||||
public async Task<string> Post(string url, Dictionary<string, string> keyValuePairs, string content)
|
||||
{
|
||||
@@ -139,18 +129,7 @@ namespace SteamTool.Core
|
||||
request.Headers.Add("Accept", Accept);
|
||||
}
|
||||
|
||||
|
||||
var response = await _client.SendAsync(request).ConfigureAwait(false);
|
||||
|
||||
if (response.IsSuccessStatusCode)
|
||||
{
|
||||
return await response.Content.ReadAsStringAsync().ConfigureAwait(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return await SendAsync(request);
|
||||
}
|
||||
public async Task<Stream> PostStream(string url, Dictionary<string, string> keyValuePairs, Stream content)
|
||||
{
|
||||
@@ -171,18 +150,7 @@ namespace SteamTool.Core
|
||||
request.Headers.Add("Accept", Accept);
|
||||
}
|
||||
|
||||
|
||||
var response = await _client.SendAsync(request).ConfigureAwait(false);
|
||||
|
||||
if (response.IsSuccessStatusCode)
|
||||
{
|
||||
return await response.Content.ReadAsStreamAsync().ConfigureAwait(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return await SendAsyncAsStream(request);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -19,11 +19,11 @@ namespace SteamTool.Core
|
||||
public SteamToolCore()
|
||||
{
|
||||
Kernel.Bind<ConfigService>().ToConstant(new ConfigService());
|
||||
Kernel.Bind<RegistryKeyService>().To<RegistryKeyService>();
|
||||
Kernel.Bind<RegistryKeyService>().ToConstant(new RegistryKeyService());
|
||||
Kernel.Bind<SteamToolService>().ToSelf();
|
||||
Kernel.Bind<VdfService>().To<VdfService>();
|
||||
Kernel.Bind<HttpServices>().ToConstant(new HttpServices());
|
||||
Kernel.Bind<HostsService>().To<HostsService>();
|
||||
Kernel.Bind<HostsService>().ToConstant(new HostsService());
|
||||
}
|
||||
|
||||
public TInterface Get<TInterface>()
|
||||
@@ -22,7 +22,7 @@ namespace SteamTool.Core.Properties {
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources {
|
||||
public class Resources {
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace SteamTool.Core.Properties {
|
||||
/// 返回此类使用的缓存的 ResourceManager 实例。
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
public static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("SteamTool.Core.Properties.Resources", typeof(Resources).Assembly);
|
||||
@@ -51,7 +51,7 @@ namespace SteamTool.Core.Properties {
|
||||
/// 使用此强类型资源类的所有资源查找执行重写。
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
public static global::System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
@@ -74,7 +74,7 @@ namespace SteamTool.Core.Properties {
|
||||
///# Additionally, comments (such as these) may be inserted on individual
|
||||
///# lines or following th [字符串的其余部分被截断]"; 的本地化字符串。
|
||||
/// </summary>
|
||||
internal static string DefaultHosts {
|
||||
public static string DefaultHosts {
|
||||
get {
|
||||
return ResourceManager.GetString("DefaultHosts", resourceCulture);
|
||||
}
|
||||
@@ -83,7 +83,7 @@ namespace SteamTool.Core.Properties {
|
||||
/// <summary>
|
||||
/// 查找类似 写入的Hosts已经存在 的本地化字符串。
|
||||
/// </summary>
|
||||
internal static string Hosts_Exists {
|
||||
public static string Hosts_Exists {
|
||||
get {
|
||||
return ResourceManager.GetString("Hosts_Exists", resourceCulture);
|
||||
}
|
||||
@@ -92,7 +92,7 @@ namespace SteamTool.Core.Properties {
|
||||
/// <summary>
|
||||
/// 查找类似 读取Hosts时发生错误 的本地化字符串。
|
||||
/// </summary>
|
||||
internal static string Hosts_ReadError {
|
||||
public static string Hosts_ReadError {
|
||||
get {
|
||||
return ResourceManager.GetString("Hosts_ReadError", resourceCulture);
|
||||
}
|
||||
@@ -101,7 +101,7 @@ namespace SteamTool.Core.Properties {
|
||||
/// <summary>
|
||||
/// 查找类似 读取Hosts成功 的本地化字符串。
|
||||
/// </summary>
|
||||
internal static string Hosts_ReadSuccess {
|
||||
public static string Hosts_ReadSuccess {
|
||||
get {
|
||||
return ResourceManager.GetString("Hosts_ReadSuccess", resourceCulture);
|
||||
}
|
||||
@@ -110,7 +110,7 @@ namespace SteamTool.Core.Properties {
|
||||
/// <summary>
|
||||
/// 查找类似 写入Hosts成功 的本地化字符串。
|
||||
/// </summary>
|
||||
internal static string Hosts_UpdateSuccess {
|
||||
public static string Hosts_UpdateSuccess {
|
||||
get {
|
||||
return ResourceManager.GetString("Hosts_UpdateSuccess", resourceCulture);
|
||||
}
|
||||
@@ -119,7 +119,7 @@ namespace SteamTool.Core.Properties {
|
||||
/// <summary>
|
||||
/// 查找类似 写入Hosts时发生错误 的本地化字符串。
|
||||
/// </summary>
|
||||
internal static string Hosts_WirteError {
|
||||
public static string Hosts_WirteError {
|
||||
get {
|
||||
return ResourceManager.GetString("Hosts_WirteError", resourceCulture);
|
||||
}
|
||||
@@ -141,10 +141,24 @@ namespace SteamTool.Core.Properties {
|
||||
/// <param name="File" value="log\\" />
|
||||
/// <param name="AppendToFile" value="true" [字符串的其余部分被截断]"; 的本地化字符串。
|
||||
/// </summary>
|
||||
internal static string Log4netXml {
|
||||
public static string Log4netXml {
|
||||
get {
|
||||
return ResourceManager.GetString("Log4netXml", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 echo "Steam++替换升级中..."
|
||||
///taskkill /f /im {0}
|
||||
///xcopy /y /c /h /r /s "{1}\*.*" "{2}"
|
||||
///rmdir /s /q {1}
|
||||
///{3}
|
||||
///del %0 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string ProgramUpdateCmd {
|
||||
get {
|
||||
return ResourceManager.GetString("ProgramUpdateCmd", resourceCulture);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -175,12 +175,17 @@
|
||||
<param name="RollingStyle" value="Date" />
|
||||
<layout type="log4net.Layout.PatternLayout,log4net">
|
||||
<param name="ConversionPattern" value="%d %-5p >> %m%n" />
|
||||
<!--输出头部并换行-->
|
||||
<!--<param name="Header" value="&#13;&#10;———————————————————&#13;&#10;" />
|
||||
<param name="Footer" value="&#13;&#10;———————————————————&#13;&#10;" />-->
|
||||
</layout>
|
||||
</appender>
|
||||
</log4net>
|
||||
</configuration></value>
|
||||
</data>
|
||||
<data name="ProgramUpdateCmd" xml:space="preserve">
|
||||
<value>echo "Steam++替换升级中..."
|
||||
taskkill /f /im {0}
|
||||
xcopy /y /c /h /r /s "{1}\*.*" "{2}"
|
||||
rmdir /s /q {1}
|
||||
{3}
|
||||
del %0</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -12,6 +12,8 @@
|
||||
<PackageReference Include="Microsoft.Win32.Registry" Version="5.0.0" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
|
||||
<PackageReference Include="Ninject" Version="3.3.4" />
|
||||
<PackageReference Include="Portable.BouncyCastle" Version="1.8.9" />
|
||||
<PackageReference Include="SharpZipLib" Version="1.3.1" />
|
||||
<PackageReference Include="System.Management" Version="5.0.0" />
|
||||
<PackageReference Include="TaskScheduler" Version="2.9.0" />
|
||||
</ItemGroup>
|
||||
@@ -20,6 +22,12 @@
|
||||
<ProjectReference Include="..\SteamTool.Model\SteamTool.Model.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="Interop.IWshRuntimeLibrary">
|
||||
<HintPath>..\SteamTools\obj\x86\Debug\net472\Interop.IWshRuntimeLibrary.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Update="Properties\Resources.Designer.cs">
|
||||
<DesignTime>True</DesignTime>
|
||||
@@ -30,7 +38,7 @@
|
||||
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Update="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<Generator>PublicResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
@@ -37,6 +37,11 @@ namespace SteamTool.Core
|
||||
|
||||
public const string UserDataDirectory = @"\userdata";
|
||||
|
||||
/*
|
||||
Windows: ~\Steam\config\loginusers.vdf
|
||||
Linux: ~/.steam/steam/config/loginusers.vdf
|
||||
Mac: ~/Library/Application Support/Steam/config/loginusers.vdf
|
||||
*/
|
||||
public const string UserVdfPath = @"\config\loginusers.vdf";
|
||||
|
||||
private const string SteamRegistryPath = @"SOFTWARE\Valve\Steam";
|
||||
@@ -45,15 +50,13 @@ namespace SteamTool.Core
|
||||
{
|
||||
var steamExePath = registryKeyService.ReadRegistryKey(Registry.CurrentUser, SteamRegistryPath, "SteamExe");
|
||||
var steamPath = registryKeyService.ReadRegistryKey(Registry.CurrentUser, SteamRegistryPath, "SteamPath");
|
||||
//steamExePath = Path.GetFullPath(steamExePath);
|
||||
//steamPath = Path.GetFullPath(steamPath);
|
||||
if (File.Exists(steamExePath))
|
||||
{
|
||||
SteamExePath = steamExePath;
|
||||
SteamExePath = Path.GetFullPath(steamExePath);
|
||||
}
|
||||
if (Directory.Exists(steamPath))
|
||||
{
|
||||
SteamPath = steamPath;
|
||||
SteamPath = Path.GetFullPath(steamPath);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,7 +65,7 @@ namespace SteamTool.Core
|
||||
Process[] processes = Process.GetProcesses();
|
||||
foreach (Process process in processes)
|
||||
{
|
||||
if (process.ProcessName.Equals("steam", StringComparison.OrdinalIgnoreCase) || process.ProcessName.Equals("steamService", StringComparison.OrdinalIgnoreCase) || process.ProcessName.Equals("steamwebhelper", StringComparison.OrdinalIgnoreCase))
|
||||
if (process.ProcessName.Equals("steam", StringComparison.OrdinalIgnoreCase) || process.ProcessName.Equals("steamservice", StringComparison.OrdinalIgnoreCase) || process.ProcessName.Equals("steamwebhelper", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
process.Kill();
|
||||
}
|
||||
@@ -90,7 +93,7 @@ namespace SteamTool.Core
|
||||
/// 获取所有记住登陆steam用户信息
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public List<SteamUser> GetAllUser()
|
||||
public List<SteamUser> GetRememberUserList()
|
||||
{
|
||||
var users = new List<SteamUser>();
|
||||
if (File.Exists(SteamPath + UserVdfPath))
|
||||
@@ -100,28 +103,30 @@ namespace SteamTool.Core
|
||||
foreach (var item in v.Value)
|
||||
{
|
||||
var i = item.Value;
|
||||
var user = new SteamUser
|
||||
var user = new SteamUser(item.ToString())
|
||||
{
|
||||
SteamId64 = Convert.ToInt64(item.Key.ToString()),
|
||||
AccountName = i.AccountName?.ToString(),
|
||||
SteamID = i.PersonaName?.ToString(),
|
||||
PersonaName = i.PersonaName?.ToString(),
|
||||
RememberPassword = Convert.ToBoolean(Convert.ToInt64(i.RememberPassword?.ToString())),
|
||||
Timestamp = Convert.ToInt64(i.Timestamp?.ToString())
|
||||
};
|
||||
user.LastLoginTime = user.Timestamp.ToDateTime();
|
||||
|
||||
//老版本Steam数据 小写mostrecent 支持
|
||||
user.MostRecent = i.mostrecent != null ?
|
||||
Convert.ToBoolean(Convert.ToByte(i.mostrecent.ToString())) :
|
||||
Convert.ToBoolean(Convert.ToByte(i.MostRecent.ToString()));
|
||||
|
||||
user.WantsOfflineMode = i.WantsOfflineMode != null ?
|
||||
Convert.ToBoolean(Convert.ToByte(i.WantsOfflineMode.ToString())) : false;
|
||||
|
||||
// 因为警告这个东西应该都不需要所以直接默认跳过好了
|
||||
user.SkipOfflineModeWarning = true;
|
||||
//user.SkipOfflineModeWarning = i.SkipOfflineModeWarning != null ?
|
||||
// Convert.ToBoolean(Convert.ToByte(i.SkipOfflineModeWarning.ToString())) : false;
|
||||
|
||||
user.LastLoginTime = TimeZoneInfo.ConvertTimeFromUtc(new DateTime(1970, 1, 1, 0, 0, 0).AddSeconds(user.Timestamp), TimeZoneInfo.Local);
|
||||
if (i.mostrecent != null)//老版本Steam数据 小写mostrecent 支持
|
||||
{
|
||||
user.MostRecent = Convert.ToBoolean(Convert.ToInt64(i.mostrecent.ToString()));
|
||||
}
|
||||
else if (i.MostRecent != null)
|
||||
{
|
||||
user.MostRecent = Convert.ToBoolean(Convert.ToInt64(i.MostRecent.ToString()));
|
||||
}
|
||||
else
|
||||
{
|
||||
user.MostRecent = false;
|
||||
}
|
||||
users.Add(user);
|
||||
}
|
||||
}
|
||||
@@ -192,6 +197,10 @@ namespace SteamTool.Core
|
||||
using TaskDefinition td = TaskService.Instance.NewTask();
|
||||
td.RegistrationInfo.Description = Name + "System Boot Run";
|
||||
td.Settings.Priority = System.Diagnostics.ProcessPriorityClass.Normal;
|
||||
td.Settings.ExecutionTimeLimit = new TimeSpan(0);
|
||||
td.Settings.AllowHardTerminate = false;
|
||||
td.Settings.StopIfGoingOnBatteries = false;
|
||||
td.Settings.DisallowStartIfOnBatteries = false;
|
||||
td.Triggers.Add(new LogonTrigger());
|
||||
td.Actions.Add(new ExecAction(Assembly.GetCallingAssembly().Location, "-minimized", Path.GetDirectoryName(Assembly.GetCallingAssembly().Location)));
|
||||
if (IsAdministrator)
|
||||
@@ -214,5 +223,10 @@ namespace SteamTool.Core
|
||||
Directory.Delete(temp, true);
|
||||
}
|
||||
}
|
||||
|
||||
public void UpdateSteamLocalUserData(SteamUser user)
|
||||
{
|
||||
vdfService.UpdateVdfValueByReplace(SteamPath + UserVdfPath, user.OriginVdfString, user.CurrentVdfString);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -7,6 +7,7 @@ using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Gameloop.Vdf;
|
||||
using Gameloop.Vdf.Linq;
|
||||
using SteamTool.Core.Common;
|
||||
|
||||
namespace SteamTool.Core
|
||||
{
|
||||
@@ -33,6 +34,14 @@ namespace SteamTool.Core
|
||||
return GetVdfModel(text);
|
||||
}
|
||||
|
||||
public void UpdateVdfValueByReplace(string path, string oldVaule, string newValue)
|
||||
{
|
||||
string text = File.ReadAllText(path, Encoding.UTF8);
|
||||
text = text.RemovePattern().Replace(
|
||||
oldVaule.RemovePattern().Replace(" ",string.Empty), newValue);
|
||||
//Debug.WriteLine(text);
|
||||
File.WriteAllText(path, text, Encoding.UTF8);
|
||||
}
|
||||
|
||||
public void DeleteVdfValueByKey(string path, string key)
|
||||
{
|
||||
@@ -44,5 +53,13 @@ namespace SteamTool.Core
|
||||
//Debug.WriteLine(text);
|
||||
File.WriteAllText(path, text, Encoding.UTF8);
|
||||
}
|
||||
|
||||
public void DeleteVdfValueByReplace(string path, string oldVaule)
|
||||
{
|
||||
string text = File.ReadAllText(path, Encoding.UTF8);
|
||||
text = text.Replace(oldVaule, string.Empty);
|
||||
//Debug.WriteLine(text);
|
||||
File.WriteAllText(path, text, Encoding.UTF8);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5,8 +5,10 @@ namespace SteamTool.Model
|
||||
public class Const
|
||||
{
|
||||
public const string APP_LIST_FILE = "apps.json";
|
||||
public const string AUTHDATA_FILE = "authenticators.dat";
|
||||
public const string SETTINGS_FILE = "settings.json";
|
||||
public const string SCRIPT_DIR = "scripts";
|
||||
public const string LOG_DIR = "log";
|
||||
public const string HOST_TAG = "#S302";
|
||||
|
||||
public const string REWARDMELIST_URL = "https://gitee.com/rmbgame/steam-tools_-data/raw/master/RewardRecord.json";
|
||||
@@ -21,6 +23,7 @@ namespace SteamTool.Model
|
||||
public const string MY_WISHLIST_URL = "https://store.steampowered.com/wishlist/profiles/76561198289531723/";
|
||||
public const string MY_MINIPROFILE_URL = "https://steamcommunity.com/miniprofile/329265995";
|
||||
|
||||
public const string STEAM_LOGIN_URL = "https://steamcommunity.com/login/home/?goto=my/profile";
|
||||
public const string STEAM_BADGES_URL = "https://steamcommunity.com/profiles/{0}/badges/";
|
||||
public const string STEAMAPP_LIST_URL = "https://api.steampowered.com/ISteamApps/GetAppList/v2";
|
||||
public const string STORE_APP_URL = "https://store.steampowered.com/app/{0}";
|
||||
@@ -31,6 +34,7 @@ namespace SteamTool.Model
|
||||
public const string STEAM_MEDIA_URL = "https://steamcdn-a.akamaihd.net/steam/apps/{0}/movie_max.webm";
|
||||
public const string STEAM_VIDEO_URL = "https://store.steampowered.com/video/watch/{0}/";
|
||||
public const string STEAM_REGISTERKEY_URL = "https://store.steampowered.com/account/registerkey?key={0}";
|
||||
public const string STEAM_FRIENDMESSAGESLOG_URL = "https://help.steampowered.com/zh-cn/accountdata/GetFriendMessagesLog";
|
||||
|
||||
public const string STEAM_INSTALL_URL = "steam://install/{0}";
|
||||
public const string STEAM_RUNGAME_URL = "steam://rungameid/{0}";
|
||||
@@ -39,5 +43,11 @@ namespace SteamTool.Model
|
||||
|
||||
public const string STEAMDB_USERINFO_URL = "https://api.steamdb.ml/v1/users/{0}";
|
||||
public const string STEAMDB_APPINFO_URL = "https://api.steamdb.ml/v1/apps/{0}";
|
||||
|
||||
//https://steamcommunity.com/profiles/76561198289531723?xml=1
|
||||
public const string STEAM_USERINFO_XML_URL = "https://steamcommunity.com/profiles/{0}?xml=1";
|
||||
|
||||
|
||||
public const string STEAMCN_USERINFO_XML_URL = "https://my.steamchina.com/profiles/76561198289531723?xml=1";
|
||||
}
|
||||
}
|
||||
@@ -16,7 +16,7 @@ namespace SteamTool.Model
|
||||
public bool IsHidden { get; set; }
|
||||
public bool IsAchieved { get; set; }
|
||||
public bool IsChecked { get; set; }
|
||||
public int UnlockTimeUnix { get; set; }
|
||||
public long UnlockTimeUnix { get; set; }
|
||||
public DateTime UnlockTime { get; set; }
|
||||
public string IconUrl => IsAchieved ? string.Format(Const.STEAMAPP_ICON_URL, AppId, IconNormal) : string.Format(Const.STEAMAPP_ICON_URL, AppId, IconLocked);
|
||||
public int Permission { get; set; }
|
||||