Restore SEBPatch
This commit is contained in:
3
patch-seb/Form1.Designer.cs
generated
3
patch-seb/Form1.Designer.cs
generated
@@ -48,6 +48,7 @@
|
||||
//
|
||||
// textBox1
|
||||
//
|
||||
this.textBox1.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.textBox1.Location = new System.Drawing.Point(12, 38);
|
||||
this.textBox1.Multiline = true;
|
||||
this.textBox1.Name = "textBox1";
|
||||
@@ -71,7 +72,7 @@
|
||||
this.checkBox1.AutoSize = true;
|
||||
this.checkBox1.Location = new System.Drawing.Point(12, 258);
|
||||
this.checkBox1.Name = "checkBox1";
|
||||
this.checkBox1.Size = new System.Drawing.Size(64, 17);
|
||||
this.checkBox1.Size = new System.Drawing.Size(63, 17);
|
||||
this.checkBox1.TabIndex = 3;
|
||||
this.checkBox1.Text = "Backup";
|
||||
this.checkBox1.UseVisualStyleBackColor = true;
|
||||
|
@@ -21,7 +21,7 @@ namespace patch_seb
|
||||
public static bool started = false;
|
||||
public static bool alreadyPatched = false;
|
||||
public static string SEBPath = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles) + @"\SafeExamBrowser\Application\";
|
||||
public static string SupportedSEB = "3.8.0.742";
|
||||
public static string SupportedSEB = "3.9.0.787";
|
||||
public static int something = 0;
|
||||
|
||||
public Form1()
|
||||
@@ -35,25 +35,26 @@ namespace patch_seb
|
||||
|
||||
private void Form1_Load(object sender, EventArgs e)
|
||||
{
|
||||
AddLog("Safe Exam Browser Patch v" + Application.ProductVersion);
|
||||
AddLog("For Safe Exam Browser version " + SupportedSEB);
|
||||
AddLog("Safe Exam Browser Patch v" + Application.ProductVersion + " (Safe Exam Browser v" + SupportedSEB + ")");
|
||||
//AddLog("For Safe Exam Browser version " + SupportedSEB);
|
||||
AddLog("");
|
||||
if (Environment.Is64BitOperatingSystem)
|
||||
{
|
||||
AddLog("Detected x64 operating system.");
|
||||
AddLog("[INFO] Detected x64 operating system.");
|
||||
}
|
||||
else
|
||||
{
|
||||
AddLog("Detected x86 operating system.");
|
||||
AddLog("[INFO] Detected x86 operating system.");
|
||||
}
|
||||
|
||||
if (Environment.OSVersion.Version.Major != 10)
|
||||
{
|
||||
AddLog("Supported Windows version not found.");
|
||||
AddLog("[ERROR] Supported Windows version not found.");
|
||||
button1.Enabled = false;
|
||||
}
|
||||
else if (!File.Exists(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles) + @"\SafeExamBrowser\Application\SafeExamBrowser.exe"))
|
||||
{
|
||||
AddLog("Safe Exam Browser not found.");
|
||||
AddLog("[ERROR] Safe Exam Browser not found.");
|
||||
button1.Enabled = false;
|
||||
}
|
||||
else
|
||||
@@ -62,7 +63,7 @@ namespace patch_seb
|
||||
FileVersionInfo SEBDLLVersion = FileVersionInfo.GetVersionInfo(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles) + @"\SafeExamBrowser\Application\SafeExamBrowser.Configuration.dll");
|
||||
if (SEBVersion.FileVersion != SupportedSEB)
|
||||
{
|
||||
AddLog("Found unsupported Safe Exam Browser version.");
|
||||
AddLog("[ERROR] Found unsupported Safe Exam Browser version.");
|
||||
button1.Enabled = false;
|
||||
}
|
||||
else if (SEBVersion.ProductVersion == SupportedSEB || SEBDLLVersion.ProductVersion == "1.0.0.0") // Somehow the patched version string differs from the official version string.
|
||||
@@ -72,11 +73,13 @@ namespace patch_seb
|
||||
isBackup = false;
|
||||
alreadyPatched = true;
|
||||
button1.Text = "PATCH AGAIN/UPDATE";
|
||||
AddLog("Found an already patched Safe Exam Browser.");
|
||||
AddLog("[WARNING] Found an already patched Safe Exam Browser.");
|
||||
AddLog("READY TO UPDATE PATCH");
|
||||
}
|
||||
else
|
||||
{
|
||||
AddLog("Supported Safe Exam Browser version found.");
|
||||
AddLog("[INFO] Supported Safe Exam Browser version found.");
|
||||
AddLog("READY TO PATCH");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -130,20 +133,15 @@ namespace patch_seb
|
||||
File.Delete(SEBPath + @"SafeExamBrowser.UserInterface.Desktop.dll.backup");
|
||||
}
|
||||
File.Copy(SEBPath + @"SafeExamBrowser.UserInterface.Desktop.dll", SEBPath + @"SafeExamBrowser.UserInterface.Desktop.dll.backup");
|
||||
if (File.Exists(SEBPath + @"SafeExamBrowser.UserInterface.Shared.dll.backup"))
|
||||
if (File.Exists(SEBPath + @"SafeExamBrowser.UserInterface.Mobile.dll.backup"))
|
||||
{
|
||||
File.Delete(SEBPath + @"SafeExamBrowser.UserInterface.Shared.dll.backup");
|
||||
File.Delete(SEBPath + @"SafeExamBrowser.UserInterface.Mobile.dll.backup");
|
||||
}
|
||||
File.Copy(SEBPath + @"SafeExamBrowser.UserInterface.Shared.dll", SEBPath + @"SafeExamBrowser.UserInterface.Shared.dll.backup");
|
||||
if (File.Exists(SEBPath + @"SafeExamBrowser.WindowsApi.dll.backup"))
|
||||
{
|
||||
File.Delete(SEBPath + @"SafeExamBrowser.WindowsApi.dll.backup");
|
||||
}
|
||||
File.Copy(SEBPath + @"SafeExamBrowser.WindowsApi.dll", SEBPath + @"SafeExamBrowser.WindowsApi.dll.backup");
|
||||
File.Copy(SEBPath + @"SafeExamBrowser.UserInterface.Mobile.dll", SEBPath + @"SafeExamBrowser.UserInterface.Mobile.dll.backup");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
AddLog(ex.Message);
|
||||
AddLog("[ERROR] " + ex.Message);
|
||||
}
|
||||
}
|
||||
try
|
||||
@@ -153,8 +151,7 @@ namespace patch_seb
|
||||
File.Delete(SEBPath + @"SafeExamBrowser.Configuration.dll");
|
||||
File.Delete(SEBPath + @"SafeExamBrowser.Monitoring.dll");
|
||||
File.Delete(SEBPath + @"SafeExamBrowser.UserInterface.Desktop.dll");
|
||||
File.Delete(SEBPath + @"SafeExamBrowser.UserInterface.Shared.dll");
|
||||
File.Delete(SEBPath + @"SafeExamBrowser.WindowsApi.dll");
|
||||
File.Delete(SEBPath + @"SafeExamBrowser.UserInterface.Mobile.dll");
|
||||
if (Environment.Is64BitOperatingSystem) // 64 bits patch
|
||||
{
|
||||
File.WriteAllBytes(SEBPath + @"SafeExamBrowser.exe", Resources.SafeExamBrowser);
|
||||
@@ -162,8 +159,7 @@ namespace patch_seb
|
||||
File.WriteAllBytes(SEBPath + @"SafeExamBrowser.Configuration.dll", Resources.SafeExamBrowser_Configuration);
|
||||
File.WriteAllBytes(SEBPath + @"SafeExamBrowser.Monitoring.dll", Resources.SafeExamBrowser_Monitoring);
|
||||
File.WriteAllBytes(SEBPath + @"SafeExamBrowser.UserInterface.Desktop.dll", Resources.SafeExamBrowser_UserInterface_Desktop);
|
||||
File.WriteAllBytes(SEBPath + @"SafeExamBrowser.UserInterface.Shared.dll", Resources.SafeExamBrowser_UserInterface_Shared);
|
||||
File.WriteAllBytes(SEBPath + @"SafeExamBrowser.WindowsApi.dll", Resources.SafeExamBrowser_WindowsApi);
|
||||
File.WriteAllBytes(SEBPath + @"SafeExamBrowser.UserInterface.Mobile.dll", Resources.SafeExamBrowser_UserInterface_Mobile);
|
||||
}
|
||||
else // 32 bits patch
|
||||
{
|
||||
@@ -172,15 +168,14 @@ namespace patch_seb
|
||||
File.WriteAllBytes(SEBPath + @"SafeExamBrowser.Configuration.dll", Resources.SafeExamBrowser_Configuration1);
|
||||
File.WriteAllBytes(SEBPath + @"SafeExamBrowser.Monitoring.dll", Resources.SafeExamBrowser_Monitoring1);
|
||||
File.WriteAllBytes(SEBPath + @"SafeExamBrowser.UserInterface.Desktop.dll", Resources.SafeExamBrowser_UserInterface_Desktop1);
|
||||
File.WriteAllBytes(SEBPath + @"SafeExamBrowser.UserInterface.Shared.dll", Resources.SafeExamBrowser_UserInterface_Shared1);
|
||||
File.WriteAllBytes(SEBPath + @"SafeExamBrowser.WindowsApi.dll", Resources.SafeExamBrowser_WindowsApi1);
|
||||
File.WriteAllBytes(SEBPath + @"SafeExamBrowser.UserInterface.Mobile.dll", Resources.SafeExamBrowser_UserInterface_Mobile1);
|
||||
}
|
||||
AddLog("Patching done.");
|
||||
AddLog("PATCHING DONE");
|
||||
button1.Text = "PATCH DONE";
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
AddLog(ex.Message);
|
||||
AddLog("[ERROR] " + ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
|
||||
// Numero di build
|
||||
// Revisione
|
||||
//
|
||||
[assembly: AssemblyVersion("1.4.1.0")]
|
||||
[assembly: AssemblyFileVersion("1.4.1.0")]
|
||||
[assembly: AssemblyVersion("1.5.2.0")]
|
||||
[assembly: AssemblyFileVersion("1.5.2.0")]
|
||||
|
28
patch-seb/Properties/Resources.Designer.cs
generated
28
patch-seb/Properties/Resources.Designer.cs
generated
@@ -153,9 +153,9 @@ namespace patch_seb.Properties {
|
||||
/// <summary>
|
||||
/// Cerca una risorsa localizzata di tipo System.Byte[].
|
||||
/// </summary>
|
||||
internal static byte[] SafeExamBrowser_UserInterface_Shared {
|
||||
internal static byte[] SafeExamBrowser_UserInterface_Mobile {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("SafeExamBrowser_UserInterface_Shared", resourceCulture);
|
||||
object obj = ResourceManager.GetObject("SafeExamBrowser_UserInterface_Mobile", resourceCulture);
|
||||
return ((byte[])(obj));
|
||||
}
|
||||
}
|
||||
@@ -163,29 +163,9 @@ namespace patch_seb.Properties {
|
||||
/// <summary>
|
||||
/// Cerca una risorsa localizzata di tipo System.Byte[].
|
||||
/// </summary>
|
||||
internal static byte[] SafeExamBrowser_UserInterface_Shared1 {
|
||||
internal static byte[] SafeExamBrowser_UserInterface_Mobile1 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("SafeExamBrowser_UserInterface_Shared1", resourceCulture);
|
||||
return ((byte[])(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Cerca una risorsa localizzata di tipo System.Byte[].
|
||||
/// </summary>
|
||||
internal static byte[] SafeExamBrowser_WindowsApi {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("SafeExamBrowser_WindowsApi", resourceCulture);
|
||||
return ((byte[])(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Cerca una risorsa localizzata di tipo System.Byte[].
|
||||
/// </summary>
|
||||
internal static byte[] SafeExamBrowser_WindowsApi1 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("SafeExamBrowser_WindowsApi1", resourceCulture);
|
||||
object obj = ResourceManager.GetObject("SafeExamBrowser_UserInterface_Mobile1", resourceCulture);
|
||||
return ((byte[])(obj));
|
||||
}
|
||||
}
|
||||
|
@@ -148,16 +148,10 @@
|
||||
<data name="SafeExamBrowser_UserInterface_Desktop1" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\x86\SafeExamBrowser.UserInterface.Desktop.dll;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="SafeExamBrowser_UserInterface_Shared" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\x64\SafeExamBrowser.UserInterface.Shared.dll;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<data name="SafeExamBrowser_UserInterface_Mobile" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\x64\SafeExamBrowser.UserInterface.Mobile.dll;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="SafeExamBrowser_UserInterface_Shared1" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\x86\SafeExamBrowser.UserInterface.Shared.dll;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="SafeExamBrowser_WindowsApi" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\x64\SafeExamBrowser.WindowsApi.dll;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="SafeExamBrowser_WindowsApi1" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\x86\SafeExamBrowser.WindowsApi.dll;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<data name="SafeExamBrowser_UserInterface_Mobile1" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\x86\SafeExamBrowser.UserInterface.Mobile.dll;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
</root>
|
@@ -94,15 +94,13 @@
|
||||
<None Include="Resources\x64\SafeExamBrowser.exe" />
|
||||
<None Include="Resources\x64\SafeExamBrowser.Monitoring.dll" />
|
||||
<None Include="Resources\x64\SafeExamBrowser.UserInterface.Desktop.dll" />
|
||||
<None Include="Resources\x64\SafeExamBrowser.UserInterface.Shared.dll" />
|
||||
<None Include="Resources\x64\SafeExamBrowser.WindowsApi.dll" />
|
||||
<None Include="Resources\x86\SafeExamBrowser.Client.exe" />
|
||||
<None Include="Resources\x86\SafeExamBrowser.Configuration.dll" />
|
||||
<None Include="Resources\x86\SafeExamBrowser.exe" />
|
||||
<None Include="Resources\x86\SafeExamBrowser.Monitoring.dll" />
|
||||
<None Include="Resources\x86\SafeExamBrowser.UserInterface.Desktop.dll" />
|
||||
<None Include="Resources\x86\SafeExamBrowser.UserInterface.Shared.dll" />
|
||||
<None Include="Resources\x86\SafeExamBrowser.WindowsApi.dll" />
|
||||
<None Include="Resources\x64\SafeExamBrowser.UserInterface.Mobile.dll" />
|
||||
<None Include="Resources\x86\SafeExamBrowser.UserInterface.Mobile.dll" />
|
||||
<Content Include="SafeExamBrowser.ico" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
|
Reference in New Issue
Block a user