Compare commits
17 commits
Author | SHA1 | Date | |
---|---|---|---|
|
2ddd708686 | ||
|
fe9a6e8541 | ||
|
47f0efb5a4 | ||
|
6a94bb68ef | ||
|
d7cd0ac1ab | ||
|
f87cc4f3a3 | ||
|
4b3163c80f | ||
|
a26960cea1 | ||
|
e483fe990e | ||
|
4712b448be | ||
|
0b3e8e8523 | ||
|
8fc1739a34 | ||
|
c0b78f240b | ||
|
6745d9a91d | ||
|
511184ea04 | ||
|
b469e6fe16 | ||
|
bec7cc0bbc |
27
README.md
|
@ -1,15 +1,30 @@
|
||||||
# h-encore-auto
|
# ZUGABE
|
||||||
A tool for using TheFlow's h-encore vita exploit
|
|
||||||
|
|
||||||
[](http://www.repostatus.org/#active)
|
**This is obsolete. Please use [finalhe by soarqin](https://github.com/soarqin/finalhe).**
|
||||||
|
|
||||||
|
This tool automates much of the installation of h-encore.
|
||||||
|
|
||||||
|
## About
|
||||||
|
This tool automates the install process of thefl0w's h-encore exploit for PS Vita, at least everything that can be done on the PC.
|
||||||
|
Since I can't code in C or C++, I was unable to use OpenCMA as a backend, so I used QCMA. It's automatically downloaded and does not require to be installed.
|
||||||
|
Configuration of QCMA is done via registry edits. The application also detects existing QCMA installations and restores the original settings after the exploit was installed.
|
||||||
|
|
||||||
|
**Attention: This tool only supports connection of the PSVita using Wi-Fi, therefore it's currently only compatible with PSVita/PSTV on Firmware 3.68!**
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
Download from the releases section, extract it and run the executable.
|
Download from the releases section, extract it and run the executable.
|
||||||
|
|
||||||
## Building
|
## Building
|
||||||
Visual Studio 2017 Community Edition was tested. Might work in other IDEs as well.
|
Build using Visual Studio 2017, this was tested. Other C# IDEs might work as well.
|
||||||
|
|
||||||
## Todo
|
## Todo
|
||||||
|
- Mac/Linux compatibility
|
||||||
- Mac/Linux Compatibilty
|
|
||||||
- Fix bugs (you tell me!)
|
- Fix bugs (you tell me!)
|
||||||
|
|
||||||
|
## Thanks
|
||||||
|
- thefl0w for h-encore and all their work in the vita scene
|
||||||
|
- yifanlu for psvimgtools and all their other work in the vita scene
|
||||||
|
- mmozeiko for pkg2zip
|
||||||
|
- noahc3 for auto-h-encore
|
||||||
|
- xxyz for pngshot
|
||||||
|
- All the contributors of the vita hacking scene
|
||||||
|
|
BIN
download-resources/Qcma.zip
Normal file
6
download-resources/create.bat
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
cd %~dp0
|
||||||
|
|
||||||
|
..\psvimg-create -n app -K %1 app PCSG90096/app
|
||||||
|
..\psvimg-create -n appmeta -K %1 appmeta PCSG90096/appmeta
|
||||||
|
..\psvimg-create -n license -K %1 license PCSG90096/license
|
||||||
|
..\psvimg-create -n savedata -K %1 savedata PCSG90096/savedata
|
BIN
download-resources/qcma.reg
Normal file
|
@ -2,7 +2,7 @@
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:local="clr-namespace:h_encore_auto"
|
xmlns:local="clr-namespace:h_encore_auto"
|
||||||
StartupUri="MainWindow.xaml">
|
StartupUri="AutoMode.xaml">
|
||||||
<Application.Resources>
|
<Application.Resources>
|
||||||
|
|
||||||
</Application.Resources>
|
</Application.Resources>
|
||||||
|
|
20
h-encore-auto/AutoMode.xaml
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
<Window x:Class="h_encore_auto.AutoMode"
|
||||||
|
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" Height="175.807" Width="512" ResizeMode="NoResize" 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>
|
244
h-encore-auto/AutoMode.xaml.cs
Normal file
|
@ -0,0 +1,244 @@
|
||||||
|
using System;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.IO;
|
||||||
|
using System.Windows;
|
||||||
|
using System.Windows.Input;
|
||||||
|
using System.Threading;
|
||||||
|
|
||||||
|
namespace h_encore_auto
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Interaction logic for AutoMode.xaml
|
||||||
|
/// </summary>
|
||||||
|
public partial class AutoMode : Window
|
||||||
|
{
|
||||||
|
public AutoMode()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
|
||||||
|
if (Directory.Exists(Ref.tempDir))
|
||||||
|
Util.DeleteDirectory(Ref.tempDir);
|
||||||
|
|
||||||
|
InitTimer();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void buttonStart_Click(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
Directory.CreateDirectory(Ref.tempDir);
|
||||||
|
buttonStart.IsEnabled = false;
|
||||||
|
buttonClose.IsEnabled = false;
|
||||||
|
barWorking.Visibility = Visibility.Visible;
|
||||||
|
|
||||||
|
new Thread(() =>
|
||||||
|
{
|
||||||
|
Thread.CurrentThread.IsBackground = true;
|
||||||
|
|
||||||
|
Process[] pname = Process.GetProcessesByName("qcma");
|
||||||
|
if (pname.Length != 0)
|
||||||
|
{
|
||||||
|
foreach (var proc in pname)
|
||||||
|
{
|
||||||
|
proc.Kill();
|
||||||
|
}
|
||||||
|
MessageBox.Show("QCMA was closed, since this application has to interact with it.");
|
||||||
|
}
|
||||||
|
|
||||||
|
Process process = new Process();
|
||||||
|
ProcessStartInfo startInfo = new ProcessStartInfo();
|
||||||
|
ProcessStartInfo startInfoOut = new ProcessStartInfo();
|
||||||
|
|
||||||
|
startInfo.WindowStyle = ProcessWindowStyle.Hidden;
|
||||||
|
startInfo.FileName = "cmd.exe";
|
||||||
|
startInfo.WorkingDirectory = Ref.tempDir;
|
||||||
|
|
||||||
|
startInfoOut.WindowStyle = ProcessWindowStyle.Hidden;
|
||||||
|
startInfoOut.FileName = "cmd.exe";
|
||||||
|
startInfoOut.WorkingDirectory = Ref.tempDir;
|
||||||
|
|
||||||
|
// 7ZIP Download and extraction
|
||||||
|
Util.dlFile(Ref.url7zr, "7zr.exe");
|
||||||
|
Util.dlFile(Ref.url7za, "7z-extra.7z");
|
||||||
|
|
||||||
|
startInfo.Arguments = "/C 7zr.exe x 7z-extra.7z";
|
||||||
|
process.StartInfo = startInfo;
|
||||||
|
process.Start();
|
||||||
|
process.WaitForExit();
|
||||||
|
|
||||||
|
//Rest of the tool downloads
|
||||||
|
Util.dlFile(Ref.urlPsvimg, "psvimgtools.zip");
|
||||||
|
Util.dlFile(Ref.urlPkg, "pkg2zip.zip");
|
||||||
|
Util.dlFile(Ref.urlEnc, "h-encore.zip");
|
||||||
|
Util.dlFile(Ref.urlEntry, "entryPoint.pkg");
|
||||||
|
Util.dlFile(Ref.urlQcma, "qcma.zip");
|
||||||
|
Util.dlFile(Ref.urlReg, "qcma.reg");
|
||||||
|
|
||||||
|
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);
|
||||||
|
text = text.Replace("HKEY_CURRENT_USER/Software/codestation/qcma", @"HKEY_CURRENT_USER\Software\codestation\qcma");
|
||||||
|
File.WriteAllText(Ref.pathImportReg, text);
|
||||||
|
|
||||||
|
startInfo.Arguments = "/C " + Ref.path7z + " x " + Ref.pathPsvimg;
|
||||||
|
process.StartInfo = startInfo;
|
||||||
|
process.Start();
|
||||||
|
process.WaitForExit();
|
||||||
|
|
||||||
|
startInfo.Arguments = "/C " + Ref.path7z + " x " + Ref.pathPkg;
|
||||||
|
process.StartInfo = startInfo;
|
||||||
|
process.Start();
|
||||||
|
process.WaitForExit();
|
||||||
|
|
||||||
|
startInfo.Arguments = "/C " + Ref.path7z + " x " + Ref.pathEnc;
|
||||||
|
process.StartInfo = startInfo;
|
||||||
|
process.Start();
|
||||||
|
process.WaitForExit();
|
||||||
|
|
||||||
|
Util.dlFile(Ref.urlCreateBat, "h-encore\\create.bat");
|
||||||
|
|
||||||
|
startInfo.Arguments = "/C " + Ref.path7z + " x " + Ref.pathQcma;
|
||||||
|
process.StartInfo = startInfo;
|
||||||
|
process.Start();
|
||||||
|
process.WaitForExit();
|
||||||
|
|
||||||
|
startInfo.Arguments = "/C " + Ref.tempDir + "pkg2zip.exe -x " + Ref.pathEntry;
|
||||||
|
process.StartInfo = startInfo;
|
||||||
|
process.Start();
|
||||||
|
process.WaitForExit();
|
||||||
|
|
||||||
|
Util.CopyDir(Ref.tempDir + "app\\PCSG90096\\", Ref.tempDir + "h-encore\\app\\ux0_temp_game_PCSG90096_app_PCSG90096\\",true);
|
||||||
|
File.Copy(Ref.tempDir + "app\\PCSG90096\\sce_sys\\package\\temp.bin", Ref.tempDir + @"h-encore\license\ux0_temp_game_PCSG90096_license_app_PCSG90096\6488b73b912a753a492e2714e9b38bc7.rif");
|
||||||
|
|
||||||
|
startInfoOut.RedirectStandardOutput = true;
|
||||||
|
startInfoOut.UseShellExecute = false;
|
||||||
|
startInfoOut.Arguments = @"/C reg query HKEY_CURRENT_USER\Software\codestation\qcma & echo 0";
|
||||||
|
process.StartInfo = startInfoOut;
|
||||||
|
process.Start();
|
||||||
|
string stdout = process.StandardOutput.ReadToEnd();
|
||||||
|
process.WaitForExit();
|
||||||
|
|
||||||
|
if (stdout == "0")
|
||||||
|
{
|
||||||
|
Ref.isQcmaConfigFound = false;
|
||||||
|
|
||||||
|
startInfo.Arguments = @"/C reg import " + Ref.pathImportReg;
|
||||||
|
process.StartInfo = startInfo;
|
||||||
|
process.Start();
|
||||||
|
process.WaitForExit();
|
||||||
|
}
|
||||||
|
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Ref.isQcmaConfigFound = true;
|
||||||
|
|
||||||
|
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 " + Ref.pathImportReg;
|
||||||
|
process.StartInfo = startInfo;
|
||||||
|
process.Start();
|
||||||
|
process.WaitForExit();
|
||||||
|
}
|
||||||
|
|
||||||
|
Ref.isRegModified = true;
|
||||||
|
|
||||||
|
startInfo.Arguments = @"/C " + Ref.pathQcmaExtracted + "qcma.exe";
|
||||||
|
process.StartInfo = startInfo;
|
||||||
|
process.Start();
|
||||||
|
|
||||||
|
stage = 1;
|
||||||
|
|
||||||
|
}).Start();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Grid_MouseDown(object sender, MouseButtonEventArgs e)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
DragMove();
|
||||||
|
}
|
||||||
|
catch { }
|
||||||
|
}
|
||||||
|
|
||||||
|
private void buttonClose_Click(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
Util.Cleanup();
|
||||||
|
}
|
||||||
|
|
||||||
|
private int stage = 0;
|
||||||
|
private System.Windows.Forms.Timer timer1;
|
||||||
|
public void InitTimer()
|
||||||
|
{
|
||||||
|
timer1 = new System.Windows.Forms.Timer();
|
||||||
|
timer1.Tick += new EventHandler(timer1_Tick);
|
||||||
|
timer1.Interval = 1000; // in miliseconds
|
||||||
|
timer1.Start();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void timer1_Tick(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
var guide = new VitaGuide();
|
||||||
|
if (stage == 1)
|
||||||
|
{
|
||||||
|
for (; ; )
|
||||||
|
{
|
||||||
|
stage = 0;
|
||||||
|
Ref.isSecondGuide = false;
|
||||||
|
guide.ShowDialog();
|
||||||
|
Ref.isSecondGuide = true;
|
||||||
|
|
||||||
|
if (Util.IsDirectoryEmpty(Ref.pathQcmaRes + "PSVita\\APP\\"))
|
||||||
|
{
|
||||||
|
MessageBox.Show("Required folder not found. \nMake sure you did everything correctly and follow the steps again.");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
stage = 2;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (stage == 2)
|
||||||
|
{
|
||||||
|
stage = 0;
|
||||||
|
new Thread(() =>
|
||||||
|
{
|
||||||
|
Thread.CurrentThread.IsBackground = true;
|
||||||
|
|
||||||
|
Process process = new Process();
|
||||||
|
ProcessStartInfo startInfo = new ProcessStartInfo();
|
||||||
|
ProcessStartInfo startInfoOut = new ProcessStartInfo();
|
||||||
|
|
||||||
|
startInfo.WindowStyle = ProcessWindowStyle.Hidden;
|
||||||
|
startInfo.FileName = "cmd.exe";
|
||||||
|
startInfo.WorkingDirectory = Ref.tempDir + "h-encore";
|
||||||
|
|
||||||
|
Ref.shortAID = new DirectoryInfo(Directory.GetDirectories(Ref.pathQcmaRes + "PSVita\\APP\\")[0]).Name;
|
||||||
|
|
||||||
|
Ref.longAID = Util.GetEncKey(Ref.shortAID);
|
||||||
|
|
||||||
|
startInfo.Arguments = "/C create.bat " + Ref.longAID;
|
||||||
|
process.StartInfo = startInfo;
|
||||||
|
process.Start();
|
||||||
|
process.WaitForExit();
|
||||||
|
|
||||||
|
Util.CopyDir(Ref.tempDir + "h-encore\\PCSG90096\\", Ref.pathQcmaRes + "PSVita\\APP\\" + Ref.shortAID + "\\PCSG90096\\", true);
|
||||||
|
|
||||||
|
stage = 3;
|
||||||
|
}).Start();
|
||||||
|
}
|
||||||
|
if (stage == 3)
|
||||||
|
{
|
||||||
|
stage = 0;
|
||||||
|
guide.ShowDialog();
|
||||||
|
|
||||||
|
MessageBox.Show("If not already done, wait until your Vita has copied over the exploit, then press OK.");
|
||||||
|
|
||||||
|
Util.Cleanup();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,32 +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="h-encore-auto" Width="789.733" Height="391.819">
|
|
||||||
<Grid>
|
|
||||||
<TextBox x:Name="boxPath7z" HorizontalAlignment="Left" Height="20" Margin="10,50,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="559"/>
|
|
||||||
<Button x:Name="button7zFile" Content="Local File" HorizontalAlignment="Left" Margin="687,50,0,0" VerticalAlignment="Top" Width="75" Click="button7zFile_Click"/>
|
|
||||||
<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" HorizontalAlignment="Left" Height="20" Margin="10,106,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="559"/>
|
|
||||||
<Button x:Name="buttonPsvimgDL" Content="Download" HorizontalAlignment="Left" Margin="593,106,0,0" VerticalAlignment="Top" Width="75" Click="buttonPsvimgDL_Click"/>
|
|
||||||
<Button x:Name="buttonPsvimgFile" Content="Local File" HorizontalAlignment="Left" Margin="687,106,0,0" VerticalAlignment="Top" Width="75" Click="buttonPsvimgFile_Click"/>
|
|
||||||
<Label Content="pkg2zip.zip:" HorizontalAlignment="Left" Margin="10,131,0,0" VerticalAlignment="Top"/>
|
|
||||||
<TextBox x:Name="boxPathPkg" HorizontalAlignment="Left" Height="20" Margin="10,162,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="559"/>
|
|
||||||
<Button x:Name="buttonPkgDL" Content="Download" HorizontalAlignment="Left" Margin="593,162,0,0" VerticalAlignment="Top" Width="75" Click="buttonPkgDL_Click"/>
|
|
||||||
<Button x:Name="buttonPkgFile" Content="Local File" HorizontalAlignment="Left" Margin="687,162,0,0" VerticalAlignment="Top" Width="75" Click="buttonPkgFile_Click"/>
|
|
||||||
<Label Content="h-encore.zip:" HorizontalAlignment="Left" Margin="10,187,0,0" VerticalAlignment="Top"/>
|
|
||||||
<TextBox x:Name="boxPathEnc" HorizontalAlignment="Left" Height="20" Margin="10,218,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="559"/>
|
|
||||||
<Button x:Name="buttonEncDL" Content="Download" HorizontalAlignment="Left" Margin="593,218,0,0" VerticalAlignment="Top" Width="75" Click="buttonEncDL_Click"/>
|
|
||||||
<Button x:Name="buttonEncFile" Content="Local File" HorizontalAlignment="Left" Margin="687,218,0,0" VerticalAlignment="Top" Width="75" Click="buttonEncFile_Click"/>
|
|
||||||
<Label Content="Bitter Smile pkg:" HorizontalAlignment="Left" Margin="10,243,0,0" VerticalAlignment="Top"/>
|
|
||||||
<TextBox x:Name="boxPathEntry" HorizontalAlignment="Left" Height="20" Margin="10,269,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="559"/>
|
|
||||||
<Button x:Name="buttonEntryDL" Content="Download" HorizontalAlignment="Left" Margin="593,269,0,0" VerticalAlignment="Top" Width="75" Click="buttonEntryDL_Click"/>
|
|
||||||
<Button x:Name="buttonEntryFile" Content="Local File" HorizontalAlignment="Left" Margin="687,269,0,0" VerticalAlignment="Top" Width="75" Click="buttonEntryFile_Click"/>
|
|
||||||
<Button x:Name="buttonZipDL" Content="Download" HorizontalAlignment="Left" Margin="593,50,0,0" VerticalAlignment="Top" Width="75" Click="buttonZipDL_Click"/>
|
|
||||||
<Button x:Name="buttonGo" Content="Go!" Margin="213,314,213,0" VerticalAlignment="Top" Height="38" Click="buttonGo_Click"/>
|
|
||||||
</Grid>
|
|
||||||
</Window>
|
|
|
@ -1,363 +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(temp))
|
|
||||||
{
|
|
||||||
DeleteDirectory(temp);
|
|
||||||
}
|
|
||||||
|
|
||||||
createTemp();
|
|
||||||
}
|
|
||||||
|
|
||||||
string ProgramFilesx86 = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86);
|
|
||||||
string ProgramFiles = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles);
|
|
||||||
bool tempCreated = false;
|
|
||||||
string temp = Path.GetTempPath() + @"encore_temp\";
|
|
||||||
|
|
||||||
private void dlFile(string url, string filename)
|
|
||||||
{
|
|
||||||
using (WebClient client = new WebClient())
|
|
||||||
{
|
|
||||||
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
|
|
||||||
client.DownloadFile(url, temp + filename);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
private void createTemp()
|
|
||||||
{
|
|
||||||
if (tempCreated == false)
|
|
||||||
{
|
|
||||||
Directory.CreateDirectory(temp);
|
|
||||||
tempCreated = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void DeleteDirectory(string path)
|
|
||||||
{
|
|
||||||
foreach (string directory in Directory.GetDirectories(path))
|
|
||||||
{
|
|
||||||
DeleteDirectory(directory);
|
|
||||||
}
|
|
||||||
try
|
|
||||||
{
|
|
||||||
Directory.Delete(path, true);
|
|
||||||
}
|
|
||||||
catch (IOException)
|
|
||||||
{
|
|
||||||
Directory.Delete(path, true);
|
|
||||||
}
|
|
||||||
catch (UnauthorizedAccessException)
|
|
||||||
{
|
|
||||||
Directory.Delete(path, true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
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 = temp;
|
|
||||||
|
|
||||||
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 " + temp + "pkg2zip.exe" + " -x " + boxPathEntry.Text;
|
|
||||||
process.StartInfo = startInfo;
|
|
||||||
process.Start();
|
|
||||||
process.WaitForExit();
|
|
||||||
|
|
||||||
startInfo.Arguments = "/C xcopy /E /Y /I " + temp + @"app\PCSG90096\ " + temp + @"h-encore\app\ux0_temp_game_PCSG90096_app_PCSG90096\";
|
|
||||||
process.StartInfo = startInfo;
|
|
||||||
process.Start();
|
|
||||||
process.WaitForExit();
|
|
||||||
|
|
||||||
startInfo.Arguments = "/C xcopy /E /Y /I " + temp + @"app\PCSG90096\sce_sys\package\temp.bin " + temp + @"h-encore\license\ux0_temp_game_PCSG90096_license_app_PCSG90096\6488b73b912a753a492e2714e9b38bc7.rif*";
|
|
||||||
process.StartInfo = startInfo;
|
|
||||||
process.Start();
|
|
||||||
process.WaitForExit();
|
|
||||||
|
|
||||||
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 on the website, which is going to open as well.\nThe website will give you an even longer text mass, which you must enter in the next step.");
|
|
||||||
Process.Start(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + @"\PS Vita\APP\");
|
|
||||||
Process.Start("http://cma.henkaku.xyz/");
|
|
||||||
}
|
|
||||||
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 on the website, which is going to open.\nThe website will give you an even longer text mass, which you must enter in the next step.");
|
|
||||||
Process.Start("http://cma.henkaku.xyz/");
|
|
||||||
}
|
|
||||||
if (MessageBox.Show("Do you want to read the steps again?", "Re-read?", MessageBoxButton.YesNo) == MessageBoxResult.No)
|
|
||||||
{
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
string key = null;
|
|
||||||
for (; ; )
|
|
||||||
{
|
|
||||||
key = InputBox.ShowInputBox("Enter key with 64 characters from the website.");
|
|
||||||
if (key != null)
|
|
||||||
{
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (MessageBox.Show("Do you want to cancel?", "Cancel?", MessageBoxButton.YesNo) == MessageBoxResult.Yes)
|
|
||||||
{
|
|
||||||
cleanup();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
startInfo.WorkingDirectory = temp + "h-encore";
|
|
||||||
|
|
||||||
startInfo.Arguments = @"/C ..\psvimg-create -n app -K " + key + " PCSG90096/app";
|
|
||||||
process.StartInfo = startInfo;
|
|
||||||
process.Start();
|
|
||||||
process.WaitForExit();
|
|
||||||
|
|
||||||
startInfo.Arguments = @"/C ..\psvimg-create -n appmeta -K " + key + " PCSG90096/appmeta";
|
|
||||||
process.StartInfo = startInfo;
|
|
||||||
process.Start();
|
|
||||||
process.WaitForExit();
|
|
||||||
|
|
||||||
startInfo.Arguments = @"/C ..\psvimg-create -n license -K " + key + " PCSG90096/license";
|
|
||||||
process.StartInfo = startInfo;
|
|
||||||
process.Start();
|
|
||||||
process.WaitForExit();
|
|
||||||
|
|
||||||
startInfo.Arguments = @"/C ..\psvimg-create -n savedata -K " + key + " 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(temp + @"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(temp + @"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/");
|
|
||||||
}
|
|
||||||
|
|
||||||
cleanup();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void buttonZipDL_Click(object sender, RoutedEventArgs e)
|
|
||||||
{
|
|
||||||
dlFile("https://www.7-zip.org/a/7zr.exe", "7zr.exe");
|
|
||||||
dlFile("https://www.7-zip.org/a/7z1805-extra.7z", "7z-extra.7z");
|
|
||||||
|
|
||||||
Process process = new Process();
|
|
||||||
ProcessStartInfo startInfo = new ProcessStartInfo();
|
|
||||||
startInfo.WindowStyle = ProcessWindowStyle.Hidden;
|
|
||||||
startInfo.FileName = "cmd.exe";
|
|
||||||
startInfo.WorkingDirectory = temp;
|
|
||||||
|
|
||||||
startInfo.Arguments = "/C 7zr.exe x 7z-extra.7z";
|
|
||||||
process.StartInfo = startInfo;
|
|
||||||
process.Start();
|
|
||||||
process.WaitForExit();
|
|
||||||
|
|
||||||
boxPath7z.Text = temp + "7za.exe";
|
|
||||||
}
|
|
||||||
|
|
||||||
private void buttonPsvimgDL_Click(object sender, RoutedEventArgs e)
|
|
||||||
{
|
|
||||||
dlFile("https://github.com/yifanlu/psvimgtools/releases/download/v0.1/psvimgtools-0.1-win32.zip", "psvimgtools-0.1-win32.zip");
|
|
||||||
|
|
||||||
boxPathPsvimg.Text = temp + "psvimgtools-0.1-win32.zip";
|
|
||||||
}
|
|
||||||
|
|
||||||
private void buttonPkgDL_Click(object sender, RoutedEventArgs e)
|
|
||||||
{
|
|
||||||
dlFile("https://github.com/mmozeiko/pkg2zip/releases/download/v1.8/pkg2zip_32bit.zip", "pkg2zip_32bit.zip");
|
|
||||||
|
|
||||||
boxPathPkg.Text = temp + "pkg2zip_32bit.zip";
|
|
||||||
}
|
|
||||||
|
|
||||||
private void buttonEncDL_Click(object sender, RoutedEventArgs e)
|
|
||||||
{
|
|
||||||
dlFile("https://github.com/TheOfficialFloW/h-encore/releases/download/v1.0/h-encore.zip", "h-encore.zip");
|
|
||||||
|
|
||||||
boxPathEnc.Text = temp + "h-encore.zip";
|
|
||||||
}
|
|
||||||
|
|
||||||
private void buttonEntryDL_Click(object sender, RoutedEventArgs e)
|
|
||||||
{
|
|
||||||
MessageBox.Show("This will take a while, please be patient.");
|
|
||||||
|
|
||||||
dlFile("http://ares.dl.playstation.net/cdn/JP0741/PCSG90096_00/xGMrXOkORxWRyqzLMihZPqsXAbAXLzvAdJFqtPJLAZTgOcqJobxQAhLNbgiFydVlcmVOrpZKklOYxizQCRpiLfjeROuWivGXfwgkq.pkg", "xGMrXOkORxWRyqzLMihZPqsXAbAXLzvAdJFqtPJLAZTgOcqJobxQAhLNbgiFydVlcmVOrpZKklOYxizQCRpiLfjeROuWivGXfwgkq.pkg");
|
|
||||||
|
|
||||||
boxPathEntry.Text = temp + "xGMrXOkORxWRyqzLMihZPqsXAbAXLzvAdJFqtPJLAZTgOcqJobxQAhLNbgiFydVlcmVOrpZKklOYxizQCRpiLfjeROuWivGXfwgkq.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 cleanup()
|
|
||||||
{
|
|
||||||
DeleteDirectory(temp);
|
|
||||||
MessageBox.Show("Done.");
|
|
||||||
System.Environment.Exit(0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
154
h-encore-auto/Util.cs
Normal file
|
@ -0,0 +1,154 @@
|
||||||
|
using System;
|
||||||
|
using System.Net;
|
||||||
|
using System.Net.Http;
|
||||||
|
using System.IO;
|
||||||
|
using System.Windows.Markup;
|
||||||
|
using System.Windows;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.Globalization;
|
||||||
|
|
||||||
|
namespace h_encore_auto
|
||||||
|
{
|
||||||
|
public class Util
|
||||||
|
{
|
||||||
|
private static WebClient web = new WebClient();
|
||||||
|
private static HttpClient http = new HttpClient();
|
||||||
|
|
||||||
|
public static string GetEncKey(string aid)
|
||||||
|
//Thanks to noahc3 (https://github.com/noahc3/) for this.
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
string page = http.GetStringAsync(Ref.urlCma + aid).Result;
|
||||||
|
return page.Substring(page.Length - 65, 64);
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
MessageBox.Show("Failed to get the CMA encryption key. Make sure your internet is connected and retry.");
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void DeleteDirectory(string path)
|
||||||
|
{
|
||||||
|
foreach (string directory in Directory.GetDirectories(path))
|
||||||
|
{
|
||||||
|
DeleteDirectory(directory);
|
||||||
|
}
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Directory.Delete(path, true);
|
||||||
|
}
|
||||||
|
catch (IOException)
|
||||||
|
{
|
||||||
|
Directory.Delete(path, true);
|
||||||
|
}
|
||||||
|
catch (UnauthorizedAccessException)
|
||||||
|
{
|
||||||
|
Directory.Delete(path, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void dlFile(string url, string filename)
|
||||||
|
{
|
||||||
|
using (WebClient client = new WebClient())
|
||||||
|
{
|
||||||
|
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
|
||||||
|
client.DownloadFile(url, Ref.tempDir + filename);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public static void Cleanup()
|
||||||
|
{
|
||||||
|
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))
|
||||||
|
{
|
||||||
|
DeleteDirectory(Ref.tempDir);
|
||||||
|
}
|
||||||
|
|
||||||
|
Environment.Exit(0);
|
||||||
|
}
|
||||||
|
public static bool IsDirectoryEmpty(string path)
|
||||||
|
{
|
||||||
|
IEnumerable<string> items = Directory.EnumerateFileSystemEntries(path);
|
||||||
|
using (IEnumerator<string> en = items.GetEnumerator())
|
||||||
|
{
|
||||||
|
return !en.MoveNext();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string GetLang()
|
||||||
|
{
|
||||||
|
CultureInfo ci = CultureInfo.InstalledUICulture;
|
||||||
|
|
||||||
|
return ci.TwoLetterISOLanguageName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void CopyDir(string sourceDirName, string destDirName, bool copySubDirs)
|
||||||
|
{
|
||||||
|
// Get the subdirectories for the specified directory.
|
||||||
|
DirectoryInfo dir = new DirectoryInfo(sourceDirName);
|
||||||
|
|
||||||
|
if (!dir.Exists)
|
||||||
|
{
|
||||||
|
throw new DirectoryNotFoundException("Source directory does not exist or could not be found: " + sourceDirName);
|
||||||
|
}
|
||||||
|
|
||||||
|
DirectoryInfo[] dirs = dir.GetDirectories();
|
||||||
|
// If the destination directory doesn't exist, create it.
|
||||||
|
if (!Directory.Exists(destDirName))
|
||||||
|
{
|
||||||
|
Directory.CreateDirectory(destDirName);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get the files in the directory and copy them to the new location.
|
||||||
|
FileInfo[] files = dir.GetFiles();
|
||||||
|
foreach (FileInfo file in files)
|
||||||
|
{
|
||||||
|
string temppath = Path.Combine(destDirName, file.Name);
|
||||||
|
file.CopyTo(temppath, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
// If copying subdirectories, copy them and their contents to new location.
|
||||||
|
if (copySubDirs)
|
||||||
|
{
|
||||||
|
foreach (DirectoryInfo subdir in dirs)
|
||||||
|
{
|
||||||
|
string temppath = Path.Combine(destDirName, subdir.Name);
|
||||||
|
CopyDir(subdir.FullName, temppath, copySubDirs);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
17
h-encore-auto/VitaGuide.xaml
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
<Window x:Class="h_encore_auto.VitaGuide"
|
||||||
|
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="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 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>
|
65
h-encore-auto/VitaGuide.xaml.cs
Normal file
|
@ -0,0 +1,65 @@
|
||||||
|
using System;
|
||||||
|
using System.Windows;
|
||||||
|
using System.Windows.Media.Imaging;
|
||||||
|
|
||||||
|
namespace h_encore_auto
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Interaction logic for VitaGuide.xaml
|
||||||
|
/// </summary>
|
||||||
|
public partial class VitaGuide : Window
|
||||||
|
{
|
||||||
|
int currImg;
|
||||||
|
|
||||||
|
string[] currText = lang.GuideText(Util.GetLang());
|
||||||
|
|
||||||
|
public VitaGuide()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
|
||||||
|
if (Ref.isSecondGuide == true)
|
||||||
|
currImg = 15;
|
||||||
|
else
|
||||||
|
currImg = 1;
|
||||||
|
|
||||||
|
imgFrame.Source = new BitmapImage(new Uri("/img/" + currImg + ".png", UriKind.Relative));
|
||||||
|
textField.Text = currText[currImg - 1];
|
||||||
|
buttonDone.Visibility = Visibility.Hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void buttonFwd_Click(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
currImg++;
|
||||||
|
imgFrame.Source = new BitmapImage(new Uri("/img/" + currImg + ".png", UriKind.Relative));
|
||||||
|
textField.Text = currText[currImg - 1];
|
||||||
|
buttonBck.IsEnabled = true;
|
||||||
|
|
||||||
|
if (currImg == 14 || currImg == 26)
|
||||||
|
{
|
||||||
|
buttonFwd.IsEnabled = false;
|
||||||
|
buttonDone.Visibility = Visibility.Visible;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
buttonFwd.IsEnabled = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void buttonBck_Click(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
currImg--;
|
||||||
|
imgFrame.Source = new BitmapImage(new Uri("/img/" + currImg + ".png", UriKind.Relative));
|
||||||
|
buttonFwd.IsEnabled = true;
|
||||||
|
textField.Text = currText[currImg - 1];
|
||||||
|
|
||||||
|
if (currImg == 1 || currImg == 15)
|
||||||
|
{
|
||||||
|
buttonBck.IsEnabled = false;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
buttonBck.IsEnabled = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -8,7 +8,7 @@
|
||||||
<ProjectGuid>{9F8577B2-16A2-4147-B264-308B68679F78}</ProjectGuid>
|
<ProjectGuid>{9F8577B2-16A2-4147-B264-308B68679F78}</ProjectGuid>
|
||||||
<OutputType>WinExe</OutputType>
|
<OutputType>WinExe</OutputType>
|
||||||
<RootNamespace>h_encore_auto</RootNamespace>
|
<RootNamespace>h_encore_auto</RootNamespace>
|
||||||
<AssemblyName>h-encore-auto</AssemblyName>
|
<AssemblyName>ZUGABE</AssemblyName>
|
||||||
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
|
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
|
||||||
<FileAlignment>512</FileAlignment>
|
<FileAlignment>512</FileAlignment>
|
||||||
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
||||||
|
@ -53,12 +53,14 @@
|
||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
<Prefer32Bit>false</Prefer32Bit>
|
<Prefer32Bit>false</Prefer32Bit>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
<PropertyGroup>
|
||||||
|
<ApplicationIcon>icon.ico</ApplicationIcon>
|
||||||
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="InputBox, Version=1.0.0.1, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.VisualBasic" />
|
||||||
<HintPath>..\packages\Essy.Tools.InputBox.1.0.0\lib\net20\InputBox.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Data" />
|
<Reference Include="System.Data" />
|
||||||
|
<Reference Include="System.Net.Http" />
|
||||||
<Reference Include="System.Windows.Forms" />
|
<Reference Include="System.Windows.Forms" />
|
||||||
<Reference Include="System.Xml" />
|
<Reference Include="System.Xml" />
|
||||||
<Reference Include="Microsoft.CSharp" />
|
<Reference Include="Microsoft.CSharp" />
|
||||||
|
@ -77,18 +79,27 @@
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</ApplicationDefinition>
|
</ApplicationDefinition>
|
||||||
<Page Include="MainWindow.xaml">
|
<Compile Include="AutoMode.xaml.cs">
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<DependentUpon>AutoMode.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="lang.cs" />
|
||||||
|
<Compile Include="Ref.cs" />
|
||||||
|
<Compile Include="Util.cs" />
|
||||||
|
<Compile Include="VitaGuide.xaml.cs">
|
||||||
|
<DependentUpon>VitaGuide.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Page Include="AutoMode.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
</Page>
|
</Page>
|
||||||
<Compile Include="App.xaml.cs">
|
<Compile Include="App.xaml.cs">
|
||||||
<DependentUpon>App.xaml</DependentUpon>
|
<DependentUpon>App.xaml</DependentUpon>
|
||||||
<SubType>Code</SubType>
|
<SubType>Code</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="MainWindow.xaml.cs">
|
<Page Include="VitaGuide.xaml">
|
||||||
<DependentUpon>MainWindow.xaml</DependentUpon>
|
<SubType>Designer</SubType>
|
||||||
<SubType>Code</SubType>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
</Compile>
|
</Page>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="Properties\AssemblyInfo.cs">
|
<Compile Include="Properties\AssemblyInfo.cs">
|
||||||
|
@ -127,6 +138,43 @@
|
||||||
<Install>false</Install>
|
<Install>false</Install>
|
||||||
</BootstrapperPackage>
|
</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" />
|
||||||
|
<Resource Include="img\12.png" />
|
||||||
|
<Resource Include="img\13.png" />
|
||||||
|
<Resource Include="img\14.png" />
|
||||||
|
<Resource Include="img\2.png" />
|
||||||
|
<Resource Include="img\3.png" />
|
||||||
|
<Resource Include="img\4.png" />
|
||||||
|
<Resource Include="img\5.png" />
|
||||||
|
<Resource Include="img\6.png" />
|
||||||
|
<Resource Include="img\7.png" />
|
||||||
|
<Resource Include="img\8.png" />
|
||||||
|
<Resource Include="img\9.PNG" />
|
||||||
|
<Resource Include="img\10.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="img\ajax-loader.gif" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="img\20.png" />
|
||||||
|
<Resource Include="img\21.png" />
|
||||||
|
<Resource Include="img\22.png" />
|
||||||
|
<Resource Include="img\23.png" />
|
||||||
|
<Resource Include="img\24.png" />
|
||||||
|
<Resource Include="img\25.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="icon.ico" />
|
||||||
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
|
|
BIN
h-encore-auto/icon.ico
Normal file
After Width: | Height: | Size: 110 KiB |
BIN
h-encore-auto/img/1.png
Normal file
After Width: | Height: | Size: 358 KiB |
BIN
h-encore-auto/img/10.png
Normal file
After Width: | Height: | Size: 53 KiB |
BIN
h-encore-auto/img/11.png
Normal file
After Width: | Height: | Size: 30 KiB |
BIN
h-encore-auto/img/12.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
h-encore-auto/img/13.png
Normal file
After Width: | Height: | Size: 85 KiB |
BIN
h-encore-auto/img/14.png
Normal file
After Width: | Height: | Size: 92 KiB |
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 |
BIN
h-encore-auto/img/2.png
Normal file
After Width: | Height: | Size: 71 KiB |
BIN
h-encore-auto/img/20.png
Normal file
After Width: | Height: | Size: 146 KiB |
BIN
h-encore-auto/img/21.png
Normal file
After Width: | Height: | Size: 112 KiB |
BIN
h-encore-auto/img/22.png
Normal file
After Width: | Height: | Size: 509 KiB |
BIN
h-encore-auto/img/23.png
Normal file
After Width: | Height: | Size: 4.5 KiB |
BIN
h-encore-auto/img/24.png
Normal file
After Width: | Height: | Size: 4.5 KiB |
BIN
h-encore-auto/img/25.png
Normal file
After Width: | Height: | Size: 4.5 KiB |
BIN
h-encore-auto/img/3.png
Normal file
After Width: | Height: | Size: 25 KiB |
BIN
h-encore-auto/img/4.png
Normal file
After Width: | Height: | Size: 46 KiB |
BIN
h-encore-auto/img/5.png
Normal file
After Width: | Height: | Size: 43 KiB |
BIN
h-encore-auto/img/6.png
Normal file
After Width: | Height: | Size: 41 KiB |
BIN
h-encore-auto/img/7.png
Normal file
After Width: | Height: | Size: 56 KiB |
BIN
h-encore-auto/img/8.png
Normal file
After Width: | Height: | Size: 65 KiB |
BIN
h-encore-auto/img/9.PNG
Normal file
After Width: | Height: | Size: 9.6 KiB |
BIN
h-encore-auto/img/ajax-loader.gif
Normal file
After Width: | Height: | Size: 3.1 KiB |
BIN
h-encore-auto/img/icon.ico
Normal file
After Width: | Height: | Size: 110 KiB |
42
h-encore-auto/lang.cs
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
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. Select \"PS Vita\"",
|
||||||
|
"7. Tick \"h-encore\" and click \"copy\". Wait for it to complete and close Content Manager.",
|
||||||
|
"8. Start the new \"h-encore\" bubble.",
|
||||||
|
"9. Select \"Install HENkaku\"",
|
||||||
|
"10. Select \"Download VitaShell\"",
|
||||||
|
"11. Finally, exit.",
|
||||||
|
"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,5 +1,4 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<packages>
|
<packages>
|
||||||
<package id="Essy.Tools.InputBox" version="1.0.0" targetFramework="net452" />
|
|
||||||
<package id="MSBuilder.CodeTaskAssembly" version="0.2.5" targetFramework="net40" developmentDependency="true" />
|
<package id="MSBuilder.CodeTaskAssembly" version="0.2.5" targetFramework="net40" developmentDependency="true" />
|
||||||
</packages>
|
</packages>
|
44
h-encore-auto/ref.cs
Normal file
|
@ -0,0 +1,44 @@
|
||||||
|
using System;
|
||||||
|
using System.IO;
|
||||||
|
|
||||||
|
namespace h_encore_auto
|
||||||
|
{
|
||||||
|
public class Ref
|
||||||
|
{
|
||||||
|
public static readonly string urlCma = "http://cma.henkaku.xyz/?aid=";
|
||||||
|
public static readonly string urlPsvimg = "https://github.com/yifanlu/psvimgtools/releases/download/v0.1/psvimgtools-0.1-win32.zip";
|
||||||
|
public static readonly string urlPkg = "https://github.com/mmozeiko/pkg2zip/releases/download/v1.8/pkg2zip_32bit.zip";
|
||||||
|
public static readonly string urlEnc = "https://github.com/TheOfficialFloW/h-encore/releases/download/v1.0/h-encore.zip";
|
||||||
|
public static readonly string urlEntry = "http://ares.dl.playstation.net/cdn/JP0741/PCSG90096_00/xGMrXOkORxWRyqzLMihZPqsXAbAXLzvAdJFqtPJLAZTgOcqJobxQAhLNbgiFydVlcmVOrpZKklOYxizQCRpiLfjeROuWivGXfwgkq.pkg";
|
||||||
|
public static readonly string url7zr = "https://www.7-zip.org/a/7zr.exe";
|
||||||
|
public static readonly string url7za = "https://www.7-zip.org/a/7z1805-extra.7z";
|
||||||
|
public static readonly string urlQcma = "https://raw.githubusercontent.com/fyr77/ZUGABE/master/download-resources/Qcma.zip";
|
||||||
|
public static readonly string urlReg = "https://raw.githubusercontent.com/fyr77/ZUGABE/master/download-resources/qcma.reg";
|
||||||
|
public static readonly string urlCreateBat = "https://raw.githubusercontent.com/fyr77/ZUGABE/master/download-resources/create.bat";
|
||||||
|
|
||||||
|
public static readonly string pathCurrPic = "img/1.png";
|
||||||
|
|
||||||
|
public static readonly string tempDir = Path.GetTempPath() + @"encore_temp\";
|
||||||
|
|
||||||
|
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 isRegModified = false;
|
||||||
|
}
|
||||||
|
}
|