still working on automatic mode
|
@ -2,7 +2,7 @@
|
|||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="clr-namespace:h_encore_auto"
|
||||
StartupUri="MainWindow.xaml">
|
||||
StartupUri="AutoMode.xaml">
|
||||
<Application.Resources>
|
||||
|
||||
</Application.Resources>
|
||||
|
|
|
@ -5,9 +5,16 @@
|
|||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:local="clr-namespace:h_encore_auto"
|
||||
mc:Ignorable="d"
|
||||
Title="AutoMode" Height="512" Width="512" ResizeMode="CanMinimize" Closed="Window_Closed">
|
||||
<Grid>
|
||||
<Button x:Name="buttonStart" Content="Start!" Margin="120,109,0,0" Width="266" Height="265" HorizontalAlignment="Left" VerticalAlignment="Top" FontSize="72" FontFamily="Lato" Click="buttonStart_Click"/>
|
||||
Title="ZUGABE" Height="175.807" Width="512" ResizeMode="CanMinimize" WindowStyle="None">
|
||||
<Grid MouseDown="Grid_MouseDown">
|
||||
<Rectangle Fill="#FFF3F3F3" Stroke="Black"/>
|
||||
|
||||
<Rectangle Fill="#FF407FD8" Height="46" Stroke="Black" VerticalAlignment="Top"/>
|
||||
|
||||
<Button x:Name="buttonStart" Content="Start!" Margin="23,66,231,22" FontSize="72" FontFamily="Lato" Click="buttonStart_Click"/>
|
||||
<Button x:Name="buttonClose" Content="X" HorizontalAlignment="Right" Margin="0,7,8,0" VerticalAlignment="Top" Width="30" Height="30" FontSize="20" FontWeight="Bold" Click="buttonClose_Click" Background="#FFEC0909" Foreground="#FFF0F0F0"/>
|
||||
<Label Content="ZUGABE" HorizontalAlignment="Left" Margin="10,7,0,0" VerticalAlignment="Top" Height="30" Width="83" FontSize="18" FontWeight="Bold" Foreground="White"/>
|
||||
<ProgressBar x:Name="barWorking" HorizontalAlignment="Left" Height="88" Margin="310,66,0,0" VerticalAlignment="Top" Width="176" IsIndeterminate="True" Visibility="Collapsed"/>
|
||||
|
||||
</Grid>
|
||||
</Window>
|
||||
|
|
|
@ -13,6 +13,7 @@ using System.Windows.Input;
|
|||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Shapes;
|
||||
using System.Threading;
|
||||
|
||||
namespace h_encore_auto
|
||||
{
|
||||
|
@ -24,32 +25,30 @@ namespace h_encore_auto
|
|||
public AutoMode()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
string ProgramFilesx86 = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86);
|
||||
string ProgramFiles = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles);
|
||||
bool tempCreated = false;
|
||||
string longAID = null;
|
||||
string shortAID = null;
|
||||
string path7z = Ref.tempDir + "7za.exe";
|
||||
string pathPsvimg = Ref.tempDir + "psvimgtools.zip";
|
||||
string pathPkg = Ref.tempDir + "pkg2zip.zip";
|
||||
string pathEnc = Ref.tempDir + "h-encore.zip";
|
||||
string pathEntry = Ref.tempDir + "entryPoint.pkg";
|
||||
string pathQcma = Ref.tempDir + "qcma.zip";
|
||||
string pathQcmaExtracted = Ref.tempDir + "Qcma\\";
|
||||
string pathBackupReg = Ref.tempDir + "backup.reg";
|
||||
string pathImportReg = Ref.tempDir + "qcma.reg";
|
||||
string pathQcmaRes = Ref.tempDir + "QcmaRes\\";
|
||||
|
||||
private void Window_Closed(object sender, EventArgs e)
|
||||
if (File.Exists(Ref.tempDir + "keepfile"))
|
||||
{
|
||||
var newForm = new MainWindow();
|
||||
newForm.Visibility = Visibility.Visible;
|
||||
Ref.areFilesKept = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
Ref.areFilesKept = false;
|
||||
if (Directory.Exists(Ref.tempDir))
|
||||
Util.DeleteDirectory(Ref.tempDir);
|
||||
Directory.CreateDirectory(Ref.tempDir);
|
||||
}
|
||||
}
|
||||
|
||||
private void buttonStart_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
buttonStart.IsEnabled = false;
|
||||
barWorking.Visibility = Visibility.Visible;
|
||||
|
||||
new Thread(() =>
|
||||
{
|
||||
Thread.CurrentThread.IsBackground = true;
|
||||
/* run your code here */
|
||||
|
||||
Process[] pname = Process.GetProcessesByName("qcma");
|
||||
if (pname.Length != 0)
|
||||
{
|
||||
|
@ -85,31 +84,33 @@ namespace h_encore_auto
|
|||
Util.dlFile(Ref.urlQcma, "qcma.zip");
|
||||
Util.dlFile(Ref.urlReg, "qcma.reg");
|
||||
|
||||
string text = File.ReadAllText(pathImportReg);
|
||||
text = text.Replace("REPLACE", pathQcmaRes);
|
||||
File.WriteAllText(pathImportReg, text);
|
||||
string text = File.ReadAllText(Ref.pathImportReg);
|
||||
text = text.Replace("REPLACE", Ref.pathQcmaRes);
|
||||
File.WriteAllText(Ref.pathImportReg, text);
|
||||
text = text.Replace("\\", "/");
|
||||
File.WriteAllText(Ref.pathImportReg, text);
|
||||
|
||||
startInfo.Arguments = "/C " + path7z + " x " + pathPsvimg;
|
||||
startInfo.Arguments = "/C " + Ref.path7z + " x " + Ref.pathPsvimg;
|
||||
process.StartInfo = startInfo;
|
||||
process.Start();
|
||||
process.WaitForExit();
|
||||
|
||||
startInfo.Arguments = "/C " + path7z + " x " + pathPkg;
|
||||
startInfo.Arguments = "/C " + Ref.path7z + " x " + Ref.pathPkg;
|
||||
process.StartInfo = startInfo;
|
||||
process.Start();
|
||||
process.WaitForExit();
|
||||
|
||||
startInfo.Arguments = "/C " + path7z + " x " + pathEnc;
|
||||
startInfo.Arguments = "/C " + Ref.path7z + " x " + Ref.pathEnc;
|
||||
process.StartInfo = startInfo;
|
||||
process.Start();
|
||||
process.WaitForExit();
|
||||
|
||||
startInfo.Arguments = "/C " + path7z + " x " + pathQcma;
|
||||
startInfo.Arguments = "/C " + Ref.path7z + " x " + Ref.pathQcma;
|
||||
process.StartInfo = startInfo;
|
||||
process.Start();
|
||||
process.WaitForExit();
|
||||
|
||||
startInfo.Arguments = "/C " + Ref.tempDir + "pkg2zip.exe -x " + pathEntry;
|
||||
startInfo.Arguments = "/C " + Ref.tempDir + "pkg2zip.exe -x " + Ref.pathEntry;
|
||||
process.StartInfo = startInfo;
|
||||
process.Start();
|
||||
process.WaitForExit();
|
||||
|
@ -138,8 +139,6 @@ namespace h_encore_auto
|
|||
return;
|
||||
}
|
||||
|
||||
bool qcmaConfigFound = false;
|
||||
|
||||
startInfoOut.RedirectStandardOutput = true;
|
||||
startInfoOut.UseShellExecute = false;
|
||||
startInfoOut.Arguments = @"/C reg query HKEY_CURRENT_USER\Software\codestation\qcma & echo 0";
|
||||
|
@ -150,9 +149,9 @@ namespace h_encore_auto
|
|||
|
||||
if (stdout == "0")
|
||||
{
|
||||
qcmaConfigFound = false;
|
||||
Ref.isQcmaConfigFound = false;
|
||||
|
||||
startInfo.Arguments = @"/C reg import " + pathImportReg;
|
||||
startInfo.Arguments = @"/C reg import " + Ref.pathImportReg;
|
||||
process.StartInfo = startInfo;
|
||||
process.Start();
|
||||
process.WaitForExit();
|
||||
|
@ -160,29 +159,31 @@ namespace h_encore_auto
|
|||
|
||||
else
|
||||
{
|
||||
qcmaConfigFound = true;
|
||||
Ref.isQcmaConfigFound = true;
|
||||
|
||||
startInfo.Arguments = @"/C reg export HKEY_CURRENT_USER\Software\codestation\qcma " + pathBackupReg;
|
||||
startInfo.Arguments = @"/C reg export HKEY_CURRENT_USER\Software\codestation\qcma " + Ref.pathBackupReg;
|
||||
process.StartInfo = startInfo;
|
||||
process.Start();
|
||||
process.WaitForExit();
|
||||
|
||||
startInfo.Arguments = @" /C reg import " + pathImportReg;
|
||||
startInfo.Arguments = @" /C reg import " + Ref.pathImportReg;
|
||||
process.StartInfo = startInfo;
|
||||
process.Start();
|
||||
process.WaitForExit();
|
||||
}
|
||||
|
||||
startInfo.Arguments = @"/C " + pathQcmaExtracted + "qcma.exe";
|
||||
Ref.isRegModified = true;
|
||||
|
||||
startInfo.Arguments = @"/C " + Ref.pathQcmaExtracted + "qcma.exe";
|
||||
process.StartInfo = startInfo;
|
||||
process.Start();
|
||||
|
||||
var guide = new VitaGuide();
|
||||
for (; ; )
|
||||
{
|
||||
var guide = new VitaGuide();
|
||||
guide.ShowDialog();
|
||||
|
||||
if (Util.IsDirectoryEmpty(pathQcmaRes + "PSVita\\APP\\"))
|
||||
if (Util.IsDirectoryEmpty(Ref.pathQcmaRes + "PSVita\\APP\\"))
|
||||
{
|
||||
MessageBox.Show("Required folder not found. \nMake sure you did everything correctly and follow the steps again.");
|
||||
}
|
||||
|
@ -192,9 +193,56 @@ namespace h_encore_auto
|
|||
}
|
||||
}
|
||||
|
||||
shortAID = Directory.GetDirectories(pathQcmaRes + "PSVita\\APP\\")[0];
|
||||
Ref.shortAID = Directory.GetDirectories(Ref.pathQcmaRes + "PSVita\\APP\\")[0];
|
||||
|
||||
Ref.longAID = Util.GetEncKey(Ref.shortAID);
|
||||
|
||||
startInfo.WorkingDirectory = Ref.tempDir + "h-encore";
|
||||
|
||||
startInfo.Arguments = @"/C ..\psvimg-create -n app -K " + Ref.longAID + " PCSG90096/app";
|
||||
process.StartInfo = startInfo;
|
||||
process.Start();
|
||||
process.WaitForExit();
|
||||
|
||||
startInfo.Arguments = @"/C ..\psvimg-create -n appmeta -K " + Ref.longAID + " PCSG90096/appmeta";
|
||||
process.StartInfo = startInfo;
|
||||
process.Start();
|
||||
process.WaitForExit();
|
||||
|
||||
startInfo.Arguments = @"/C ..\psvimg-create -n license -K " + Ref.longAID + " PCSG90096/license";
|
||||
process.StartInfo = startInfo;
|
||||
process.Start();
|
||||
process.WaitForExit();
|
||||
|
||||
startInfo.Arguments = @"/C ..\psvimg-create -n savedata -K " + Ref.longAID + " PCSG90096/savedata";
|
||||
process.StartInfo = startInfo;
|
||||
process.Start();
|
||||
process.WaitForExit();
|
||||
|
||||
startInfo.Arguments = "/C xcopy /E /Y /I " + Ref.tempDir + @"h-encore\PCSG90096\ " + Ref.pathQcmaRes + "PSVita\\" + Ref.shortAID + "\\PCSG90096\\";
|
||||
process.StartInfo = startInfo;
|
||||
process.Start();
|
||||
process.WaitForExit();
|
||||
|
||||
Ref.isSecondGuide = true;
|
||||
guide.ShowDialog();
|
||||
|
||||
MessageBox.Show("If not already done, wait until your Vita has copied over the exploit, then press OK.");
|
||||
|
||||
Util.Cleanup();
|
||||
|
||||
}).Start();
|
||||
}
|
||||
|
||||
private void Grid_MouseDown(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
DragMove();
|
||||
}
|
||||
|
||||
private void buttonClose_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
|
||||
Util.Cleanup();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,33 +0,0 @@
|
|||
<Window x:Class="h_encore_auto.MainWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:local="clr-namespace:h_encore_auto"
|
||||
mc:Ignorable="d"
|
||||
Title="ZUGABE" Width="789.733" Height="403.621" ResizeMode="CanMinimize" Closed="Window_Closed">
|
||||
<Grid>
|
||||
<TextBox x:Name="boxPath7z" Margin="10,50,213,0" TextWrapping="Wrap" Height="20" VerticalAlignment="Top"/>
|
||||
<Button x:Name="button7zFile" Content="Local File" Margin="687,50,20,0" Click="button7zFile_Click" Height="20" VerticalAlignment="Top"/>
|
||||
<Label Content="7za.exe:" HorizontalAlignment="Left" Margin="10,19,0,0" VerticalAlignment="Top"/>
|
||||
<Label Content="psvimgtools.zip:" HorizontalAlignment="Left" Margin="10,75,0,0" VerticalAlignment="Top" Height="26"/>
|
||||
<TextBox x:Name="boxPathPsvimg" Margin="10,106,213,0" TextWrapping="Wrap" Height="20" VerticalAlignment="Top"/>
|
||||
<Button x:Name="buttonPsvimgDL" Content="Download" Margin="593,106,114,0" Click="buttonPsvimgDL_Click" Height="20" VerticalAlignment="Top"/>
|
||||
<Button x:Name="buttonPsvimgFile" Content="Local File" Margin="687,106,20,0" Click="buttonPsvimgFile_Click" Height="20" VerticalAlignment="Top"/>
|
||||
<Label Content="pkg2zip.zip:" HorizontalAlignment="Left" Margin="10,131,0,0" VerticalAlignment="Top"/>
|
||||
<TextBox x:Name="boxPathPkg" Margin="10,162,213,0" TextWrapping="Wrap" Height="20" VerticalAlignment="Top"/>
|
||||
<Button x:Name="buttonPkgDL" Content="Download" Margin="593,162,114,0" Click="buttonPkgDL_Click" Height="20" VerticalAlignment="Top"/>
|
||||
<Button x:Name="buttonPkgFile" Content="Local File" Margin="687,162,20,0" Click="buttonPkgFile_Click" Height="20" VerticalAlignment="Top"/>
|
||||
<Label Content="h-encore.zip:" HorizontalAlignment="Left" Margin="10,187,0,0" VerticalAlignment="Top"/>
|
||||
<TextBox x:Name="boxPathEnc" Margin="10,218,213,0" TextWrapping="Wrap" Height="20" VerticalAlignment="Top"/>
|
||||
<Button x:Name="buttonEncDL" Content="Download" Margin="593,218,114,0" Click="buttonEncDL_Click" Height="20" VerticalAlignment="Top"/>
|
||||
<Button x:Name="buttonEncFile" Content="Local File" Margin="687,218,20,0" Click="buttonEncFile_Click" Height="20" VerticalAlignment="Top"/>
|
||||
<Label Content="Bitter Smile pkg:" HorizontalAlignment="Left" Margin="10,243,0,0" VerticalAlignment="Top"/>
|
||||
<TextBox x:Name="boxPathEntry" Margin="10,269,213,0" TextWrapping="Wrap" Height="20" VerticalAlignment="Top"/>
|
||||
<Button x:Name="buttonEntryDL" Content="Download" Margin="593,269,114,0" Click="buttonEntryDL_Click" Height="20" VerticalAlignment="Top"/>
|
||||
<Button x:Name="buttonEntryFile" Content="Local File" Margin="687,269,20,0" Click="buttonEntryFile_Click" Height="20" VerticalAlignment="Top"/>
|
||||
<Button x:Name="buttonZipDL" Content="Download" Margin="593,50,114,0" Click="buttonZipDL_Click" Height="20" VerticalAlignment="Top"/>
|
||||
<Button x:Name="buttonGo" Content="Go!" Margin="406,313,20,0" Click="buttonGo_Click" Height="38" VerticalAlignment="Top"/>
|
||||
<Button x:Name="buttonAuto" Content="Automatic Mode (BETA)" HorizontalAlignment="Left" Margin="13,313,0,0" VerticalAlignment="Top" Width="178" Height="38" FontFamily="Source Code Pro Black" Click="buttonAuto_Click"/>
|
||||
</Grid>
|
||||
</Window>
|
|
@ -1,343 +0,0 @@
|
|||
using System.Windows;
|
||||
using System.Net;
|
||||
using System.IO;
|
||||
using System.Threading;
|
||||
using System.ComponentModel;
|
||||
using System;
|
||||
using System.Windows.Threading;
|
||||
using System.Diagnostics;
|
||||
using Essy.Tools.InputBox;
|
||||
using Microsoft.Win32;
|
||||
|
||||
namespace h_encore_auto
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for MainWindow.xaml
|
||||
/// </summary>
|
||||
public partial class MainWindow : Window
|
||||
{
|
||||
public MainWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
if (Directory.Exists(Ref.tempDir))
|
||||
{
|
||||
Util.DeleteDirectory(Ref.tempDir);
|
||||
}
|
||||
|
||||
createTemp();
|
||||
}
|
||||
|
||||
public void createTemp()
|
||||
{
|
||||
if (tempCreated == false)
|
||||
{
|
||||
Directory.CreateDirectory(Ref.tempDir);
|
||||
tempCreated = true;
|
||||
}
|
||||
}
|
||||
|
||||
string ProgramFilesx86 = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86);
|
||||
string ProgramFiles = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles);
|
||||
bool tempCreated = false;
|
||||
string longAID = null;
|
||||
string shortAID = null;
|
||||
|
||||
private void buttonGo_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (boxPath7z.Text == "")
|
||||
{
|
||||
MessageBox.Show("A path missing!");
|
||||
}
|
||||
else if (boxPathEntry.Text == "")
|
||||
{
|
||||
MessageBox.Show("A path missing!");
|
||||
}
|
||||
else if (boxPathEnc.Text == "")
|
||||
{
|
||||
MessageBox.Show("A path missing!");
|
||||
}
|
||||
else if (boxPathPkg.Text == "")
|
||||
{
|
||||
MessageBox.Show("A path missing!");
|
||||
}
|
||||
else if (boxPathPsvimg.Text == "")
|
||||
{
|
||||
MessageBox.Show("A path missing!");
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show("This will probably take some time. Sit back and wait for further message boxes.");
|
||||
|
||||
Process process = new Process();
|
||||
ProcessStartInfo startInfo = new ProcessStartInfo();
|
||||
startInfo.WindowStyle = ProcessWindowStyle.Hidden;
|
||||
startInfo.FileName = "cmd.exe";
|
||||
startInfo.WorkingDirectory = Ref.tempDir;
|
||||
|
||||
startInfo.Arguments = "/C " + boxPath7z.Text + " x " + boxPathPsvimg.Text;
|
||||
process.StartInfo = startInfo;
|
||||
process.Start();
|
||||
process.WaitForExit();
|
||||
|
||||
startInfo.Arguments = "/C " + boxPath7z.Text + " x " + boxPathPkg.Text;
|
||||
process.StartInfo = startInfo;
|
||||
process.Start();
|
||||
process.WaitForExit();
|
||||
|
||||
startInfo.Arguments = "/C " + boxPath7z.Text + " x " + boxPathEnc.Text;
|
||||
process.StartInfo = startInfo;
|
||||
process.Start();
|
||||
process.WaitForExit();
|
||||
|
||||
startInfo.Arguments = "/C " + Ref.tempDir + "pkg2zip.exe" + " -x " + boxPathEntry.Text;
|
||||
process.StartInfo = startInfo;
|
||||
process.Start();
|
||||
process.WaitForExit();
|
||||
|
||||
startInfo.Arguments = "/C xcopy /E /Y /I " + Ref.tempDir + @"app\PCSG90096\ " + Ref.tempDir + @"h-encore\app\ux0_temp_game_PCSG90096_app_PCSG90096\";
|
||||
process.StartInfo = startInfo;
|
||||
process.Start();
|
||||
process.WaitForExit();
|
||||
|
||||
startInfo.Arguments = "/C xcopy /E /Y /I " + Ref.tempDir + @"app\PCSG90096\sce_sys\package\temp.bin " + Ref.tempDir + @"h-encore\license\ux0_temp_game_PCSG90096_license_app_PCSG90096\6488b73b912a753a492e2714e9b38bc7.rif*";
|
||||
process.StartInfo = startInfo;
|
||||
process.Start();
|
||||
process.WaitForExit();
|
||||
|
||||
try
|
||||
{
|
||||
string path = Ref.tempDir + "app\\PCSG90096\\resource\\";
|
||||
foreach (string k in Ref.trims)
|
||||
{
|
||||
Util.DeleteDirectory(path + k);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show("Unexpected Exception: " + ex.Message);
|
||||
return;
|
||||
}
|
||||
|
||||
for (; ; )
|
||||
{
|
||||
Process[] pname = Process.GetProcessesByName("qcma");
|
||||
if (pname.Length == 0)
|
||||
{
|
||||
if (MessageBox.Show("QCMA not detected. Please start it now. Download it?", "QCMA error", MessageBoxButton.YesNo) == MessageBoxResult.Yes)
|
||||
{
|
||||
Process.Start("https://codestation.github.io/qcma/");
|
||||
MessageBox.Show("Retrying...");
|
||||
}
|
||||
else
|
||||
MessageBox.Show("Retrying...");
|
||||
}
|
||||
else
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
for (; ; )
|
||||
{
|
||||
MessageBox.Show("In the QCMA settings, set the option \"Use this version for updates\" to \"FW 0.00 (Always up-to-date)\".");
|
||||
MessageBox.Show("Launch Content Manager on your PS Vita and connect it to your computer, where you then need to select PC -> PS Vita System.\nAfter that you select Applications. If you see an error message about System Software, you should simply reboot your device to solve it\n(if this doesn't solve, then put your device into airplane mode and reboot).");
|
||||
if (Directory.Exists(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + @"\PS Vita\"))
|
||||
{
|
||||
MessageBox.Show("A folder will open, which should now contain another folder named with 16 characters of jumbled letters and numbers.\nCopy this folder name and insert it in the next step.");
|
||||
Process.Start(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + @"\PS Vita\APP\");
|
||||
shortAID = InputBox.ShowInputBox("Enter the 16-character folder name.");
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show("A folder named after your Account ID was created inside your \"PS Vita\\APP\\\"\nUse the settings of QCMA to find it.\nCopy the folder name and insert it in the next step.");
|
||||
shortAID = InputBox.ShowInputBox("Enter the 16-character folder name.");
|
||||
}
|
||||
if (MessageBox.Show("Press yes to continue, no to redo the last step.", "Continue?", MessageBoxButton.YesNo) == MessageBoxResult.Yes)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
longAID = Util.GetEncKey(shortAID);
|
||||
|
||||
startInfo.WorkingDirectory = Ref.tempDir + "h-encore";
|
||||
|
||||
startInfo.Arguments = @"/C ..\psvimg-create -n app -K " + longAID + " PCSG90096/app";
|
||||
process.StartInfo = startInfo;
|
||||
process.Start();
|
||||
process.WaitForExit();
|
||||
|
||||
startInfo.Arguments = @"/C ..\psvimg-create -n appmeta -K " + longAID + " PCSG90096/appmeta";
|
||||
process.StartInfo = startInfo;
|
||||
process.Start();
|
||||
process.WaitForExit();
|
||||
|
||||
startInfo.Arguments = @"/C ..\psvimg-create -n license -K " + longAID + " PCSG90096/license";
|
||||
process.StartInfo = startInfo;
|
||||
process.Start();
|
||||
process.WaitForExit();
|
||||
|
||||
startInfo.Arguments = @"/C ..\psvimg-create -n savedata -K " + longAID + " PCSG90096/savedata";
|
||||
process.StartInfo = startInfo;
|
||||
process.Start();
|
||||
process.WaitForExit();
|
||||
|
||||
if (Directory.Exists(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + @"\PS Vita\"))
|
||||
{
|
||||
MessageBox.Show("Two folders will now open.\nCopy the contained folder called \"PCSG90096\" to the \"PS Vita/APP/xxxxxxxxxxxxxxxx/\" folder.\nThen refresh the databse of QCMA by right-clicking the icon and selecting it.");
|
||||
Process.Start(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + @"\PS Vita\APP\");
|
||||
Process.Start(Ref.tempDir + @"h-encore\");
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show("A folder will now open.\nCopy the contained folder called \"PCSG90096\" to your \"PS Vita/APP/xxxxxxxxxxxxxxxx/\" folder.\nThen refresh the databse of QCMA by right-clicking the icon and selecting it.");
|
||||
Process.Start(Ref.tempDir + @"h-encore\");
|
||||
}
|
||||
MessageBox.Show("Ready? Have you copied the folder and refreshed the database?");
|
||||
MessageBox.Show("Now copy h-encore to your Vita using the content manager.");
|
||||
MessageBox.Show("Launch h-encore to exploit your device (if a message about trophies appears, simply click yes). \nThe screen should first flash white, then purple, and finally\nopen a menu called h-encore bootstrap menu where you can download VitaShell and install HENkaku.");
|
||||
if (MessageBox.Show("For more info and how to remove the trophy warning please visit TheFlow's official page for the exploit.", "Info", MessageBoxButton.YesNo) == MessageBoxResult.Yes)
|
||||
{
|
||||
Process.Start("https://codestation.github.io/qcma/");
|
||||
}
|
||||
|
||||
Util.cleanup();
|
||||
}
|
||||
}
|
||||
|
||||
private void buttonZipDL_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
Util.dlFile(Ref.url7zr, "7zr.exe");
|
||||
Util.dlFile(Ref.url7za, "7z-extra.7z");
|
||||
|
||||
Process process = new Process();
|
||||
ProcessStartInfo startInfo = new ProcessStartInfo();
|
||||
startInfo.WindowStyle = ProcessWindowStyle.Hidden;
|
||||
startInfo.FileName = "cmd.exe";
|
||||
startInfo.WorkingDirectory = Ref.tempDir;
|
||||
|
||||
startInfo.Arguments = "/C 7zr.exe x 7z-extra.7z";
|
||||
process.StartInfo = startInfo;
|
||||
process.Start();
|
||||
process.WaitForExit();
|
||||
|
||||
boxPath7z.Text = Ref.tempDir + "7za.exe";
|
||||
}
|
||||
|
||||
private void buttonPsvimgDL_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
Util.dlFile(Ref.urlPsvimg, "psvimgtools.zip");
|
||||
|
||||
boxPathPsvimg.Text = Ref.tempDir + "psvimgtools.zip";
|
||||
}
|
||||
|
||||
private void buttonPkgDL_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
Util.dlFile(Ref.urlPkg, "pkg2zip.zip");
|
||||
|
||||
boxPathPkg.Text = Ref.tempDir + "pkg2zip.zip";
|
||||
}
|
||||
|
||||
private void buttonEncDL_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
Util.dlFile(Ref.urlEnc, "h-encore.zip");
|
||||
|
||||
boxPathEnc.Text = Ref.tempDir + "h-encore.zip";
|
||||
}
|
||||
|
||||
private void buttonEntryDL_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
MessageBox.Show("This will take a while, please be patient.");
|
||||
|
||||
Util.dlFile(Ref.urlEntry, "entryPoint.pkg");
|
||||
|
||||
boxPathEntry.Text = Ref.tempDir + "entryPoint.pkg";
|
||||
}
|
||||
|
||||
private void button7zFile_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
OpenFileDialog dlg = new OpenFileDialog();
|
||||
dlg.DefaultExt = ".exe";
|
||||
dlg.Filter = "Executables (.exe)|*.exe";
|
||||
|
||||
bool? result = dlg.ShowDialog();
|
||||
|
||||
if (result == true)
|
||||
{
|
||||
string path = dlg.FileName;
|
||||
boxPath7z.Text = path;
|
||||
}
|
||||
}
|
||||
|
||||
private void buttonPsvimgFile_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
OpenFileDialog dlg = new OpenFileDialog();
|
||||
dlg.DefaultExt = ".zip";
|
||||
dlg.Filter = "ZIP Archives (.zip)|*.zip";
|
||||
|
||||
bool? result = dlg.ShowDialog();
|
||||
|
||||
if (result == true)
|
||||
{
|
||||
string path = dlg.FileName;
|
||||
boxPathPsvimg.Text = path;
|
||||
}
|
||||
}
|
||||
|
||||
private void buttonPkgFile_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
OpenFileDialog dlg = new OpenFileDialog();
|
||||
dlg.DefaultExt = ".zip";
|
||||
dlg.Filter = "ZIP Archives (.zip)|*.zip";
|
||||
|
||||
bool? result = dlg.ShowDialog();
|
||||
|
||||
if (result == true)
|
||||
{
|
||||
string path = dlg.FileName;
|
||||
boxPathPkg.Text = path;
|
||||
}
|
||||
}
|
||||
|
||||
private void buttonEncFile_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
OpenFileDialog dlg = new OpenFileDialog();
|
||||
dlg.DefaultExt = ".zip";
|
||||
dlg.Filter = "ZIP Archives (.zip)|*.zip";
|
||||
|
||||
bool? result = dlg.ShowDialog();
|
||||
|
||||
if (result == true)
|
||||
{
|
||||
string path = dlg.FileName;
|
||||
boxPathEnc.Text = path;
|
||||
}
|
||||
}
|
||||
private void buttonEntryFile_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
OpenFileDialog dlg = new OpenFileDialog();
|
||||
dlg.DefaultExt = ".zip";
|
||||
dlg.Filter = "PSVita PKG Archives (.pkg)|*.pkg";
|
||||
|
||||
bool? result = dlg.ShowDialog();
|
||||
|
||||
if (result == true)
|
||||
{
|
||||
string path = dlg.FileName;
|
||||
boxPathEntry.Text = path;
|
||||
}
|
||||
}
|
||||
|
||||
private void buttonAuto_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var newForm = new AutoMode();
|
||||
newForm.Show();
|
||||
this.Visibility = Visibility.Collapsed;
|
||||
}
|
||||
|
||||
private void Window_Closed(object sender, EventArgs e)
|
||||
{
|
||||
Util.cleanup();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -5,6 +5,8 @@ using System.IO;
|
|||
using System.Windows.Markup;
|
||||
using System.Windows;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Globalization;
|
||||
|
||||
namespace h_encore_auto
|
||||
{
|
||||
|
@ -23,7 +25,7 @@ namespace h_encore_auto
|
|||
}
|
||||
catch (Exception)
|
||||
{
|
||||
MessageBox.Show("Failed to get the CMA encryption key. Make sure your internet is connected and/or retry.");
|
||||
MessageBox.Show("Failed to get the CMA encryption key. Make sure your internet is connected and retry.");
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
@ -56,10 +58,49 @@ namespace h_encore_auto
|
|||
client.DownloadFile(url, Ref.tempDir + filename);
|
||||
}
|
||||
}
|
||||
public static void cleanup()
|
||||
public static void Cleanup()
|
||||
{
|
||||
Util.DeleteDirectory(Ref.tempDir);
|
||||
System.Environment.Exit(0);
|
||||
Process[] pname = Process.GetProcessesByName("qcma");
|
||||
if (pname.Length != 0)
|
||||
{
|
||||
foreach (var proc in pname)
|
||||
{
|
||||
proc.Kill();
|
||||
}
|
||||
}
|
||||
|
||||
Process process = new Process();
|
||||
ProcessStartInfo startInfo = new ProcessStartInfo();
|
||||
ProcessStartInfo startInfoOut = new ProcessStartInfo();
|
||||
startInfo.WindowStyle = ProcessWindowStyle.Hidden;
|
||||
startInfo.FileName = "cmd.exe";
|
||||
startInfo.WorkingDirectory = Ref.tempDir;
|
||||
|
||||
if (Ref.isRegModified == true)
|
||||
{
|
||||
startInfo.Arguments = @"/C reg delete HKEY_CURRENT_USER\Software\codestation\qcma /f";
|
||||
process.StartInfo = startInfo;
|
||||
process.Start();
|
||||
process.WaitForExit();
|
||||
}
|
||||
|
||||
if (Ref.isQcmaConfigFound == true)
|
||||
{
|
||||
startInfo.Arguments = @"/C reg import " + Ref.pathBackupReg;
|
||||
process.StartInfo = startInfo;
|
||||
process.Start();
|
||||
process.WaitForExit();
|
||||
}
|
||||
|
||||
if (Directory.Exists(Ref.tempDir))
|
||||
{
|
||||
if (MessageBox.Show("Do you want to keep the downloaded files for future use?\nPressing no will wipe any leftover files of this application off your computer.", "Keep Files?", MessageBoxButton.YesNo) == MessageBoxResult.Yes)
|
||||
File.Create(Ref.tempDir + "keepfile");
|
||||
else
|
||||
DeleteDirectory(Ref.tempDir);
|
||||
}
|
||||
|
||||
Environment.Exit(0);
|
||||
}
|
||||
public static bool IsDirectoryEmpty(string path)
|
||||
{
|
||||
|
@ -69,5 +110,12 @@ namespace h_encore_auto
|
|||
return !en.MoveNext();
|
||||
}
|
||||
}
|
||||
|
||||
public static string GetLang()
|
||||
{
|
||||
CultureInfo ci = CultureInfo.InstalledUICulture;
|
||||
|
||||
return ci.TwoLetterISOLanguageName;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -5,13 +5,13 @@
|
|||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:local="clr-namespace:h_encore_auto"
|
||||
mc:Ignorable="d"
|
||||
Title="VitaGuide" Height="450" Width="920.633" ResizeMode="CanMinimize">
|
||||
Title="VitaGuide" Height="477.108" Width="920.633" ResizeMode="CanMinimize">
|
||||
<Grid>
|
||||
<Image x:Name="imgFrame" Height="355" Margin="10,10,0,0" VerticalAlignment="Top" HorizontalAlignment="Left" Width="626"/>
|
||||
<TextBlock HorizontalAlignment="Left" Margin="641,165,0,0" TextWrapping="Wrap" Text="On your Vita, open the Content Manager." VerticalAlignment="Top" Height="64" Width="264" FontSize="22"/>
|
||||
<Button x:Name="buttonFwd" Content=">" Margin="482,361,0,0" VerticalAlignment="Top" Height="50" FontSize="36" Click="buttonFwd_Click" HorizontalAlignment="Left" Width="50"/>
|
||||
<Button x:Name="buttonBck" Content="<" Margin="383,361,0,0" VerticalAlignment="Top" Height="50" FontSize="36" HorizontalAlignment="Left" Width="50" Click="buttonBck_Click" IsEnabled="False"/>
|
||||
<Button x:Name="buttonDone" Content="Done" HorizontalAlignment="Left" Margin="802,361,0,0" VerticalAlignment="Top" Width="103" Height="50" FontSize="24" IsCancel="True" IsDefault="True"/>
|
||||
<TextBlock x:Name="textField" HorizontalAlignment="Left" Margin="641,10,0,0" TextWrapping="Wrap" Width="264" FontSize="22" Height="355" VerticalAlignment="Top"/>
|
||||
<Button x:Name="buttonFwd" Content=">" Margin="482,378,0,0" VerticalAlignment="Top" Height="50" FontSize="36" Click="buttonFwd_Click" HorizontalAlignment="Left" Width="50"/>
|
||||
<Button x:Name="buttonBck" Content="<" Margin="383,378,0,0" VerticalAlignment="Top" Height="50" FontSize="36" HorizontalAlignment="Left" Width="50" Click="buttonBck_Click" IsEnabled="False"/>
|
||||
<Button x:Name="buttonDone" Content="Done" HorizontalAlignment="Left" Margin="802,378,0,0" VerticalAlignment="Top" Width="103" Height="50" FontSize="24" IsCancel="True" IsDefault="True"/>
|
||||
|
||||
</Grid>
|
||||
</Window>
|
||||
|
|
|
@ -21,11 +21,19 @@ namespace h_encore_auto
|
|||
{
|
||||
int currImg = 1;
|
||||
|
||||
string[] currText = lang.GuideText(Util.GetLang());
|
||||
|
||||
public VitaGuide()
|
||||
{
|
||||
InitializeComponent();
|
||||
imgFrame.Source = new BitmapImage(new Uri("/img/1.png", UriKind.Relative));
|
||||
currImg = 1;
|
||||
|
||||
if (Ref.isSecondGuide == true)
|
||||
{
|
||||
currImg = 101;
|
||||
}
|
||||
|
||||
imgFrame.Source = new BitmapImage(new Uri("/img/" + currImg + ".png", UriKind.Relative));
|
||||
textField.Text = currText[currImg];
|
||||
buttonDone.Visibility = Visibility.Hidden;
|
||||
}
|
||||
|
||||
|
@ -33,9 +41,10 @@ namespace h_encore_auto
|
|||
{
|
||||
currImg++;
|
||||
imgFrame.Source = new BitmapImage(new Uri("/img/" + currImg + ".png", UriKind.Relative));
|
||||
textField.Text = currText[currImg];
|
||||
buttonBck.IsEnabled = true;
|
||||
|
||||
if (currImg == 14)
|
||||
if (currImg == 14 || currImg == 25)
|
||||
{
|
||||
buttonFwd.IsEnabled = false;
|
||||
buttonDone.Visibility = Visibility.Visible;
|
||||
|
@ -51,8 +60,9 @@ namespace h_encore_auto
|
|||
currImg--;
|
||||
imgFrame.Source = new BitmapImage(new Uri("/img/" + currImg + ".png", UriKind.Relative));
|
||||
buttonFwd.IsEnabled = true;
|
||||
textField.Text = currText[currImg];
|
||||
|
||||
if (currImg == 1)
|
||||
if (currImg == 1 || currImg == 15)
|
||||
{
|
||||
buttonBck.IsEnabled = false;
|
||||
}
|
||||
|
|
|
@ -82,6 +82,7 @@
|
|||
<Compile Include="AutoMode.xaml.cs">
|
||||
<DependentUpon>AutoMode.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="lang.cs" />
|
||||
<Compile Include="Ref.cs" />
|
||||
<Compile Include="Util.cs" />
|
||||
<Compile Include="VitaGuide.xaml.cs">
|
||||
|
@ -91,18 +92,10 @@
|
|||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="MainWindow.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Compile Include="App.xaml.cs">
|
||||
<DependentUpon>App.xaml</DependentUpon>
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="MainWindow.xaml.cs">
|
||||
<DependentUpon>MainWindow.xaml</DependentUpon>
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Page Include="VitaGuide.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
|
@ -145,7 +138,13 @@
|
|||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<ItemGroup>
|
||||
<Resource Include="img\15.png" />
|
||||
<Resource Include="img\16.png" />
|
||||
<Resource Include="img\17.png" />
|
||||
<Resource Include="img\18.png" />
|
||||
<Resource Include="img\19.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="img\1.png" />
|
||||
<Resource Include="img\11.png" />
|
||||
|
@ -162,6 +161,9 @@
|
|||
<Resource Include="img\9.PNG" />
|
||||
<Resource Include="img\10.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="img\ajax-loader.gif" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
|
|
BIN
h-encore-auto/img/15.png
Normal file
After Width: | Height: | Size: 358 KiB |
BIN
h-encore-auto/img/16.png
Normal file
After Width: | Height: | Size: 71 KiB |
BIN
h-encore-auto/img/17.png
Normal file
After Width: | Height: | Size: 25 KiB |
BIN
h-encore-auto/img/18.png
Normal file
After Width: | Height: | Size: 85 KiB |
BIN
h-encore-auto/img/19.png
Normal file
After Width: | Height: | Size: 92 KiB |
Before Width: | Height: | Size: 9.8 KiB After Width: | Height: | Size: 9.6 KiB |
BIN
h-encore-auto/img/ajax-loader.gif
Normal file
After Width: | Height: | Size: 3.1 KiB |
47
h-encore-auto/lang.cs
Normal file
|
@ -0,0 +1,47 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace h_encore_auto
|
||||
{
|
||||
class lang
|
||||
{
|
||||
public static string[] GuideText(string lang)
|
||||
{
|
||||
if (lang == "en")
|
||||
return guideEN;
|
||||
else
|
||||
return guideEN;
|
||||
}
|
||||
|
||||
private static readonly string[] guideEN= new string[] {
|
||||
"1. On your Vita, open the Content Manager. Make sure your Vita and PC are in the same Network!",
|
||||
"2. Select \"Copy Content\"",
|
||||
"3. If it tries to connect, cancel it.",
|
||||
"4. Select \"PC\"",
|
||||
"5. Select \"Wi-Fi\"",
|
||||
"6. Select \"Register Device\"",
|
||||
"7. Your Computer should show up. Select it.",
|
||||
"8. Enter the code shown or your computer.",
|
||||
"8. Enter the code shown or your computer.",
|
||||
"8. Enter the code shown or your computer.",
|
||||
"9. It should tell you that the device was registered successfully.",
|
||||
"10. After clicking next, please wait.",
|
||||
"11. Select \"PC -> PS Vita System\"",
|
||||
"12. Select \"Applications\"",
|
||||
"1. On your Vita, open the Content Manager. Make sure your Vita and PC are in the same Network!",
|
||||
"2. Select \"Copy Content\"",
|
||||
"3. Wait for it to connect.",
|
||||
"4. Select \"PC -> PS Vita System\"",
|
||||
"5. Select \"Applications\"",
|
||||
"6",
|
||||
"7",
|
||||
"8",
|
||||
"9",
|
||||
"10",
|
||||
"Done. Keep in mind that you have to launch h-encore every time you reboot the Vita. \nWhen launched, just press Exit again. This reapplies the exploit."
|
||||
};
|
||||
}
|
||||
}
|
|
@ -1,4 +1,5 @@
|
|||
using System.IO;
|
||||
using System;
|
||||
using System.IO;
|
||||
|
||||
namespace h_encore_auto
|
||||
{
|
||||
|
@ -31,5 +32,27 @@ namespace h_encore_auto
|
|||
"sound\\voice\\",
|
||||
"text\\01\\"
|
||||
};
|
||||
|
||||
public static bool isSecondGuide = false;
|
||||
|
||||
public static bool isQcmaConfigFound = false;
|
||||
|
||||
public static readonly string ProgramFilesx86 = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86);
|
||||
public static readonly string ProgramFiles = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles);
|
||||
public static string longAID = null;
|
||||
public static string shortAID = null;
|
||||
public static readonly string path7z = tempDir + "7za.exe";
|
||||
public static readonly string pathPsvimg = tempDir + "psvimgtools.zip";
|
||||
public static readonly string pathPkg = tempDir + "pkg2zip.zip";
|
||||
public static readonly string pathEnc = tempDir + "h-encore.zip";
|
||||
public static readonly string pathEntry = tempDir + "entryPoint.pkg";
|
||||
public static readonly string pathQcma = tempDir + "qcma.zip";
|
||||
public static readonly string pathQcmaExtracted = tempDir + "Qcma\\";
|
||||
public static readonly string pathBackupReg = tempDir + "backup.reg";
|
||||
public static readonly string pathImportReg = tempDir + "qcma.reg";
|
||||
public static readonly string pathQcmaRes = tempDir + "QcmaRes\\";
|
||||
public static bool areFilesKept = false;
|
||||
|
||||
public static bool isRegModified = false;
|
||||
}
|
||||
}
|
||||
|
|