Permalink
Browse files

Cleaned up source code and simplified patching scripts, improved erro…

…r handling. Added Seas0nPass appliance for visual indication of jailbreak success.
  • Loading branch information...
1 parent bbc3e47 commit 6d9d9d5a787ce0c78ae0556ce257d77d43e8b152 FireCore, LLC committed Apr 26, 2011
Showing with 1,384 additions and 1,476 deletions.
  1. 0 Seas0nPass.sln
  2. 0 Seas0nPass/ArchiveUtils.cs
  3. 0 Seas0nPass/Controls/DFUControl.Designer.cs
  4. +0 −9 Seas0nPass/Controls/DFUControl.cs
  5. 0 Seas0nPass/Controls/DFUControl.resx
  6. 0 Seas0nPass/Controls/DFUSuccessControl.Designer.cs
  7. +9 −1 Seas0nPass/Controls/DFUSuccessControl.cs
  8. 0 Seas0nPass/Controls/DFUSuccessControl.resx
  9. 0 Seas0nPass/Controls/DownloadControl.Designer.cs
  10. 0 Seas0nPass/Controls/DownloadControl.cs
  11. 0 Seas0nPass/Controls/DownloadControl.resx
  12. 0 Seas0nPass/Controls/PatchControl.Designer.cs
  13. +2 −11 Seas0nPass/Controls/PatchControl.cs
  14. 0 Seas0nPass/Controls/PatchControl.resx
  15. +1 −24 Seas0nPass/Controls/StartControl.Designer.cs
  16. +26 −24 Seas0nPass/Controls/StartControl.cs
  17. +2 −2 Seas0nPass/Controls/StartControl.resx
  18. 0 Seas0nPass/Controls/TetherControl.Designer.cs
  19. 0 Seas0nPass/Controls/TetherControl.cs
  20. 0 Seas0nPass/Controls/TetherControl.resx
  21. 0 Seas0nPass/Controls/TetherSuccessControl.Designer.cs
  22. 0 Seas0nPass/Controls/TetherSuccessControl.cs
  23. 0 Seas0nPass/Controls/TetherSuccessControl.resx
  24. +10 −1 Seas0nPass/CustomEventArgs/CreateIPSWClickedEventArgs.cs
  25. +26 −0 Seas0nPass/CustomEventArgs/CreateIPSWFirmwareClickedEventArgs.cs
  26. +11 −2 Seas0nPass/FirmwareVersions.cs
  27. 0 Seas0nPass/Interfaces/IDFUModel.cs
  28. 0 Seas0nPass/Interfaces/IDFUSuccessControl.cs
  29. 0 Seas0nPass/Interfaces/IDFUView.cs
  30. +6 −5 Seas0nPass/Interfaces/IDownloadModel.cs
  31. 0 Seas0nPass/Interfaces/IDownloadView.cs
  32. +12 −3 Seas0nPass/Interfaces/IFirmwareVersionDetector.cs
  33. +4 −8 Seas0nPass/Interfaces/IFirmwareVersionModel.cs
  34. +0 −1 Seas0nPass/Interfaces/IMainModel.cs
  35. +2 −1 Seas0nPass/Interfaces/IMainView.cs
  36. 0 Seas0nPass/Interfaces/IPatchModel.cs
  37. 0 Seas0nPass/Interfaces/IPatchView.cs
  38. +3 −3 Seas0nPass/Interfaces/IStartView.cs
  39. 0 Seas0nPass/Interfaces/ITetherModel.cs
  40. 0 Seas0nPass/Interfaces/ITetherSuccessControl.cs
  41. 0 Seas0nPass/Interfaces/ITetherView.cs
  42. 0 Seas0nPass/Interfaces/IView.cs
  43. 0 Seas0nPass/IoC.cs
  44. +1 −1 Seas0nPass/LogUtil.cs
  45. 0 Seas0nPass/MainForm.Designer.cs
  46. +12 −5 Seas0nPass/MainForm.cs
  47. 0 Seas0nPass/MainForm.resx
  48. +23 −46 Seas0nPass/Models/DFUModel.cs
  49. +45 −30 Seas0nPass/Models/DownloadModel.cs
  50. +29 −0 Seas0nPass/Models/FirmwareVersion.cs
  51. +22 −9 Seas0nPass/Models/FirmwareVersionDetector.cs
  52. +79 −45 Seas0nPass/Models/FirmwareVersionModel.cs
  53. +9 −1 Seas0nPass/Models/IPatch.cs
  54. +0 −10 Seas0nPass/Models/MainModel.cs
  55. +30 −0 Seas0nPass/Models/PatchCommandException.cs
  56. +26 −0 Seas0nPass/Models/PatchCommands/CommandResult.cs
  57. +28 −0 Seas0nPass/Models/PatchCommands/CommentCommand.cs
  58. +45 −0 Seas0nPass/Models/PatchCommands/CopyCommand.cs
  59. +43 −0 Seas0nPass/Models/PatchCommands/CopydirCommand.cs
  60. +41 −0 Seas0nPass/Models/PatchCommands/DeleteCommand.cs
  61. +53 −0 Seas0nPass/Models/PatchCommands/ExecCommand.cs
  62. +21 −0 Seas0nPass/Models/PatchCommands/ICommandResult.cs
  63. +21 −0 Seas0nPass/Models/PatchCommands/IPatchCommand.cs
  64. +40 −0 Seas0nPass/Models/PatchCommands/MessageCommand.cs
  65. +44 −0 Seas0nPass/Models/PatchCommands/MoveCommand.cs
  66. +54 −0 Seas0nPass/Models/PatchCommands/PatchCommand.cs
  67. +40 −0 Seas0nPass/Models/PatchCommands/ProgressCommand.cs
  68. +39 −0 Seas0nPass/Models/PatchCommands/ResetdirCommand.cs
  69. +41 −0 Seas0nPass/Models/PatchCommands/SetCommand.cs
  70. +46 −0 Seas0nPass/Models/PatchCommands/UngzipCommand.cs
  71. +43 −0 Seas0nPass/Models/PatchCommands/UnzipCommand.cs
  72. +54 −51 Seas0nPass/Models/PatchModel.cs
  73. +0 −176 Seas0nPass/Models/Patch_421_8C154.cs
  74. +0 −171 Seas0nPass/Models/Patch_43_8F191m.cs
  75. +0 −2 Seas0nPass/Models/TetherModel.cs
  76. +154 −0 Seas0nPass/Models/UniversalPatch.cs
  77. 0 Seas0nPass/Presenters/DFUPresenter.cs
  78. +25 −8 Seas0nPass/Presenters/DownloadPresenter.cs
  79. +57 −68 Seas0nPass/Presenters/MainPresenter.cs
  80. 0 Seas0nPass/Presenters/PatchPresenter.cs
  81. 0 Seas0nPass/Presenters/TetherPresenter.cs
  82. 0 Seas0nPass/Program.cs
  83. +3 −3 Seas0nPass/Properties/AssemblyInfo.cs
  84. +36 −0 Seas0nPass/Properties/AssemblyInfo.tpl
  85. 0 Seas0nPass/Properties/Resources.Designer.cs
  86. 0 Seas0nPass/Properties/Resources.resx
  87. 0 Seas0nPass/Properties/Settings.Designer.cs
  88. 0 Seas0nPass/Properties/Settings.settings
  89. +0 −1 Seas0nPass/Resources/421_010_decrypt_ramdisk.bat
  90. +0 −10 Seas0nPass/Resources/421_020_patch_asr.bat
  91. +0 −1 Seas0nPass/Resources/421_030_encrypt_ramdisk.bat
  92. +0 −1 Seas0nPass/Resources/421_040_decrypt_filesystem.bat
  93. +0 −1 Seas0nPass/Resources/421_050_unpack_filesystem_image.bat
  94. +0 −9 Seas0nPass/Resources/421_060_patch_fstab.bat
  95. +0 −9 Seas0nPass/Resources/421_061_patch_appletv.bat
  96. +0 −9 Seas0nPass/Resources/421_062_patch_Services_plist.bat
  97. +0 −5 Seas0nPass/Resources/421_063_add_hfs_mdb.bat
  98. +0 −5 Seas0nPass/Resources/421_064_add_kern_sploit.bat
  99. +0 −7 Seas0nPass/Resources/421_065_add_punchd.bat
  100. +0 −16 Seas0nPass/Resources/421_080_add_cydia_to_image.bat
  101. +0 −26 Seas0nPass/Resources/421_081_create_symlinks.bat
  102. +0 −3 Seas0nPass/Resources/421_082_add_uncompress.bat
  103. +0 −1 Seas0nPass/Resources/421_090_pack_filesystem_image.bat
  104. +0 −3 Seas0nPass/Resources/421_110_patch_dfu.bat
  105. +0 −1 Seas0nPass/Resources/43_010_decrypt_ramdisk.bat
  106. +0 −11 Seas0nPass/Resources/43_020_patch_asr.bat
  107. +0 −1 Seas0nPass/Resources/43_030_encrypt_ramdisk.bat
  108. +0 −1 Seas0nPass/Resources/43_040_decrypt_filesystem.bat
  109. +0 −1 Seas0nPass/Resources/43_050_unpack_filesystem_image.bat
  110. +0 −9 Seas0nPass/Resources/43_060_patch_fstab.bat
  111. +0 −9 Seas0nPass/Resources/43_061_patch_appletv.bat
  112. +0 −9 Seas0nPass/Resources/43_062_patch_Services_plist.bat
  113. +0 −18 Seas0nPass/Resources/43_080_add_cydia_to_image.bat
  114. +0 −26 Seas0nPass/Resources/43_081_create_symlinks.bat
  115. +0 −3 Seas0nPass/Resources/43_082_add_uncompress.bat
  116. +0 −5 Seas0nPass/Resources/43_083_patch_status.bat
  117. +0 −1 Seas0nPass/Resources/43_090_pack_filesystem_image.bat
  118. +0 −3 Seas0nPass/Resources/43_110_patch_dfu.bat
  119. BIN Seas0nPass/Resources/Binaries.zip
  120. +8 −0 Seas0nPass/Resources/ProgramsToKill.txt
  121. +12 −383 Seas0nPass/ScriptResource.Designer.cs
  122. +2 −95 Seas0nPass/ScriptResource.resx
  123. +26 −32 Seas0nPass/Seas0nPass.csproj
  124. BIN Seas0nPass/Seas0nPass.ico
  125. +18 −40 Seas0nPass/Utils.cs
  126. 0 Seas0nPass/app.config
  127. 0 Seas0nPass/app.manifest
  128. BIN libs/ICSharpCode.SharpZipLib.dll
View
0 Seas0nPass.sln 100755 → 100644
No changes.
View
0 Seas0nPass/ArchiveUtils.cs 100755 → 100644
No changes.
View
No changes.
View
9 Seas0nPass/Controls/DFUControl.cs 100755 → 100644
@@ -25,8 +25,6 @@ public DFUControl()
InitializeComponent();
}
-
-
public void SetMessageText(string text)
{
Action action = delegate { this.label.Text = text; };
@@ -35,7 +33,6 @@ public void SetMessageText(string text)
Invoke(action);
else
action();
-
}
public void UpdateProgress(int value)
@@ -51,21 +48,15 @@ public void UpdateProgress(int value)
Invoke(action);
else
action();
-
-
}
-
public void Clear()
{
Action action = delegate { progressBar.Style = ProgressBarStyle.Marquee; label.Text = ""; };
if (InvokeRequired)
Invoke(action);
else
action();
-
}
-
-
}
}
View
No changes.
View
No changes.
View
@@ -39,7 +39,15 @@ private void button_Click(object sender, EventArgs e)
public void SetFileName(string fileName)
{
- label1.Text = string.Format(successMessage, fileName);
+ Action action = delegate
+ {
+ this.label1.Text = string.Format(successMessage, fileName);
+ };
+
+ if (InvokeRequired)
+ Invoke(action);
+ else
+ action();
}
}
}
View
No changes.
View
No changes.
View
No changes.
View
No changes.
View
No changes.
View
@@ -20,21 +20,20 @@ namespace Seas0nPass
{
public partial class PatchControl : UserControl, IPatchView
{
+ public event EventHandler ActionButtonClicked;
+
public PatchControl()
{
InitializeComponent();
}
-
-
public void SetMessageText(string text)
{
Action action = () => this.label.Text = text; ;
if (InvokeRequired)
Invoke(action);
else
action();
-
}
public void UpdateProgress(int value)
@@ -45,19 +44,14 @@ public void UpdateProgress(int value)
Invoke(action);
else
action();
-
-
}
- public event EventHandler ActionButtonClicked;
-
private void actionButton_Click(object sender, EventArgs e)
{
if (ActionButtonClicked != null)
ActionButtonClicked(sender, e);
}
-
public void SetActionButtonText(string text)
{
Action action = () => actionButton.Text = text;
@@ -66,9 +60,6 @@ public void SetActionButtonText(string text)
Invoke(action);
else
action();
-
}
-
-
}
}
View
No changes.
View
Oops, something went wrong.
View
@@ -17,11 +17,16 @@
using Seas0nPass.Interfaces;
using System.Security.Principal;
using Seas0nPass.CustomEventArgs;
+using Seas0nPass.Models;
namespace Seas0nPass.Controls
{
public partial class StartControl : UserControl, IStartView
{
+ private readonly Image tetherEnabledImage;
+ private readonly Image tetherDisabledImage;
+ private readonly Image tetherNotRequiredImage;
+
public StartControl()
{
InitializeComponent();
@@ -30,11 +35,7 @@ public StartControl()
tetherEnabledImage = tetheredPictureBox.ErrorImage;
}
- private Image tetherEnabledImage;
- private Image tetherDisabledImage;
- private Image tetherNotRequiredImage;
-
-
+ public event EventHandler<CreateIPSWFirmwareClickedEventArgs> CreateIPSW_fwVersion_Clicked;
public event EventHandler<CreateIPSWClickedEventArgs> CreateIPSWClicked;
public event EventHandler TetherClicked;
@@ -67,24 +68,6 @@ private void tetheredPoctureBox_Click(object sender, EventArgs e)
TetherClicked(sender, e);
}
-
- public event EventHandler CreateIPSW_421_8C154_Clicked;
-
- public event EventHandler CreateIPSW_43_8F191m_Clicked;
-
- private void toolStripMenuItem2_Click(object sender, EventArgs e)
- {
- if (CreateIPSW_421_8C154_Clicked != null)
- CreateIPSW_421_8C154_Clicked(sender, e);
- }
-
- private void toolStripMenuItem3_Click(object sender, EventArgs e)
- {
- if (CreateIPSW_43_8F191m_Clicked != null)
- CreateIPSW_43_8F191m_Clicked(sender, e);
- }
-
-
public void DisableTether()
{
tetheredPictureBox.BackgroundImage = tetherDisabledImage;
@@ -103,12 +86,31 @@ public void SetTetherNotRequiredState()
{
tetheredPictureBox.BackgroundImage = tetherNotRequiredImage;
tetherLabel.Enabled = true;
+ }
+
+ public void InitFirmwaresList(FirmwareVersion[] firmwares)
+ {
+ ipswContextMenuStrip.Items.Clear();
+ var items = new ToolStripMenuItem[firmwares.Length];
+ for (int i = 0; i < firmwares.Length; i++)
+ {
+ items[i] = new ToolStripMenuItem(firmwares[i].Name, null, ipswPictureBoxFirmware_Click)
+ {
+ Tag = firmwares[i]
+ };
+ }
+ ipswContextMenuStrip.Items.AddRange(items);
+ }
+ private void ipswPictureBoxFirmware_Click(object sender, EventArgs e)
+ {
+ var fwVersion = (FirmwareVersion)((ToolStripMenuItem)sender).Tag;
+ if (CreateIPSW_fwVersion_Clicked != null)
+ CreateIPSW_fwVersion_Clicked(this, new CreateIPSWFirmwareClickedEventArgs(fwVersion));
}
private void SetPressedState(Control control, bool isPressed)
{
-
control.BackColor = isPressed ? Color.FromArgb(255, Color.DarkGray) : Color.White;
}
View
@@ -1378,7 +1378,7 @@
RudN65tdA8sHzg46DF645Xrr8m2v29fvrLwzMBQydHc4cnjkLvvu5L2key/vZ9yff7DpIfph4SOpR+WP
lR7X/aj3Y+uI5ciZUdfRvidBTx6Mscae/5T+04fx/Kfkp+UTqhONk2aTp6fcp24+W/1s/Hnq8/npgp+l
f65+ofviu18cf+mbWTUz/pL/cuHX4lfyr468Xva6e9Z/9vGb5Dfzc4Vv5d8efcd41/s+7P3EfOYH7IeK
- j3ofuz55f3q4kLyw8Bv3hPP74uYdwgAAAAlwSFlzAAALDgAACw4BQL7hQQAAQEVJREFUeF7tnQ2IHdXZ
+ j3ofuz55f3q4kLyw8Bv3hPP74uYdwgAAAAlwSFlzAAALDAAACwwBP0AiyAAAQEVJREFUeF7tnQ2IHdXZ
+IUiCEWQF4SXQkEKIhTkhYIURBBEeEGEUhBEEEQQSiEUBBEE0e5Xsh/u7cakm+5qzJq4241ZXRMTN802
MXEladKNiVmTJm6aNDFp0rXGpKZaP+c/z/3vzXt3937MzJmPc87zu7AUmztz597nd57nd86cOee6IAiu
44/fAAZgAAZgAAZ0MUDxR4BgAAZgAAZgQCEDBF1h0LF8XZZPvIk3DMBALQYQAAQABmAABmAABhQyQNAV
@@ -1703,7 +1703,7 @@
RudN65tdA8sHzg46DF645Xrr8m2v29fvrLwzMBQydHc4cnjkLvvu5L2key/vZ9yff7DpIfph4SOpR+WP
lR7X/aj3Y+uI5ciZUdfRvidBTx6Mscae/5T+04fx/Kfkp+UTqhONk2aTp6fcp24+W/1s/Hnq8/npgp+l
f65+ofviu18cf+mbWTUz/pL/cuHX4lfyr468Xva6e9Z/9vGb5Dfzc4Vv5d8efcd41/s+7P3EfOYH7IeK
- j3ofuz55f3q4kLyw8Bv3hPP74uYdwgAAAAlwSFlzAAALDgAACw4BQL7hQQAAAAZiS0dEAP8A/wD/oL2n
+ j3ofuz55f3q4kLyw8Bv3hPP74uYdwgAAAAlwSFlzAAALDAAACwwBP0AiyAAAAAZiS0dEAP8A/wD/oL2n
kwAAAAd0SU1FB9sCCwwbNnZ6NUoAADARSURBVHhe7d2PhyVnugfwZYWwQlzCtSyxRFjiEmKJECJcYljL
EiFECGsZS4gQIowhjKH/uqzWo3WMHm2i9WoTo1ebNfd953Znz/ScPqeq3vrx/vg0R/beOVWn6nPe93m+
VadOnV/9yh8BAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBA
View
No changes.
View
No changes.
View
No changes.
No changes.
View
No changes.
View
No changes.
@@ -1,7 +1,16 @@
-using System;
+////
+//
+// Seas0nPass
+//
+// Copyright 2011 FireCore, LLC. All rights reserved.
+// http://firecore.com
+//
+////
+using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
+using Seas0nPass.Models;
namespace Seas0nPass.CustomEventArgs
{
@@ -0,0 +1,26 @@
+////
+//
+// Seas0nPass
+//
+// Copyright 2011 FireCore, LLC. All rights reserved.
+// http://firecore.com
+//
+////
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Seas0nPass.Models;
+
+namespace Seas0nPass.CustomEventArgs
+{
+ public class CreateIPSWFirmwareClickedEventArgs : EventArgs
+ {
+ public FirmwareVersion FirmwareVersion { get; private set; }
+
+ public CreateIPSWFirmwareClickedEventArgs(FirmwareVersion firmwareVersion)
+ {
+ FirmwareVersion = firmwareVersion;
+ }
+ }
+}
View
13 Seas0nPass/FirmwareVersions.cs 100755 → 100644
@@ -1,4 +1,12 @@
-using System;
+////
+//
+// Seas0nPass
+//
+// Copyright 2011 FireCore, LLC. All rights reserved.
+// http://firecore.com
+//
+////
+using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
@@ -9,6 +17,7 @@ public enum FirmwareVersions
{
Unknown,
Version421_8C154,
- Version43_8F191m
+ Version43_8F191m,
+ Version43_8F202
}
}
View
No changes.
View
No changes.
View
0 Seas0nPass/Interfaces/IDFUView.cs 100755 → 100644
No changes.
View
@@ -15,15 +15,16 @@ namespace Seas0nPass.Interfaces
{
public interface IDownloadModel
{
-
void StartDownload();
void CancelDownload();
+
event EventHandler ProgressChanged;
- event EventHandler DownloadFinished;
+ event EventHandler DownloadCompleted;
+ event EventHandler DownloadFailed;
+ event EventHandler DownloadCanceled;
+
int Percentage { get; }
void SetFirmwareVersionModel(IFirmwareVersionModel firmwareVersionModel);
-
-
}
-}
+}
View
No changes.
View
@@ -1,14 +1,23 @@
-using System;
+////
+//
+// Seas0nPass
+//
+// Copyright 2011 FireCore, LLC. All rights reserved.
+// http://firecore.com
+//
+////
+using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
+using Seas0nPass.Models;
namespace Seas0nPass.Interfaces
{
public interface IFirmwareVersionDetector
{
- FirmwareVersions Version { get; }
+ FirmwareVersion Version { get; }
- void SaveState(FirmwareVersions Version);
+ void SaveState(FirmwareVersion version);
}
}
Oops, something went wrong.

0 comments on commit 6d9d9d5

Please sign in to comment.