├── .gitignore ├── .travis.yml ├── README.md ├── ios-steamguard-extractor.sln ├── ios-steamguard-extractor ├── App.config ├── FodyWeavers.xml ├── Form1.Designer.cs ├── Form1.cs ├── Form1.resx ├── Program.cs ├── Properties │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ ├── Resources.resx │ ├── Settings.Designer.cs │ └── Settings.settings ├── SteamAuthenticator.cs ├── costura32 │ └── SQLite.Interop.dll ├── costura64 │ └── SQLite.Interop.dll ├── ios-steamguard-extractor.csproj └── packages.config └── preview.png /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | 4 | # User-specific files 5 | *.suo 6 | *.user 7 | *.userosscache 8 | *.sln.docstates 9 | 10 | # User-specific files (MonoDevelop/Xamarin Studio) 11 | *.userprefs 12 | 13 | # Build results 14 | [Dd]ebug/ 15 | [Dd]ebugPublic/ 16 | [Rr]elease/ 17 | [Rr]eleases/ 18 | x64/ 19 | x86/ 20 | bld/ 21 | [Bb]in/ 22 | [Oo]bj/ 23 | [Ll]og/ 24 | 25 | # Visual Studio 2015 cache/options directory 26 | .vs/ 27 | # Uncomment if you have tasks that create the project's static files in wwwroot 28 | #wwwroot/ 29 | 30 | # MSTest test Results 31 | [Tt]est[Rr]esult*/ 32 | [Bb]uild[Ll]og.* 33 | 34 | # NUNIT 35 | *.VisualState.xml 36 | TestResult.xml 37 | 38 | # Build Results of an ATL Project 39 | [Dd]ebugPS/ 40 | [Rr]eleasePS/ 41 | dlldata.c 42 | 43 | # DNX 44 | project.lock.json 45 | artifacts/ 46 | 47 | *_i.c 48 | *_p.c 49 | *_i.h 50 | *.ilk 51 | *.meta 52 | *.obj 53 | *.pch 54 | *.pdb 55 | *.pgc 56 | *.pgd 57 | *.rsp 58 | *.sbr 59 | *.tlb 60 | *.tli 61 | *.tlh 62 | *.tmp 63 | *.tmp_proj 64 | *.log 65 | *.vspscc 66 | *.vssscc 67 | .builds 68 | *.pidb 69 | *.svclog 70 | *.scc 71 | 72 | # Chutzpah Test files 73 | _Chutzpah* 74 | 75 | # Visual C++ cache files 76 | ipch/ 77 | *.aps 78 | *.ncb 79 | *.opendb 80 | *.opensdf 81 | *.sdf 82 | *.cachefile 83 | *.VC.db 84 | *.VC.VC.opendb 85 | 86 | # Visual Studio profiler 87 | *.psess 88 | *.vsp 89 | *.vspx 90 | *.sap 91 | 92 | # TFS 2012 Local Workspace 93 | $tf/ 94 | 95 | # Guidance Automation Toolkit 96 | *.gpState 97 | 98 | # ReSharper is a .NET coding add-in 99 | _ReSharper*/ 100 | *.[Rr]e[Ss]harper 101 | *.DotSettings.user 102 | 103 | # JustCode is a .NET coding add-in 104 | .JustCode 105 | 106 | # TeamCity is a build add-in 107 | _TeamCity* 108 | 109 | # DotCover is a Code Coverage Tool 110 | *.dotCover 111 | 112 | # NCrunch 113 | _NCrunch_* 114 | .*crunch*.local.xml 115 | nCrunchTemp_* 116 | 117 | # MightyMoose 118 | *.mm.* 119 | AutoTest.Net/ 120 | 121 | # Web workbench (sass) 122 | .sass-cache/ 123 | 124 | # Installshield output folder 125 | [Ee]xpress/ 126 | 127 | # DocProject is a documentation generator add-in 128 | DocProject/buildhelp/ 129 | DocProject/Help/*.HxT 130 | DocProject/Help/*.HxC 131 | DocProject/Help/*.hhc 132 | DocProject/Help/*.hhk 133 | DocProject/Help/*.hhp 134 | DocProject/Help/Html2 135 | DocProject/Help/html 136 | 137 | # Click-Once directory 138 | publish/ 139 | 140 | # Publish Web Output 141 | *.[Pp]ublish.xml 142 | *.azurePubxml 143 | # TODO: Comment the next line if you want to checkin your web deploy settings 144 | # but database connection strings (with potential passwords) will be unencrypted 145 | *.pubxml 146 | *.publishproj 147 | 148 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 149 | # checkin your Azure Web App publish settings, but sensitive information contained 150 | # in these scripts will be unencrypted 151 | PublishScripts/ 152 | 153 | # NuGet Packages 154 | *.nupkg 155 | # The packages folder can be ignored because of Package Restore 156 | **/packages/* 157 | # except build/, which is used as an MSBuild target. 158 | !**/packages/build/ 159 | # Uncomment if necessary however generally it will be regenerated when needed 160 | #!**/packages/repositories.config 161 | # NuGet v3's project.json files produces more ignoreable files 162 | *.nuget.props 163 | *.nuget.targets 164 | 165 | # Microsoft Azure Build Output 166 | csx/ 167 | *.build.csdef 168 | 169 | # Microsoft Azure Emulator 170 | ecf/ 171 | rcf/ 172 | 173 | # Windows Store app package directories and files 174 | AppPackages/ 175 | BundleArtifacts/ 176 | Package.StoreAssociation.xml 177 | _pkginfo.txt 178 | 179 | # Visual Studio cache files 180 | # files ending in .cache can be ignored 181 | *.[Cc]ache 182 | # but keep track of directories ending in .cache 183 | !*.[Cc]ache/ 184 | 185 | # Others 186 | ClientBin/ 187 | ~$* 188 | *~ 189 | *.dbmdl 190 | *.dbproj.schemaview 191 | *.pfx 192 | *.publishsettings 193 | node_modules/ 194 | orleans.codegen.cs 195 | 196 | # Since there are multiple workflows, uncomment next line to ignore bower_components 197 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 198 | #bower_components/ 199 | 200 | # RIA/Silverlight projects 201 | Generated_Code/ 202 | 203 | # Backup & report files from converting an old project file 204 | # to a newer Visual Studio version. Backup files are not needed, 205 | # because we have git ;-) 206 | _UpgradeReport_Files/ 207 | Backup*/ 208 | UpgradeLog*.XML 209 | UpgradeLog*.htm 210 | 211 | # SQL Server files 212 | *.mdf 213 | *.ldf 214 | 215 | # Business Intelligence projects 216 | *.rdl.data 217 | *.bim.layout 218 | *.bim_*.settings 219 | 220 | # Microsoft Fakes 221 | FakesAssemblies/ 222 | 223 | # GhostDoc plugin setting file 224 | *.GhostDoc.xml 225 | 226 | # Node.js Tools for Visual Studio 227 | .ntvs_analysis.dat 228 | 229 | # Visual Studio 6 build log 230 | *.plg 231 | 232 | # Visual Studio 6 workspace options file 233 | *.opt 234 | 235 | # Visual Studio LightSwitch build output 236 | **/*.HTMLClient/GeneratedArtifacts 237 | **/*.DesktopClient/GeneratedArtifacts 238 | **/*.DesktopClient/ModelManifest.xml 239 | **/*.Server/GeneratedArtifacts 240 | **/*.Server/ModelManifest.xml 241 | _Pvt_Extensions 242 | 243 | # Paket dependency manager 244 | .paket/paket.exe 245 | paket-files/ 246 | 247 | # FAKE - F# Make 248 | .fake/ 249 | 250 | # JetBrains Rider 251 | .idea/ 252 | *.sln.iml 253 | ios-steamguard-extractor/docs/ 254 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: csharp 2 | solution: ios-steamguard-extractor.sln 3 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ios SteamGuard Mobile Authenticator Data Extractor 2 | 3 | Now greatly simplified the process of extracting your Steamguard Authenticator from your iPhone / iPad, for use in [WinAuth](https://winauth.com/) 4 | 5 | ![Preview](/preview.png) 6 | 7 | # Seems valve has silently secured the app, where it is no longer possible to extract the required data from ANY iTunes backups. There is absolutely nothing I can do about this. If your itunes backup does NOT have the required data, then the app version on your device is too new. 8 | -------------------------------------------------------------------------------- /ios-steamguard-extractor.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 14 4 | VisualStudioVersion = 14.0.25123.0 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ios-steamguard-extractor", "ios-steamguard-extractor\ios-steamguard-extractor.csproj", "{9913ED22-8249-4397-B920-C9BD25778EC9}" 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 | {9913ED22-8249-4397-B920-C9BD25778EC9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {9913ED22-8249-4397-B920-C9BD25778EC9}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {9913ED22-8249-4397-B920-C9BD25778EC9}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {9913ED22-8249-4397-B920-C9BD25778EC9}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | EndGlobal 23 | -------------------------------------------------------------------------------- /ios-steamguard-extractor/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 |
6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /ios-steamguard-extractor/FodyWeavers.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | SQLite.Interop 6 | 7 | 8 | SQLite.Interop 9 | 10 | 11 | -------------------------------------------------------------------------------- /ios-steamguard-extractor/Form1.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace ios_steamguard_extractor 2 | { 3 | partial class Form1 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | this.txtResults = new System.Windows.Forms.TextBox(); 32 | this.btnGetSteamGuardData = new System.Windows.Forms.Button(); 33 | this.splitContainer1 = new System.Windows.Forms.SplitContainer(); 34 | ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); 35 | this.splitContainer1.Panel1.SuspendLayout(); 36 | this.splitContainer1.Panel2.SuspendLayout(); 37 | this.splitContainer1.SuspendLayout(); 38 | this.SuspendLayout(); 39 | // 40 | // txtResults 41 | // 42 | this.txtResults.Dock = System.Windows.Forms.DockStyle.Fill; 43 | this.txtResults.Location = new System.Drawing.Point(0, 0); 44 | this.txtResults.Multiline = true; 45 | this.txtResults.Name = "txtResults"; 46 | this.txtResults.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; 47 | this.txtResults.Size = new System.Drawing.Size(562, 469); 48 | this.txtResults.TabIndex = 0; 49 | // 50 | // btnGetSteamGuardData 51 | // 52 | this.btnGetSteamGuardData.Dock = System.Windows.Forms.DockStyle.Fill; 53 | this.btnGetSteamGuardData.Location = new System.Drawing.Point(0, 0); 54 | this.btnGetSteamGuardData.Name = "btnGetSteamGuardData"; 55 | this.btnGetSteamGuardData.Size = new System.Drawing.Size(562, 35); 56 | this.btnGetSteamGuardData.TabIndex = 1; 57 | this.btnGetSteamGuardData.Text = "Get Steamguard Authenticator Data"; 58 | this.btnGetSteamGuardData.UseVisualStyleBackColor = true; 59 | this.btnGetSteamGuardData.Click += new System.EventHandler(this.btnGetSteamGuardData_Click); 60 | // 61 | // splitContainer1 62 | // 63 | this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill; 64 | this.splitContainer1.Location = new System.Drawing.Point(0, 0); 65 | this.splitContainer1.Name = "splitContainer1"; 66 | this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal; 67 | // 68 | // splitContainer1.Panel1 69 | // 70 | this.splitContainer1.Panel1.Controls.Add(this.txtResults); 71 | // 72 | // splitContainer1.Panel2 73 | // 74 | this.splitContainer1.Panel2.Controls.Add(this.btnGetSteamGuardData); 75 | this.splitContainer1.Size = new System.Drawing.Size(562, 508); 76 | this.splitContainer1.SplitterDistance = 469; 77 | this.splitContainer1.TabIndex = 2; 78 | // 79 | // Form1 80 | // 81 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 82 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 83 | this.ClientSize = new System.Drawing.Size(562, 508); 84 | this.Controls.Add(this.splitContainer1); 85 | this.Name = "Form1"; 86 | this.Text = "ios backup SteamGuard Authenticator data extractor"; 87 | this.splitContainer1.Panel1.ResumeLayout(false); 88 | this.splitContainer1.Panel1.PerformLayout(); 89 | this.splitContainer1.Panel2.ResumeLayout(false); 90 | ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit(); 91 | this.splitContainer1.ResumeLayout(false); 92 | this.ResumeLayout(false); 93 | 94 | } 95 | 96 | #endregion 97 | 98 | private System.Windows.Forms.TextBox txtResults; 99 | private System.Windows.Forms.Button btnGetSteamGuardData; 100 | private System.Windows.Forms.SplitContainer splitContainer1; 101 | } 102 | } 103 | 104 | -------------------------------------------------------------------------------- /ios-steamguard-extractor/Form1.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Data.SQLite; 4 | using System.IO; 5 | using System.Linq; 6 | using System.Security.Cryptography; 7 | using System.Text; 8 | using System.Windows.Forms; 9 | using Claunia.PropertyList; 10 | using Newtonsoft.Json; 11 | 12 | namespace ios_steamguard_extractor 13 | { 14 | public partial class Form1 : Form 15 | { 16 | public Form1() 17 | { 18 | InitializeComponent(); 19 | } 20 | 21 | private static int SearchBytes(IReadOnlyList haystack, IReadOnlyList needle, int start) 22 | { 23 | var len = needle.Count; 24 | var limit = haystack.Count - len; 25 | for (var i = start; i <= limit; i++) 26 | { 27 | var k = 0; 28 | for (; k < len; k++) 29 | { 30 | if (needle[k] != haystack[i + k]) break; 31 | } 32 | if (k == len) return i; 33 | } 34 | return -1; 35 | } 36 | 37 | private bool ProcessSteamGuardFile(string filename, string filepath, string deviceID) 38 | { 39 | txtResults.AppendText($"Processing {filename}" + Environment.NewLine); 40 | try 41 | { 42 | var sgdata = BinaryPropertyListParser.Parse(File.ReadAllBytes(filepath)); 43 | var sglist = ((NSArray)((NSDictionary)sgdata)["$objects"]).GetArray(); 44 | var auth = new SteamAuthenticator() 45 | { 46 | DeviceID = $"android:{deviceID}" 47 | }; 48 | 49 | for (var i = 2; i < 14; i++) 50 | { 51 | switch (sglist[i].ToString()) 52 | { 53 | case "shared_secret": 54 | auth.SharedSecret = sglist[i + 12].ToString(); 55 | break; 56 | case "uri": 57 | auth.Uri = sglist[i + 12].ToString(); 58 | break; 59 | case "steamid": 60 | auth.Steamid = sglist[i + 12].ToString(); 61 | break; 62 | case "revocation_code": 63 | auth.RevocationCode = sglist[i + 12].ToString(); 64 | break; 65 | case "serial_number": 66 | auth.SerialNumber = sglist[i + 12].ToString(); 67 | break; 68 | case "token_gid": 69 | auth.TokenGid = sglist[i + 12].ToString(); 70 | break; 71 | case "identity_secret": 72 | auth.IdentitySecret = sglist[i + 12].ToString(); 73 | break; 74 | case "secret_1": 75 | auth.Secret = sglist[i + 12].ToString(); 76 | break; 77 | case "server_time": 78 | auth.ServerTime = sglist[i + 12].ToString(); 79 | break; 80 | case "account_name": 81 | auth.AccountName = sglist[i + 12].ToString(); 82 | break; 83 | case "steamguard_scheme": 84 | auth.SteamguardScheme = sglist[i + 12].ToString(); 85 | break; 86 | case "status": 87 | auth.Status = sglist[i + 12].ToString(); 88 | break; 89 | } 90 | } 91 | 92 | txtResults.AppendText(Environment.NewLine); 93 | 94 | txtResults.AppendText("In WinAuth, Add Steam Authenticator. Select the Import Android Tab" + 95 | Environment.NewLine + Environment.NewLine); 96 | 97 | txtResults.AppendText("Paste this into the steam_uuid.xml text box" + Environment.NewLine); 98 | txtResults.AppendText($"android:{deviceID}" + Environment.NewLine + Environment.NewLine); 99 | 100 | txtResults.AppendText( 101 | "Paste the following data, including the {} into the SteamGuare-NNNNNNNNN... text box" + 102 | Environment.NewLine); 103 | 104 | txtResults.AppendText(JsonConvert.SerializeObject(auth, Formatting.Indented) + 105 | Environment.NewLine + Environment.NewLine); 106 | 107 | txtResults.AppendText( 108 | "Alternatively, you can paste the above json text into {botname}.maFile in your ASF config directory, if you use ASF" 109 | + Environment.NewLine + Environment.NewLine); 110 | 111 | } 112 | catch (PropertyListFormatException) //The only way this should happen is if we opened an encrypted backup. 113 | { 114 | txtResults.AppendText("Error: Encrypted backups are not supported. You need to create a decrypted backup to proceed." + Environment.NewLine); 115 | return false; 116 | } 117 | catch (Exception ex) 118 | { 119 | txtResults.AppendText($"An Exception occurred while processing: {ex.Message}"); 120 | return false; 121 | } 122 | return true; 123 | } 124 | 125 | private void ProcessIOS9Backup(string d) 126 | { 127 | var guid = ProcessInfoPlist(d); 128 | if (guid == null) return; 129 | var data = File.ReadAllBytes(Path.Combine(d, "Manifest.mbdb")); 130 | var steamfiles = Encoding.UTF8.GetBytes("AppDomain-com.valvesoftware.Steam"); 131 | for (var index = 0; ; index += steamfiles.Length) 132 | { 133 | index = SearchBytes(data, steamfiles, index); 134 | if (index == -1) break; 135 | var index2 = index + steamfiles.Length; 136 | var filelen = data[index2] << 8 | data[index2 + 1]; 137 | var temp = new byte[filelen]; 138 | Array.Copy(data, index2 + 2, temp, 0, filelen); 139 | var steamfilename = Encoding.UTF8.GetString(temp); 140 | if (!steamfilename.StartsWith("Documents/Steamguard-")) continue; 141 | var hash = 142 | new SHA1Managed().ComputeHash( 143 | Encoding.UTF8.GetBytes("AppDomain-com.valvesoftware.Steam-" + steamfilename)); 144 | var hashstr = BitConverter.ToString(hash).Replace("-", ""); 145 | if (File.Exists(Path.Combine(d, hashstr))) 146 | { 147 | if (!ProcessSteamGuardFile(steamfilename, Path.Combine(d, hashstr), guid)) 148 | break; 149 | } 150 | else 151 | { 152 | txtResults.AppendText($"Error: {steamfilename} is missing from ios backup, aborting" + Environment.NewLine); 153 | break; 154 | } 155 | } 156 | } 157 | 158 | private void ProcessIOS10Backup(string d) 159 | { 160 | try 161 | { 162 | var guid = ProcessInfoPlist(d); 163 | if (guid == null) return; 164 | var dbConnection = new SQLiteConnection($"Data Source=\"{Path.Combine(d, "Manifest.db")}\";Version=3;"); 165 | dbConnection.Open(); 166 | var query = 167 | "Select * from Files where domain is 'AppDomain-com.valvesoftware.Steam' and relativePath like 'Documents/Steamguard-%'"; 168 | var dbCommand = new SQLiteCommand(query, dbConnection); 169 | var dbReader = dbCommand.ExecuteReader(); 170 | while (dbReader.Read()) 171 | { 172 | var startID = dbReader["fileID"].ToString().Substring(0, 2); 173 | var result = ProcessSteamGuardFile(dbReader["relativePath"].ToString(), 174 | Path.Combine(d, startID, dbReader["fileID"].ToString()), guid); 175 | if (!result) break; 176 | } 177 | dbConnection.Close(); 178 | } 179 | catch (SQLiteException) 180 | { 181 | txtResults.AppendText("Error: Encrypted backups are not supported. You need to create a decrypted backup to proceed." + Environment.NewLine); 182 | } 183 | catch (Exception ex) 184 | { 185 | txtResults.AppendText($"An Exception occurred while processing: {ex.Message}"); 186 | } 187 | } 188 | 189 | private string ProcessInfoPlist(string d) 190 | { 191 | try 192 | { 193 | var info = (NSDictionary) PropertyListParser.Parse(Path.Combine(d, "Info.plist")); 194 | txtResults.AppendText($"Processing backup: {info["Device Name"]} version {info["Product Version"]}" + Environment.NewLine); 195 | return info["Unique Identifier"].ToString(); 196 | } 197 | catch (Exception ex) 198 | { 199 | txtResults.AppendText($"An Exception occurred while processing: {ex.Message}"); 200 | return null; 201 | } 202 | } 203 | 204 | private void btnGetSteamGuardData_Click(object sender, EventArgs e) 205 | { 206 | var iosBackups = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), 207 | "Apple Computer", "MobileSync", "Backup"); 208 | if (!Directory.Exists(iosBackups)) 209 | { 210 | txtResults.Text = @"No ios backups found"; 211 | return; 212 | } 213 | foreach (var d in Directory.GetDirectories(iosBackups)) 214 | { 215 | var name = new DirectoryInfo(d).Name; 216 | if (File.Exists(Path.Combine(d, "Manifest.mbdb"))) 217 | ProcessIOS9Backup(d); 218 | else if (File.Exists(Path.Combine(d, "Manifest.db"))) 219 | ProcessIOS10Backup(d); 220 | else 221 | { 222 | txtResults.AppendText($"Directory {name} is not in a recognized backup format." + Environment.NewLine + 223 | "Listing contents of this directory. Please open an issue and paste this listing as well as the Version of ios and itunes you are using." + Environment.NewLine + Environment.NewLine); 224 | var count = 0; 225 | foreach (var f in Directory.GetFiles(d)) 226 | { 227 | var fileName = Path.GetFileName(f); 228 | if (fileName == null) continue; 229 | 230 | var filename = fileName.ToLower(); 231 | 232 | if (filename.Length == 40) 233 | { 234 | var chars = new [] 235 | {"0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f"}; 236 | filename = chars.Aggregate(filename, (current, c) => current.Replace(c, "")); 237 | if (filename.Length == 0) 238 | { 239 | count++; 240 | continue; 241 | } 242 | } 243 | filename = fileName; 244 | txtResults.AppendText($"{filename}" + Environment.NewLine); 245 | } 246 | txtResults.AppendText(Environment.NewLine + $"Done listing files - Skipped {count} files" + Environment.NewLine + 247 | Environment.NewLine); 248 | continue; 249 | } 250 | 251 | txtResults.AppendText("Done" + Environment.NewLine + Environment.NewLine); 252 | } 253 | } 254 | } 255 | } 256 | -------------------------------------------------------------------------------- /ios-steamguard-extractor/Form1.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | -------------------------------------------------------------------------------- /ios-steamguard-extractor/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using System.Windows.Forms; 6 | 7 | namespace ios_steamguard_extractor 8 | { 9 | static class Program 10 | { 11 | /// 12 | /// The main entry point for the application. 13 | /// 14 | [STAThread] 15 | static void Main() 16 | { 17 | Application.EnableVisualStyles(); 18 | Application.SetCompatibleTextRenderingDefault(false); 19 | Application.Run(new Form1()); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /ios-steamguard-extractor/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("ios-steamguard-extractor")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("ios-steamguard-extractor")] 13 | [assembly: AssemblyCopyright("Copyright © 2017")] 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("9913ed22-8249-4397-b920-c9bd25778ec9")] 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 | -------------------------------------------------------------------------------- /ios-steamguard-extractor/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace ios_steamguard_extractor.Properties 12 | { 13 | 14 | 15 | /// 16 | /// A strongly-typed resource class, for looking up localized strings, etc. 17 | /// 18 | // This class was auto-generated by the StronglyTypedResourceBuilder 19 | // class via a tool like ResGen or Visual Studio. 20 | // To add or remove a member, edit your .ResX file then rerun ResGen 21 | // with the /str option, or rebuild your VS project. 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Resources 26 | { 27 | 28 | private static global::System.Resources.ResourceManager resourceMan; 29 | 30 | private static global::System.Globalization.CultureInfo resourceCulture; 31 | 32 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 33 | internal Resources() 34 | { 35 | } 36 | 37 | /// 38 | /// Returns the cached ResourceManager instance used by this class. 39 | /// 40 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 41 | internal static global::System.Resources.ResourceManager ResourceManager 42 | { 43 | get 44 | { 45 | if ((resourceMan == null)) 46 | { 47 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ios_steamguard_extractor.Properties.Resources", typeof(Resources).Assembly); 48 | resourceMan = temp; 49 | } 50 | return resourceMan; 51 | } 52 | } 53 | 54 | /// 55 | /// Overrides the current thread's CurrentUICulture property for all 56 | /// resource lookups using this strongly typed resource class. 57 | /// 58 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 59 | internal static global::System.Globalization.CultureInfo Culture 60 | { 61 | get 62 | { 63 | return resourceCulture; 64 | } 65 | set 66 | { 67 | resourceCulture = value; 68 | } 69 | } 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /ios-steamguard-extractor/Properties/Resources.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | text/microsoft-resx 107 | 108 | 109 | 2.0 110 | 111 | 112 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 113 | 114 | 115 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | -------------------------------------------------------------------------------- /ios-steamguard-extractor/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace ios_steamguard_extractor.Properties 12 | { 13 | 14 | 15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] 17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase 18 | { 19 | 20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 21 | 22 | public static Settings Default 23 | { 24 | get 25 | { 26 | return defaultInstance; 27 | } 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /ios-steamguard-extractor/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios-steamguard-extractor/SteamAuthenticator.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | 3 | namespace ios_steamguard_extractor 4 | { 5 | public class SteamAuthenticator 6 | { 7 | [JsonProperty("shared_secret")] 8 | public string SharedSecret { get; set; } 9 | 10 | [JsonProperty("uri")] 11 | public string Uri { get; set; } 12 | 13 | [JsonProperty("steamid")] 14 | public string Steamid { get; set; } 15 | 16 | [JsonProperty("revocation_code")] 17 | public string RevocationCode { get; set; } 18 | 19 | [JsonProperty("serial_number")] 20 | public string SerialNumber { get; set; } 21 | 22 | [JsonProperty("token_gid")] 23 | public string TokenGid { get; set; } 24 | 25 | [JsonProperty("identity_secret")] 26 | public string IdentitySecret { get; set; } 27 | 28 | [JsonProperty("secret_1")] 29 | public string Secret { get; set; } 30 | 31 | [JsonProperty("server_time")] 32 | public string ServerTime { get; set; } 33 | 34 | [JsonProperty("account_name")] 35 | public string AccountName { get; set; } 36 | 37 | [JsonProperty("steamguard_scheme")] 38 | public string SteamguardScheme { get; set; } 39 | 40 | [JsonProperty("status")] 41 | public string Status { get; set; } 42 | 43 | //Added for direct import of json blob to Archi's Steam Farm 44 | [JsonProperty("device_id")] 45 | public string DeviceID { get; set; } 46 | } 47 | } -------------------------------------------------------------------------------- /ios-steamguard-extractor/costura32/SQLite.Interop.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CaitSith2/ios-steamguard-extractor/3851f689ffaba053225435afe2d38d01f46f0dfa/ios-steamguard-extractor/costura32/SQLite.Interop.dll -------------------------------------------------------------------------------- /ios-steamguard-extractor/costura64/SQLite.Interop.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CaitSith2/ios-steamguard-extractor/3851f689ffaba053225435afe2d38d01f46f0dfa/ios-steamguard-extractor/costura64/SQLite.Interop.dll -------------------------------------------------------------------------------- /ios-steamguard-extractor/ios-steamguard-extractor.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {9913ED22-8249-4397-B920-C9BD25778EC9} 8 | WinExe 9 | Properties 10 | ios_steamguard_extractor 11 | ios-steamguard-extractor 12 | v4.5.2 13 | 512 14 | true 15 | 16 | 17 | 18 | 19 | AnyCPU 20 | true 21 | full 22 | false 23 | bin\Debug\ 24 | DEBUG;TRACE 25 | prompt 26 | 4 27 | 28 | 29 | AnyCPU 30 | pdbonly 31 | true 32 | bin\Release\ 33 | TRACE 34 | prompt 35 | 4 36 | 37 | 38 | 39 | ..\packages\EntityFramework.6.0.0\lib\net45\EntityFramework.dll 40 | True 41 | 42 | 43 | ..\packages\EntityFramework.6.0.0\lib\net45\EntityFramework.SqlServer.dll 44 | True 45 | 46 | 47 | ..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll 48 | True 49 | 50 | 51 | ..\packages\plist-cil.1.14\lib\plist-cil.dll 52 | True 53 | 54 | 55 | 56 | 57 | 58 | ..\packages\System.Data.SQLite.Core.1.0.104.0\lib\net451\System.Data.SQLite.dll 59 | True 60 | 61 | 62 | ..\packages\System.Data.SQLite.EF6.1.0.104.0\lib\net451\System.Data.SQLite.EF6.dll 63 | True 64 | 65 | 66 | ..\packages\System.Data.SQLite.Linq.1.0.104.0\lib\net451\System.Data.SQLite.Linq.dll 67 | True 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | Form 82 | 83 | 84 | Form1.cs 85 | 86 | 87 | 88 | 89 | 90 | Form1.cs 91 | 92 | 93 | ResXFileCodeGenerator 94 | Resources.Designer.cs 95 | Designer 96 | 97 | 98 | True 99 | Resources.resx 100 | 101 | 102 | 103 | SettingsSingleFileGenerator 104 | Settings.Designer.cs 105 | 106 | 107 | True 108 | Settings.settings 109 | True 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | (); 184 | var attribute = config.Attribute("ExcludeAssemblies"); 185 | if (attribute != null) 186 | foreach (var item in attribute.Value.Split('|').Select(x => x.Trim()).Where(x => x != string.Empty)) 187 | excludedAssemblies.Add(item); 188 | var element = config.Element("ExcludeAssemblies"); 189 | if (element != null) 190 | foreach (var item in element.Value.Split(new[] { "\r\n", "\n" }, StringSplitOptions.RemoveEmptyEntries).Select(x => x.Trim()).Where(x => x != string.Empty)) 191 | excludedAssemblies.Add(item); 192 | 193 | var filesToCleanup = Files.Select(f => f.ItemSpec).Where(f => !excludedAssemblies.Contains(Path.GetFileNameWithoutExtension(f), StringComparer.InvariantCultureIgnoreCase)); 194 | 195 | foreach (var item in filesToCleanup) 196 | File.Delete(item); 197 | ]]> 198 | 199 | 200 | 201 | 202 | 203 | 210 | -------------------------------------------------------------------------------- /ios-steamguard-extractor/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /preview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CaitSith2/ios-steamguard-extractor/3851f689ffaba053225435afe2d38d01f46f0dfa/preview.png --------------------------------------------------------------------------------