Init commit

This commit is contained in:
raphaeIl
2025-01-08 20:08:36 -05:00
commit f855950370
557 changed files with 233848 additions and 0 deletions

View File

@@ -0,0 +1,92 @@
using Microsoft.AspNetCore.Mvc;
using Newtonsoft.Json;
using Pb;
namespace NTR.SDKServer.Controllers
{
[ApiController]
[Route("/")]
public class LauncherSDKController : ControllerBase
{
private readonly ILogger<LauncherSDKController> _logger;
public LauncherSDKController(ILogger<LauncherSDKController> logger)
{
_logger = logger;
}
[Route("meta/serverlist.html")]
public IActionResult GetConfig()
{
Console.WriteLine("serverlist get received!");
//https://nova-static.yostar.cn/meta/serverlist.html
ServerListMeta serverListMeta = new ServerListMeta()
{
Status = 200,
Announcement = "sdjsldkfsf",
};
var responseContent = System.IO.File.ReadAllBytes("E:\\documents\\Decompiling\\Extracted\\NOVA\\PS\\NTR.SDKServer\\bodyencrypted");
Console.WriteLine("responseContent: " + responseContent);
var responseHeaders = new HeaderDictionary
{
{ "Server", "Tengine" },
{ "Content-Type", "text/html; charset=utf-8" },
{ "Content-Length", responseContent.Length.ToString() },
{ "Connection", "keep-alive" },
{ "Date", DateTime.UtcNow.ToString("R") },
{ "x-oss-request-id", "677E5AB989F0063436699689" },
{ "x-oss-cdn-auth", "success" },
{ "Accept-Ranges", "bytes" },
{ "ETag", "\"F7BF56AF4420F308AE12106BDE15B4A0\"" },
{ "Last-Modified", DateTime.UtcNow.AddHours(-8).ToString("R") },
{ "x-oss-object-type", "Normal" },
{ "x-oss-hash-crc64ecma", "15118450623091409826" },
{ "x-oss-storage-class", "Standard" },
{ "Content-MD5", "979Wr0Qg8wiuEhBr3hW0oA==" },
{ "x-oss-server-time", "50" },
{ "Via", "ens-cache14.l2us3[1761,1761,200-0,M], ens-cache29.l2us3[1762,0], ens-cache15.us23[0,0,200-0,H], ens-cache9.us23[13,0]" },
{ "Age", "17639" },
{ "Ali-Swift-Global-Savetime", "1736334009" },
{ "X-Cache", "HIT TCP_HIT dirn:10:384655405" },
{ "X-Swift-SaveTime", DateTime.UtcNow.ToString("R") },
{ "X-Swift-CacheTime", "93312000" },
{ "Timing-Allow-Origin", "*" },
{ "EagleId", "0826799d17363516484194117e" }
};
//var response = new ContentResult
//{
// Content = responseContent,
// ContentType = "text/html; charset=utf-8",
// StatusCode = 200
//};
//foreach (var header in responseHeaders)
//{
// Response.Headers[header.Key] = header.Value;
//}
return null;
}
[HttpGet("{*catchAll}")]
public IResult CatchAllGet(string catchAll)
{
_logger.LogDebug($"HttpGet: {catchAll}");
return Results.Empty;
}
[HttpPost("{*catchAll}")]
public IResult CatchAllPost(string catchAll)
{
_logger.LogDebug($"HttpGet: {catchAll}");
return Results.Empty;
}
}
}

View File

@@ -0,0 +1,22 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="DotNetZip" Version="1.16.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.2">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="Serilog.AspNetCore" Version="8.0.1" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\NTR.Common\NTR.Common.csproj" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,14 @@
{
"$schema": "http://json.schemastore.org/launchsettings.json",
"profiles": {
"https": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": false,
"externalUrlConfiguration": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}

View File

@@ -0,0 +1,64 @@
using System.Reflection;
using Microsoft.AspNetCore.Server.Kestrel.Core;
using Pb;
using Serilog;
namespace NTR.SDKServer
{
public class SDKServer
{
public static void Main(string[] args)
{
byte[] serverlistResponse = new byte[]
{
8, 37, 18, 56, 10, 12, 229, 144, 175, 230, 152, 142, 230, 181, 139, 232,
175, 149, 18, 36, 104, 116, 116, 112, 115, 58, 47, 47, 110, 111, 118, 97,
46, 121, 111, 115, 116, 97, 114, 46, 99, 110, 47, 97, 103, 101, 110, 116,
45, 122, 111, 110, 101, 45, 49, 47, 24, 1, 32, 1, 24, 1, 34, 52, 230, 181,
139, 232, 175, 149, 229, 176, 154, 230, 156, 170, 229, 188, 128, 229, 167,
139, 239, 188, 140, 233, 162, 132, 232, 174, 161, 229, 188, 128, 230, 156,
141, 230, 151, 182, 233, 151, 180, 49, 230, 156, 136, 57, 230, 151, 165,
49, 49, 58, 48, 48, 50, 30, 104, 116, 116, 112, 115, 58, 47, 47, 110, 111,
118, 97, 46, 121, 111, 115, 116, 97, 114, 46, 99, 110, 47, 114, 101, 112,
111, 114, 116, 47
};
ServerListMeta serverListMeta = ServerListMeta.Parser.ParseFrom(serverlistResponse);
Console.WriteLine(serverListMeta);
System.IO.File.WriteAllText("E:\\documents\\Decompiling\\Extracted\\NOVA\\PS\\NTR.SDKServer\\serverlist.json", serverListMeta.ToString());
return;
Log.Information("Starting SDK Server...");
try
{
var builder = WebApplication.CreateBuilder(args);
builder.Services.Configure<KestrelServerOptions>(op =>
op.AllowSynchronousIO = true
);
builder.Host.UseSerilog();
builder.Services.AddControllers();
builder.Services.AddControllers().AddApplicationPart(Assembly.GetAssembly(typeof(SDKServer)));
var app = builder.Build();
app.UseAuthorization();
app.UseSerilogRequestLogging();
app.MapControllers();
app.Run();
}
catch (Exception ex)
{
Log.Fatal(ex, "An unhandled exception occurred during runtime");
}
finally
{
Log.CloseAndFlush();
}
}
}
}

View File

@@ -0,0 +1,23 @@
{
"Kestrel": {
"EndPoints": {
"Http": {
"Url": "https://0.0.0.0:443"
},
"Https": {
"Url": "https://0.0.0.0:80"
}
}
},
"Serilog": {
"MinimumLevel": {
"Default": "Information",
"Override": {
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information"
}
}
},
"AllowedHosts": "*"
}

View File

@@ -0,0 +1 @@
<EFBFBD>\=H<>Y@2=2<>;<3B>cH<63><48>&9<>S<EFBFBD><53><EFBFBD>B<EFBFBD>o<EFBFBD>{g<><67>8<EFBFBD>3<EFBFBD><33>R<<0F><>N<EFBFBD><0F><>/<1E><>_<EFBFBD><5F><EFBFBD>

View File

@@ -0,0 +1,14 @@
{
"version": "37",
"agent": [
{
"name": "启明测试",
"addr": "https://nova.yostar.cn/agent-zone-1/",
"status": 1,
"zone": "1"
}
],
"status": 1,
"message": "测试尚未开始预计开服时间1月9日11:00",
"reportEndpoint": "https://nova.yostar.cn/report/"
}