├── .gitattributes
├── .gitignore
├── README.md
├── SteamGuardFiles.sln
└── SteamGuardFiles
├── App.config
├── Program.cs
├── Properties
└── AssemblyInfo.cs
└── SteamGuardFiles.csproj
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Auto detect text files and perform LF normalization
2 | * text=auto
3 |
4 | # Custom for Visual Studio
5 | *.cs diff=csharp
6 |
7 | # Standard to msysgit
8 | *.doc diff=astextplain
9 | *.DOC diff=astextplain
10 | *.docx diff=astextplain
11 | *.DOCX diff=astextplain
12 | *.dot diff=astextplain
13 | *.DOT diff=astextplain
14 | *.pdf diff=astextplain
15 | *.PDF diff=astextplain
16 | *.rtf diff=astextplain
17 | *.RTF diff=astextplain
18 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Windows image file caches
2 | Thumbs.db
3 | ehthumbs.db
4 |
5 | # Folder config file
6 | Desktop.ini
7 |
8 | # Recycle Bin used on file shares
9 | $RECYCLE.BIN/
10 |
11 | # Windows Installer files
12 | *.cab
13 | *.msi
14 | *.msm
15 | *.msp
16 |
17 | # Windows shortcuts
18 | *.lnk
19 |
20 | # =========================
21 | # Operating System Files
22 | # =========================
23 |
24 | # OSX
25 | # =========================
26 |
27 | .DS_Store
28 | .AppleDouble
29 | .LSOverride
30 |
31 | # Thumbnails
32 | ._*
33 |
34 | # Files that might appear on external disk
35 | .Spotlight-V100
36 | .Trashes
37 |
38 | # Directories potentially created on remote AFP share
39 | .AppleDB
40 | .AppleDesktop
41 | Network Trash Folder
42 | Temporary Items
43 | .apdisk
44 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # SteamGuardFiles
2 | Gets all the required SteamGuard files for Steam's account protection system. Doesn't matter where steam is installed, because this will find the files automatically! Magic.
3 |
4 | 
5 |
6 | In order to log into a Steam account from a new device without having to wait for 7 days in order to preform basic actions such as trading,
7 | just copy the SteamGuard files from a computer which has already waited 7 days.
8 |
9 | Just run this application on the computer which has already waited and it will Zip them up for you.
10 | No need to wait 7 days anymore when switching computers.
11 |
12 | And hey, maybe you could do some malicious stuff as well, who knows.
13 |
14 | Download the source and compile it, or download the program from the release thread
15 |
16 | https://github.com/Ezzpify/SteamGuardFiles/releases/tag/1.0
17 |
--------------------------------------------------------------------------------
/SteamGuardFiles.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 14
4 | VisualStudioVersion = 14.0.23107.0
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SteamGuardFiles", "SteamGuardFiles\SteamGuardFiles.csproj", "{C6D0D2D9-2A98-486A-9AB3-B69C6EE07B57}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {C6D0D2D9-2A98-486A-9AB3-B69C6EE07B57}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {C6D0D2D9-2A98-486A-9AB3-B69C6EE07B57}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {C6D0D2D9-2A98-486A-9AB3-B69C6EE07B57}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {C6D0D2D9-2A98-486A-9AB3-B69C6EE07B57}.Release|Any CPU.Build.0 = Release|Any CPU
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | EndGlobal
23 |
--------------------------------------------------------------------------------
/SteamGuardFiles/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/SteamGuardFiles/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.IO;
5 | using System.IO.Compression;
6 | using Microsoft.Win32;
7 |
8 | namespace SteamGuardFiles
9 | {
10 | class Program
11 | {
12 | ///
13 | /// General variables
14 | ///
15 | private static List FilesToGet = new List();
16 |
17 |
18 | ///
19 | /// Get Steam folder from registry
20 | ///
21 | /// Returns string of Steam folder location
22 | private static string GetSteamFolder()
23 | {
24 | /*Get registry key*/
25 | RegistryKey steamKey = Registry.CurrentUser.OpenSubKey(@"Software\Valve\Steam");
26 |
27 | /*Check if it's not null*/
28 | /*Maybe the user doesn't have steam installed*/
29 | if (steamKey != null)
30 | {
31 | /*Return the SteamPath SubKey*/
32 | return steamKey.GetValue("SteamPath").ToString();
33 | }
34 |
35 | /*Something failed, return empty*/
36 | return string.Empty;
37 | }
38 |
39 |
40 | ///
41 | /// Adds all requested files from a folder to the list
42 | ///
43 | /// Specifies which folder to search
44 | /// Specifies which files to get
45 | static void AddFiles(DirectoryInfo DI, string[] files)
46 | {
47 | /*Get files from Directory (DI)*/
48 | FileInfo[] FI = DI.GetFiles();
49 |
50 | /*Get all ssf files from base folder*/
51 | foreach (var file in FI)
52 | {
53 | /*If current loop file is a file that we want*/
54 | if (files.Any(s => file.Name.Contains(s)))
55 | {
56 | /*If the file exists, add it to the list of files to get*/
57 | if (File.Exists(file.FullName))
58 | {
59 | FilesToGet.Add(file.FullName);
60 | }
61 | }
62 | }
63 | }
64 |
65 |
66 | ///
67 | /// Main function
68 | ///
69 | static void Main(string[] args)
70 | {
71 | /*Path variables*/
72 | string steamFolder = GetSteamFolder();
73 | string newDirectory = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Steam");
74 | string newZip = newDirectory + ".zip";
75 |
76 | /*Ensure that we found the steam folder*/
77 | if(string.IsNullOrEmpty(steamFolder))
78 | {
79 | /*Unable to fetch the Steam folder*/
80 | Console.WriteLine("Unable to find Steam folder. Not installed.");
81 | System.Threading.Thread.Sleep(1500);
82 | return;
83 | }
84 |
85 | /*Create folders to store items*/
86 | Directory.CreateDirectory(newDirectory);
87 | Directory.CreateDirectory(Path.Combine(newDirectory, "Config"));
88 |
89 | /*Get all the files from Base and Config folder*/
90 | AddFiles(new DirectoryInfo(steamFolder), new string[] { "ssf" });
91 | AddFiles(new DirectoryInfo(Path.Combine(steamFolder, "Config")), new string[] { "config", "SteamAppData", "loginusers" });
92 |
93 | /*Copy all files to our created directory*/
94 | foreach(string file in FilesToGet)
95 | {
96 | /*Local directory string that we can edit without affecting global*/
97 | string dir = newDirectory.Replace(steamFolder, "");
98 |
99 | /*Load up new path and copy file*/
100 | if (Path.GetDirectoryName(file).Contains("Config")) { dir = Path.Combine(dir, "Config"); }
101 | string newFile = Path.Combine(dir, Path.GetFileName(file));
102 | File.Copy(file, newFile);
103 |
104 | /*Make sure file is not hidden*/
105 | FileInfo FI = new FileInfo(newFile);
106 | FI.Attributes = FileAttributes.Normal;
107 | }
108 |
109 | /*Delete an already existing Zip folder*/
110 | if (File.Exists(newZip))
111 | {
112 | File.Delete(newZip);
113 | }
114 |
115 | /*Zip up the new folder*/
116 | ZipFile.CreateFromDirectory(newDirectory, newZip);
117 |
118 | /*Delete the old folder*/
119 | Directory.Delete(newDirectory, true);
120 | }
121 | }
122 | }
123 |
--------------------------------------------------------------------------------
/SteamGuardFiles/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("SteamGuardFiles")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("SteamGuardFiles")]
13 | [assembly: AssemblyCopyright("Copyright © 2015")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("c6d0d2d9-2a98-486a-9ab3-b69c6ee07b57")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/SteamGuardFiles/SteamGuardFiles.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {C6D0D2D9-2A98-486A-9AB3-B69C6EE07B57}
8 | Exe
9 | Properties
10 | SteamGuardFiles
11 | SteamGuardFiles
12 | v4.5.2
13 | 512
14 | true
15 |
16 |
17 | AnyCPU
18 | true
19 | full
20 | false
21 | bin\Debug\
22 | DEBUG;TRACE
23 | prompt
24 | 4
25 |
26 |
27 | AnyCPU
28 | pdbonly
29 | true
30 | bin\Release\
31 | TRACE
32 | prompt
33 | 4
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
61 |
--------------------------------------------------------------------------------