mirror of
https://silica.codes/BedrockReverse/McTools.git
synced 2025-06-08 12:01:27 +12:00
Upload src
This commit is contained in:
parent
df72a81caf
commit
11bc128354
43 changed files with 76263 additions and 9 deletions
6
McEncryptor/App.config
Normal file
6
McEncryptor/App.config
Normal file
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/>
|
||||
</startup>
|
||||
</configuration>
|
64
McEncryptor/McEncryptor.csproj
Normal file
64
McEncryptor/McEncryptor.csproj
Normal file
|
@ -0,0 +1,64 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<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>{E3B51165-8EE7-4DEE-AD04-CDF1089371A7}</ProjectGuid>
|
||||
<OutputType>Exe</OutputType>
|
||||
<RootNamespace>McEncryptor</RootNamespace>
|
||||
<AssemblyName>McEncryptor</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<Deterministic>true</Deterministic>
|
||||
<TargetFrameworkProfile />
|
||||
</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>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>none</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ApplicationIcon>illager.ico</ApplicationIcon>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\McCrypt\LibMcCrypt.csproj">
|
||||
<Project>{4bef6f52-6545-4bb9-8053-50335a1c6789}</Project>
|
||||
<Name>LibMcCrypt</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="illager.ico" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
46
McEncryptor/Program.cs
Normal file
46
McEncryptor/Program.cs
Normal file
|
@ -0,0 +1,46 @@
|
|||
using McCrypt;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
|
||||
namespace McEncryptor
|
||||
{
|
||||
class Program
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
Console.WriteLine("-- McEncryptor --");
|
||||
|
||||
string runningInFolder = Path.GetDirectoryName(Assembly.GetEntryAssembly().Location);
|
||||
string keysDbFile = Path.Combine(runningInFolder, "keys.db");
|
||||
Directory.SetCurrentDirectory(runningInFolder);
|
||||
|
||||
if (File.Exists(keysDbFile))
|
||||
{
|
||||
Console.WriteLine("Parsing Key Cache File. (keys.db)");
|
||||
Keys.ReadKeysDb(keysDbFile);
|
||||
}
|
||||
|
||||
Console.WriteLine("Path to pack file: ");
|
||||
string packPath = Console.ReadLine();
|
||||
|
||||
string uuid = Manifest.ReadUUID(Path.Combine(packPath, "manifest.json"));
|
||||
|
||||
byte[] ckey = Keys.LookupKey(uuid);
|
||||
string contentKey = "s5s5ejuDru4uchuF2drUFuthaspAbepE";
|
||||
|
||||
if (ckey == null)
|
||||
ckey = Encoding.UTF8.GetBytes(contentKey);
|
||||
|
||||
if (ckey != null)
|
||||
contentKey = Encoding.UTF8.GetString(ckey);
|
||||
|
||||
Console.WriteLine("uuid: " + uuid);
|
||||
Manifest.SignManifest(packPath);
|
||||
Marketplace.EncryptContents(packPath, uuid, contentKey);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
36
McEncryptor/Properties/AssemblyInfo.cs
Normal file
36
McEncryptor/Properties/AssemblyInfo.cs
Normal file
|
@ -0,0 +1,36 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// 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("McEncryptor")]
|
||||
[assembly: AssemblyDescription("Marketplace Contents Encryptor")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("The Pillager Bay")]
|
||||
[assembly: AssemblyProduct("McEncryptor")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2022")]
|
||||
[assembly: AssemblyTrademark("The Pillager Bay")]
|
||||
[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)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("e3b51165-8ee7-4dee-ad04-cdf1089371a7")]
|
||||
|
||||
// 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")]
|
BIN
McEncryptor/illager.ico
Normal file
BIN
McEncryptor/illager.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.2 KiB |
Loading…
Add table
Add a link
Reference in a new issue