Compare commits

..

2 commits
master ... next

Author SHA1 Message Date
Jakob
7764d3ae5d update README 2018-07-08 20:48:46 +02:00
Jakob
cd269bed32 remove old project 2018-07-08 20:45:28 +02:00
50 changed files with 7 additions and 1113 deletions

View file

@ -1,25 +1,21 @@
# ZUGABE # ZUGABE
**This is obsolete. Please use [finalhe by soarqin](https://github.com/soarqin/finalhe).** This tool automates much of the installation of h-encore. It's still in very eraly development and currently unusable.
This tool automates much of the installation of h-encore. [![Project Status: WIP Initial development is in progress, but there has not yet been a stable, usable release suitable for the public.](http://www.repostatus.org/badges/latest/wip.svg)](http://www.repostatus.org/#wip)
## About ## 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. 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 and it's built to run on Mac and Linux.
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. When run on Windows, it will download and start [auto-h-encore](https://github.com/noahc3/auto-h-encore).
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. ...not yet
## Building ## Building
Build using Visual Studio 2017, this was tested. Other C# IDEs might work as well. ...not yet
## Todo ## Todo
- Mac/Linux compatibility - everything
- Fix bugs (you tell me!)
## Thanks ## Thanks
- thefl0w for h-encore and all their work in the vita scene - thefl0w for h-encore and all their work in the vita scene

Binary file not shown.

View file

@ -1,6 +0,0 @@
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

Binary file not shown.

View file

@ -1,25 +0,0 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.27703.2035
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "h-encore-auto", "h-encore-auto\h-encore-auto.csproj", "{9F8577B2-16A2-4147-B264-308B68679F78}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{9F8577B2-16A2-4147-B264-308B68679F78}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9F8577B2-16A2-4147-B264-308B68679F78}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9F8577B2-16A2-4147-B264-308B68679F78}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9F8577B2-16A2-4147-B264-308B68679F78}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {EA1569D4-A0AC-4F0A-9E26-B96D084A329C}
EndGlobalSection
EndGlobal

View file

@ -1,9 +0,0 @@
<Application x:Class="h_encore_auto.App"
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="AutoMode.xaml">
<Application.Resources>
</Application.Resources>
</Application>

View file

@ -1,16 +0,0 @@
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Windows;
namespace h_encore_auto
{
/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public partial class App : Application
{
}
}

View file

@ -1,20 +0,0 @@
<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>

View file

@ -1,244 +0,0 @@
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();
}
}
}
}

View file

@ -1,55 +0,0 @@
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Windows;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("h-encore-auto")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("h-encore-auto")]
[assembly: AssemblyCopyright("Copyright © 2018")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
//In order to begin building localizable applications, set
//<UICulture>CultureYouAreCodingWith</UICulture> in your .csproj file
//inside a <PropertyGroup>. For example, if you are using US english
//in your source files, set the <UICulture> to en-US. Then uncomment
//the NeutralResourceLanguage attribute below. Update the "en-US" in
//the line below to match the UICulture setting in the project file.
//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
[assembly: ThemeInfo(
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
//(used if a resource is not found in the page,
// or application resource dictionaries)
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
//(used if a resource is not found in the page,
// app, or any theme specific resource dictionaries)
)]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View file

@ -1,63 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace h_encore_auto.Properties {
using System;
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("h_encore_auto.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
}
}

View file

@ -1,117 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View file

@ -1,26 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace h_encore_auto.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.7.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default {
get {
return defaultInstance;
}
}
}
}

View file

@ -1,7 +0,0 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="uri:settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>

View file

@ -1,154 +0,0 @@
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);
}
}
}
}
}

View file

@ -1,17 +0,0 @@
<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="&gt;" Margin="482,378,0,0" VerticalAlignment="Top" Height="50" FontSize="36" Click="buttonFwd_Click" HorizontalAlignment="Left" Width="50"/>
<Button x:Name="buttonBck" Content="&lt;" 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>

View file

@ -1,65 +0,0 @@
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;
}
}
}
}

View file

@ -1,3 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2"/></startup></configuration>

View file

@ -1,185 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\MSBuilder.CodeTaskAssembly.0.2.5\build\MSBuilder.CodeTaskAssembly.props" Condition="Exists('..\packages\MSBuilder.CodeTaskAssembly.0.2.5\build\MSBuilder.CodeTaskAssembly.props')" />
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{9F8577B2-16A2-4147-B264-308B68679F78}</ProjectGuid>
<OutputType>WinExe</OutputType>
<RootNamespace>h_encore_auto</RootNamespace>
<AssemblyName>ZUGABE</AssemblyName>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<WarningLevel>4</WarningLevel>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
<TargetFrameworkProfile />
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>icon.ico</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.VisualBasic" />
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Xaml">
<RequiredTargetFramework>4.0</RequiredTargetFramework>
</Reference>
<Reference Include="WindowsBase" />
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
</ItemGroup>
<ItemGroup>
<ApplicationDefinition Include="App.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</ApplicationDefinition>
<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">
<DependentUpon>VitaGuide.xaml</DependentUpon>
</Compile>
<Page Include="AutoMode.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Compile Include="App.xaml.cs">
<DependentUpon>App.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Page Include="VitaGuide.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
<None Include="app.config" />
<None Include="packages.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include=".NETFramework,Version=v4.5.2">
<Visible>False</Visible>
<ProductName>Microsoft .NET Framework 4.5.2 %28x86 and x64%29</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>false</Install>
</BootstrapperPackage>
</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" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\MSBuilder.CodeTaskAssembly.0.2.5\build\MSBuilder.CodeTaskAssembly.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\MSBuilder.CodeTaskAssembly.0.2.5\build\MSBuilder.CodeTaskAssembly.props'))" />
</Target>
</Project>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 110 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 358 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 85 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 92 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 358 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 85 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 92 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 146 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 112 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 509 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 110 KiB

View file

@ -1,42 +0,0 @@
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."
};
}
}

View file

@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="MSBuilder.CodeTaskAssembly" version="0.2.5" targetFramework="net40" developmentDependency="true" />
</packages>

View file

@ -1,44 +0,0 @@
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;
}
}