mirror of
https://github.com/mogzol/sharpii.git
synced 2024-11-13 06:05:05 +01:00
Updated to 1.2 - Added version patch support for IOS patching
- Switched to scooby74029's mod of libWiiSharp - Bug fixes
This commit is contained in:
parent
bb29106150
commit
54204f3c8e
@ -35,6 +35,7 @@ namespace Sharpii
|
||||
bool fs = false;
|
||||
bool es = false;
|
||||
bool np = false;
|
||||
bool vp = false;
|
||||
int slot = -1;
|
||||
int version = -1;
|
||||
|
||||
@ -59,6 +60,9 @@ namespace Sharpii
|
||||
case "-NP":
|
||||
np = true;
|
||||
break;
|
||||
case "-VP":
|
||||
vp = true;
|
||||
break;
|
||||
case "-SLOT":
|
||||
if (i + 1 >= args.Length)
|
||||
{
|
||||
@ -76,6 +80,23 @@ namespace Sharpii
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case "-S":
|
||||
if (i + 1 >= args.Length)
|
||||
{
|
||||
Console.WriteLine("ERROR: No slot set");
|
||||
return;
|
||||
}
|
||||
if (!int.TryParse(args[i + 1], out slot))
|
||||
{
|
||||
Console.WriteLine("Invalid slot {0}...", args[i + 1]);
|
||||
return;
|
||||
}
|
||||
if (slot < 3 || slot > 255)
|
||||
{
|
||||
Console.WriteLine("Invalid slot {0}...", slot);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case "-V":
|
||||
if (i + 1 >= args.Length)
|
||||
{
|
||||
@ -151,6 +172,13 @@ namespace Sharpii
|
||||
patcher.PatchNandPermissions();
|
||||
}
|
||||
|
||||
if (vp == true)
|
||||
{
|
||||
if (Quiet.quiet > 2)
|
||||
System.Console.WriteLine("Applying Version patch");
|
||||
patcher.PatchVP();
|
||||
}
|
||||
|
||||
if (slot > -1 || version > -1)
|
||||
ios.FakeSign = true;
|
||||
|
||||
@ -178,12 +206,18 @@ namespace Sharpii
|
||||
else
|
||||
{
|
||||
if (Quiet.quiet > 2)
|
||||
System.Console.WriteLine("Saving file");
|
||||
System.Console.Write("Saving file...");
|
||||
|
||||
if (output.Substring(output.Length - 4, 4).ToUpper() != ".WAD")
|
||||
output = output + ".wad";
|
||||
if (output != "")
|
||||
{
|
||||
if (output.Substring(output.Length - 4, 4).ToUpper() != ".WAD")
|
||||
output = output + ".wad";
|
||||
}
|
||||
|
||||
ios.Save(input);
|
||||
|
||||
if (Quiet.quiet > 2)
|
||||
System.Console.Write("Done!\n");
|
||||
}
|
||||
if (Quiet.quiet > 1)
|
||||
System.Console.WriteLine("Operation completed succesfully!");
|
||||
@ -204,22 +238,24 @@ namespace Sharpii
|
||||
{
|
||||
System.Console.WriteLine("");
|
||||
System.Console.WriteLine("Sharpii {0} - IOS - A tool by person66, using libWiiSharp.dll by leathl", Version.version);
|
||||
System.Console.WriteLine(" Code based off PatchIOS by leathl");
|
||||
System.Console.WriteLine(" Code based off PatchIOS by leathl");
|
||||
System.Console.WriteLine("");
|
||||
System.Console.WriteLine("");
|
||||
System.Console.WriteLine(" Usage:");
|
||||
System.Console.WriteLine("");
|
||||
System.Console.WriteLine(" Sharpii.exe IOS input [-o output] [-fs] [-es] [-np] [-s slot] [-v version]");
|
||||
System.Console.WriteLine(" Sharpii.exe IOS input [-o output] [-fs] [-es] [-np] [-vp] [-s slot]");
|
||||
System.Console.WriteLine(" [-v version]");
|
||||
System.Console.WriteLine("");
|
||||
System.Console.WriteLine("");
|
||||
System.Console.WriteLine(" Arguments:");
|
||||
System.Console.WriteLine("");
|
||||
System.Console.WriteLine(" input The input file/folder");
|
||||
System.Console.WriteLine(" -o output The output file/folder");
|
||||
System.Console.WriteLine(" input The input file");
|
||||
System.Console.WriteLine(" -o output The output file");
|
||||
System.Console.WriteLine(" -fs Patch Fakesigning");
|
||||
System.Console.WriteLine(" -es Patch ES_Identify");
|
||||
System.Console.WriteLine(" -np Patch NAND Permissions");
|
||||
System.Console.WriteLine(" -slot # Change IOS slot to #");
|
||||
System.Console.WriteLine(" -vp Add version patch");
|
||||
System.Console.WriteLine(" -s # Change IOS slot to #");
|
||||
System.Console.WriteLine(" -v # Change IOS version to #");
|
||||
}
|
||||
}
|
||||
|
@ -28,7 +28,13 @@ namespace Sharpii
|
||||
if (args.Length < 1)
|
||||
{
|
||||
help();
|
||||
return;
|
||||
Environment.Exit(0);
|
||||
}
|
||||
|
||||
if (!File.Exists("libWiiSharp.dll"))
|
||||
{
|
||||
System.Console.WriteLine("ERROR: libWiiSharp.dll not found");
|
||||
Environment.Exit(0);
|
||||
}
|
||||
|
||||
for (int i = 1; i < args.Length; i++)
|
||||
@ -149,5 +155,5 @@ namespace Sharpii
|
||||
}
|
||||
public class Version
|
||||
{
|
||||
public static string version = "1.1";
|
||||
public static string version = "1.2";
|
||||
}
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user