mirror of
https://github.com/islehorse/HISP.git
synced 2025-06-04 12:55:08 +12:00
Add Feature pt1
This commit is contained in:
parent
a184e4d735
commit
092534e331
131 changed files with 3113 additions and 1418 deletions
319
HorseIsleServer/N00BS/HTTP/ContentServer.cs
Normal file
319
HorseIsleServer/N00BS/HTTP/ContentServer.cs
Normal file
|
@ -0,0 +1,319 @@
|
|||
using System.Net;
|
||||
using System.Net.Sockets;
|
||||
using System.Text;
|
||||
|
||||
namespace HTTP
|
||||
{
|
||||
class ContentItem
|
||||
{
|
||||
|
||||
public String name;
|
||||
public String filePath;
|
||||
public ContentItem(string Name,string FilePath)
|
||||
{
|
||||
if(File.Exists(FilePath))
|
||||
{
|
||||
filePath = FilePath;
|
||||
name = Name;
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new FileNotFoundException();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class ContentClient
|
||||
{
|
||||
|
||||
public ContentClient(ContentServer Server, Socket ClientSocket)
|
||||
{
|
||||
clientSock = ClientSocket;
|
||||
baseServ = Server;
|
||||
Server.Clients.Add(this);
|
||||
baseServ.WriteDebugOutput("Client Connected @ " + clientSock.RemoteEndPoint.ToString());
|
||||
ProcessRequests();
|
||||
clientSock.Close();
|
||||
|
||||
}
|
||||
|
||||
private ContentServer baseServ;
|
||||
private Socket clientSock;
|
||||
|
||||
|
||||
private byte[] ReadData()
|
||||
{
|
||||
while (clientSock.Available < 1) { }
|
||||
byte[] by = new byte[clientSock.Available];
|
||||
clientSock.Receive(by);
|
||||
return by;
|
||||
}
|
||||
|
||||
private void SendString(string str)
|
||||
{
|
||||
byte[] response = Encoding.UTF8.GetBytes(str);
|
||||
clientSock.Send(response);
|
||||
}
|
||||
|
||||
private string GenerateHeaders(string path, long content_length = 0)
|
||||
{
|
||||
string headers = "";
|
||||
|
||||
if (path == "/")
|
||||
{
|
||||
headers += "HTTP/1.1 200 OK\r\n";
|
||||
headers += "Content-Type: text/html\r\n";
|
||||
headers += "Accept-Ranges: bytes\r\n";
|
||||
headers += "Server: ContentServer\r\n";
|
||||
headers += "Content-Length: " + content_length + "\r\n";
|
||||
headers += "Cache-Control: max-age=0\r\n";
|
||||
headers += "Connection: keep-alive\r\n";
|
||||
headers += "\r\n";
|
||||
}
|
||||
else if (File.Exists(path))
|
||||
{
|
||||
FileInfo info = new FileInfo(path);
|
||||
long length = info.Length;
|
||||
|
||||
if (content_length != 0)
|
||||
length = content_length;
|
||||
|
||||
|
||||
headers += "HTTP/1.1 200 OK\r\n";
|
||||
headers += "Content-Type: application/x-shockwave-flash\r\n";
|
||||
headers += "Accept-Ranges: bytes\r\n";
|
||||
headers += "Server: ContentServer\r\n";
|
||||
headers += "Content-Length: " + length + "\r\n";
|
||||
headers += "Cache-Control: max-age=0\r\n";
|
||||
headers += "Connection: keep-alive\r\n";
|
||||
headers += "\r\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
headers += "HTTP/1.1 404 Not Found\r\n";
|
||||
headers += "Content-Type: text/plain\r\n";
|
||||
headers += "Accept-Ranges: bytes\r\n";
|
||||
headers += "Server: ContentServer\r\n";
|
||||
headers += "Content-Length: " + content_length + "\r\n";
|
||||
headers += "Cache-Control: max-age=3600\r\n";
|
||||
headers += "Connection: keep-alive\r\n";
|
||||
headers += "\r\n";
|
||||
}
|
||||
return headers;
|
||||
}
|
||||
|
||||
private void RespondGet(string path, Dictionary<string, string> query)
|
||||
{
|
||||
baseServ.WriteDebugOutput("GET " + path);
|
||||
string name = path.Remove(0, 1);
|
||||
|
||||
if (ContentItemExists(name))
|
||||
{
|
||||
ContentItem ci = GetContentItem(name);
|
||||
FileStream fs = File.OpenRead(ci.filePath);
|
||||
try
|
||||
{
|
||||
string requestStr = GenerateHeaders(ci.filePath, fs.Length - fs.Position);
|
||||
|
||||
SendString(requestStr);
|
||||
|
||||
while(fs.Position < fs.Length)
|
||||
{
|
||||
int BUFFER_SIZE = 0x8500000;
|
||||
if(fs.Position + BUFFER_SIZE <= fs.Length)
|
||||
{
|
||||
byte[] buffer = new byte[BUFFER_SIZE];
|
||||
fs.Read(buffer, 0x00, BUFFER_SIZE);
|
||||
clientSock.Send(buffer);
|
||||
}
|
||||
else
|
||||
{
|
||||
byte[] buffer = new byte[fs.Length - fs.Position];
|
||||
fs.Read(buffer, 0x00, buffer.Length);
|
||||
clientSock.Send(buffer);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
catch (Exception) {
|
||||
fs.Close();
|
||||
};
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
string body = GeneratePage(path);
|
||||
string requestStr = GenerateHeaders(path, body.Length);
|
||||
requestStr += body;
|
||||
|
||||
SendString(requestStr);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void RespondHead(string path)
|
||||
{
|
||||
string name = Path.GetFileName(path);
|
||||
baseServ.WriteDebugOutput("HEAD " + path);
|
||||
|
||||
if (ContentItemExists(name))
|
||||
{
|
||||
ContentItem ci = GetContentItem(name);
|
||||
string requestStr = GenerateHeaders(ci.filePath);
|
||||
SendString(requestStr);
|
||||
}
|
||||
else
|
||||
{
|
||||
string body = GeneratePage(path);
|
||||
string requestStr = GenerateHeaders(path, body.Length);
|
||||
SendString(requestStr);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private bool ContentItemExists(string name)
|
||||
{
|
||||
bool exists = false;
|
||||
|
||||
|
||||
foreach (ContentItem ci in baseServ.Contents)
|
||||
{
|
||||
if (ci.name == name)
|
||||
{
|
||||
exists = true;
|
||||
}
|
||||
}
|
||||
return exists;
|
||||
}
|
||||
|
||||
private ContentItem GetContentItem(string name)
|
||||
{
|
||||
|
||||
foreach (ContentItem ci in baseServ.Contents)
|
||||
{
|
||||
if (ci.name == name)
|
||||
{
|
||||
return ci;
|
||||
}
|
||||
}
|
||||
throw new FileNotFoundException();
|
||||
}
|
||||
|
||||
private string GeneratePage(string path)
|
||||
{
|
||||
if (path == "/")
|
||||
{
|
||||
string body = "Content Downloader Server.<br>Open this url in PSVita's \"Content Downloader\" To view avalible files.";
|
||||
foreach (ContentItem content in baseServ.Contents)
|
||||
{
|
||||
body += "<a href=\"" + content.name + "\"></a>";
|
||||
}
|
||||
|
||||
return body;
|
||||
}
|
||||
else
|
||||
{
|
||||
string body = "File not found.";
|
||||
return body;
|
||||
}
|
||||
}
|
||||
|
||||
private string ExtractPath(string relativeUri)
|
||||
{
|
||||
int questionIndex = relativeUri.IndexOf("?");
|
||||
if (questionIndex != -1)
|
||||
return relativeUri.Substring(0, questionIndex);
|
||||
else
|
||||
return relativeUri;
|
||||
}
|
||||
private Dictionary<string,string> ExtractQuery(string relativeUri)
|
||||
{
|
||||
int questionIndex = relativeUri.IndexOf("?");
|
||||
if (questionIndex != -1)
|
||||
{
|
||||
string[] queryStrList = relativeUri.Substring(questionIndex + 1).Split('&');
|
||||
Dictionary<string,string> queryDict = new Dictionary<string, string>();
|
||||
foreach(string queryStr in queryStrList)
|
||||
{
|
||||
string[] qStr = queryStr.Split('=');
|
||||
queryDict.Add(qStr[0], qStr[1]);
|
||||
}
|
||||
return queryDict;
|
||||
}
|
||||
else
|
||||
return new Dictionary<string, string>();
|
||||
}
|
||||
private string ExtractRelativeUrl(string header)
|
||||
{
|
||||
return header.Split(' ')[1];
|
||||
}
|
||||
private void ProcessRequests()
|
||||
{
|
||||
byte[] data = ReadData();
|
||||
|
||||
// Parse Request
|
||||
|
||||
string curReq = Encoding.UTF8.GetString(data);
|
||||
|
||||
curReq = curReq.Replace("\r\n", "\n");
|
||||
string[] reqLines = curReq.Split('\n');
|
||||
foreach (string line in reqLines)
|
||||
{
|
||||
if (line.StartsWith("GET"))
|
||||
{
|
||||
string relUrl = ExtractRelativeUrl(line);
|
||||
string path = ExtractPath(relUrl);
|
||||
Dictionary<string,string> query = ExtractQuery(relUrl);
|
||||
RespondGet(path, query);
|
||||
return;
|
||||
}
|
||||
else if (line.StartsWith("HEAD"))
|
||||
{
|
||||
string relUrl = ExtractRelativeUrl(line);
|
||||
string path = ExtractPath(relUrl);
|
||||
RespondHead(path);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
class ContentServer
|
||||
{
|
||||
public List<ContentItem> Contents = new List<ContentItem>();
|
||||
public List<ContentClient> Clients = new List<ContentClient>();
|
||||
|
||||
public void WriteDebugOutput(string txt)
|
||||
{
|
||||
Console.WriteLine("[HTTP] "+txt);
|
||||
}
|
||||
|
||||
public ContentServer()
|
||||
{
|
||||
|
||||
new Thread(() =>
|
||||
{
|
||||
WriteDebugOutput("Listening for connections on port 12515.");
|
||||
IPEndPoint localEndPoint = new IPEndPoint(IPAddress.Parse("0.0.0.0"), 12515);
|
||||
Socket newsock = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
|
||||
newsock.Bind(localEndPoint);
|
||||
newsock.Listen(20);
|
||||
|
||||
while(true)
|
||||
{
|
||||
Socket clientSock = newsock.Accept();
|
||||
|
||||
new Thread(() =>
|
||||
{
|
||||
ContentClient client = new ContentClient(this, clientSock);
|
||||
Clients.Remove(client);
|
||||
}).Start();
|
||||
}
|
||||
|
||||
}).Start();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
20
HorseIsleServer/N00BS/N00BS.csproj
Normal file
20
HorseIsleServer/N00BS/N00BS.csproj
Normal file
|
@ -0,0 +1,20 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net6.0-windows</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<StartupObject>HISP.Program</StartupObject>
|
||||
<ApplicationIcon>icon.ico</ApplicationIcon>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Include="icon.ico" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\LibHISP\LibHISP.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
77
HorseIsleServer/N00BS/Program.cs
Normal file
77
HorseIsleServer/N00BS/Program.cs
Normal file
|
@ -0,0 +1,77 @@
|
|||
// An HTTP Server, and Horse Isle Server, Flash Player, in a single package
|
||||
// Idea is to just be open and play.
|
||||
|
||||
using HISP.Security;
|
||||
using HISP.Server;
|
||||
using HTTP;
|
||||
using System.Diagnostics;
|
||||
using System.Reflection;
|
||||
|
||||
namespace HISP
|
||||
{
|
||||
public static class Program
|
||||
{
|
||||
private static string baseDir;
|
||||
private static ContentServer cs;
|
||||
private static void addToList(string path)
|
||||
{
|
||||
string Name = path.Remove(0, Path.Combine(baseDir, "client").Length+1);
|
||||
Name = Name.Replace("\\", "/");
|
||||
|
||||
ContentItem ci = new ContentItem(Name, path);
|
||||
cs.Contents.Add(ci);
|
||||
|
||||
}
|
||||
|
||||
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
baseDir = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
|
||||
|
||||
ConfigReader.OpenConfig();
|
||||
if (File.Exists(ConfigReader.ConfigurationFileName))
|
||||
File.WriteAllText(ConfigReader.ConfigurationFileName, File.ReadAllText(ConfigReader.ConfigurationFileName).Replace("sql_lite=false", "sql_lite=true"));
|
||||
|
||||
Database.OpenDatabase();
|
||||
if(Database.GetUsers().Length == 0)
|
||||
{
|
||||
Console.Write("Username: ");
|
||||
string username = Console.ReadLine();
|
||||
Console.Write("Password: ");
|
||||
string password = Console.ReadLine();
|
||||
Console.Write("Gender: ");
|
||||
string gender = Console.ReadLine();
|
||||
|
||||
Random r = new Random();
|
||||
byte[] salt = new byte[64];
|
||||
|
||||
r.NextBytes(salt);
|
||||
|
||||
string saltText = BitConverter.ToString(salt).Replace("-", "");
|
||||
|
||||
string hashsalt = BitConverter.ToString(Authentication.HashAndSalt(password, salt)).Replace("-", "");
|
||||
|
||||
Database.CreateUser(0, username, hashsalt, saltText, gender, true, true);
|
||||
}
|
||||
|
||||
// Start Web Server
|
||||
cs = new ContentServer();
|
||||
string[] fileList = Directory.GetFiles(Path.Combine(baseDir, "client"), "*", SearchOption.AllDirectories);
|
||||
foreach (string file in fileList)
|
||||
addToList(file);
|
||||
|
||||
// Start HI1 Server
|
||||
Logger.SetCallback(Console.WriteLine);
|
||||
Start.InitalizeAndStart();
|
||||
|
||||
// Start Flash (Windows)
|
||||
Process p = new Process();
|
||||
p.StartInfo.FileName = Path.Combine(baseDir, "flash.dll");
|
||||
p.StartInfo.Arguments = "http://127.0.0.1:12515/horseisle.swf?SERVER=127.0.0.1&PORT=12321";
|
||||
p.Start();
|
||||
|
||||
while (true) { /* Allow asyncronous operations to happen. */ };
|
||||
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
-->
|
||||
<Project ToolsVersion="4.0">
|
||||
<PropertyGroup>
|
||||
<Configuration>Linux</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
<PublishDir>bin\x64\Linux\net6.0\linux-x64\publish\</PublishDir>
|
||||
<PublishProtocol>FileSystem</PublishProtocol>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<RuntimeIdentifier>linux-x64</RuntimeIdentifier>
|
||||
<SelfContained>True</SelfContained>
|
||||
<PublishSingleFile>True</PublishSingleFile>
|
||||
<PublishReadyToRun>True</PublishReadyToRun>
|
||||
<PublishTrimmed>True</PublishTrimmed>
|
||||
<DefineConstants>OS_LINUX;ARCH_X86_64</DefineConstants>
|
||||
</PropertyGroup>
|
||||
</Project>
|
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
-->
|
||||
<Project ToolsVersion="4.0">
|
||||
<PropertyGroup>
|
||||
<Configuration>Linux</Configuration>
|
||||
<Platform>ARM</Platform>
|
||||
<PublishDir>bin\ARM\Linux\net6.0\linux-arm\publish\</PublishDir>
|
||||
<PublishProtocol>FileSystem</PublishProtocol>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<RuntimeIdentifier>linux-arm</RuntimeIdentifier>
|
||||
<SelfContained>True</SelfContained>
|
||||
<PublishSingleFile>True</PublishSingleFile>
|
||||
<PublishReadyToRun>True</PublishReadyToRun>
|
||||
<PublishTrimmed>True</PublishTrimmed>
|
||||
<DefineConstants>OS_LINUX;ARCH_ARM</DefineConstants>
|
||||
</PropertyGroup>
|
||||
</Project>
|
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
-->
|
||||
<Project ToolsVersion="4.0">
|
||||
<PropertyGroup>
|
||||
<Configuration>Linux</Configuration>
|
||||
<Platform>ARM64</Platform>
|
||||
<PublishDir>bin\ARM64\Linux\net6.0\linux-arm64\publish\</PublishDir>
|
||||
<PublishProtocol>FileSystem</PublishProtocol>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<RuntimeIdentifier>linux-arm64</RuntimeIdentifier>
|
||||
<SelfContained>True</SelfContained>
|
||||
<PublishSingleFile>True</PublishSingleFile>
|
||||
<PublishReadyToRun>True</PublishReadyToRun>
|
||||
<PublishTrimmed>True</PublishTrimmed>
|
||||
<DefineConstants>OS_LINUX;ARCH_ARM64</DefineConstants>
|
||||
</PropertyGroup>
|
||||
</Project>
|
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
-->
|
||||
<Project ToolsVersion="4.0">
|
||||
<PropertyGroup>
|
||||
<Configuration>MacOS</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
<PublishDir>bin\x64\MacOS\net6.0\osx-x64\publish\</PublishDir>
|
||||
<PublishProtocol>FileSystem</PublishProtocol>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<RuntimeIdentifier>osx-x64</RuntimeIdentifier>
|
||||
<SelfContained>True</SelfContained>
|
||||
<PublishSingleFile>True</PublishSingleFile>
|
||||
<PublishReadyToRun>True</PublishReadyToRun>
|
||||
<PublishTrimmed>True</PublishTrimmed>
|
||||
<DefineConstants>OS_MACOS;ARCH_X86_64</DefineConstants>
|
||||
</PropertyGroup>
|
||||
</Project>
|
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
-->
|
||||
<Project ToolsVersion="4.0">
|
||||
<PropertyGroup>
|
||||
<Configuration>MacOS</Configuration>
|
||||
<Platform>ARM64</Platform>
|
||||
<PublishDir>bin\arm64\MacOS\net6.0\osx-arm64\publish\</PublishDir>
|
||||
<PublishProtocol>FileSystem</PublishProtocol>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<RuntimeIdentifier>osx-arm64</RuntimeIdentifier>
|
||||
<SelfContained>True</SelfContained>
|
||||
<PublishSingleFile>True</PublishSingleFile>
|
||||
<PublishReadyToRun>True</PublishReadyToRun>
|
||||
<PublishTrimmed>True</PublishTrimmed>
|
||||
<DefineConstants>OS_MACOS;ARCH_ARM64</DefineConstants>
|
||||
</PropertyGroup>
|
||||
</Project>
|
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
-->
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration>Windows</Configuration>
|
||||
<Platform>x86</Platform>
|
||||
<PublishDir>bin\x86\Windows\net6.0\win-x86\publish\</PublishDir>
|
||||
<PublishProtocol>FileSystem</PublishProtocol>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<RuntimeIdentifier>win-x86</RuntimeIdentifier>
|
||||
<SelfContained>True</SelfContained>
|
||||
<PublishSingleFile>True</PublishSingleFile>
|
||||
<PublishReadyToRun>True</PublishReadyToRun>
|
||||
<PublishTrimmed>True</PublishTrimmed>
|
||||
<DefineConstants>OS_WINDOWS;ARCH_X86</DefineConstants>
|
||||
</PropertyGroup>
|
||||
</Project>
|
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
-->
|
||||
<Project ToolsVersion="4.0">
|
||||
<PropertyGroup>
|
||||
<Configuration>Windows</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
<PublishDir>bin\x64\Windows\net6.0\win-x64\publish\</PublishDir>
|
||||
<PublishProtocol>FileSystem</PublishProtocol>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
|
||||
<SelfContained>True</SelfContained>
|
||||
<PublishSingleFile>True</PublishSingleFile>
|
||||
<PublishReadyToRun>True</PublishReadyToRun>
|
||||
<PublishTrimmed>True</PublishTrimmed>
|
||||
<DefineConstants>OS_WINDOWS;ARCH_X86_64</DefineConstants>
|
||||
</PropertyGroup>
|
||||
</Project>
|
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
-->
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration>Windows</Configuration>
|
||||
<Platform>ARM</Platform>
|
||||
<PublishDir>bin\arm\Windows\net6.0\windows-arm\publish\</PublishDir>
|
||||
<PublishProtocol>FileSystem</PublishProtocol>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<RuntimeIdentifier>win-arm</RuntimeIdentifier>
|
||||
<SelfContained>True</SelfContained>
|
||||
<PublishSingleFile>True</PublishSingleFile>
|
||||
<PublishReadyToRun>True</PublishReadyToRun>
|
||||
<PublishTrimmed>True</PublishTrimmed>
|
||||
<DefineConstants>OS_WINDOWS;ARCH_ARM</DefineConstants>
|
||||
</PropertyGroup>
|
||||
</Project>
|
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
-->
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration>Windows</Configuration>
|
||||
<Platform>ARM64</Platform>
|
||||
<PublishDir>bin\arm64\Windows\net6.0\windows-arm64\publish\</PublishDir>
|
||||
<PublishProtocol>FileSystem</PublishProtocol>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<RuntimeIdentifier>win-arm64</RuntimeIdentifier>
|
||||
<SelfContained>True</SelfContained>
|
||||
<PublishSingleFile>True</PublishSingleFile>
|
||||
<PublishReadyToRun>True</PublishReadyToRun>
|
||||
<PublishTrimmed>True</PublishTrimmed>
|
||||
<DefineConstants>OS_WINDOWS;ARCH_ARM64</DefineConstants>
|
||||
</PropertyGroup>
|
||||
</Project>
|
118
HorseIsleServer/N00BS/Properties/Resources.Designer.cs
generated
Normal file
118
HorseIsleServer/N00BS/Properties/Resources.Designer.cs
generated
Normal file
|
@ -0,0 +1,118 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <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 HISP.Properties {
|
||||
using System;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A strongly-typed resource public class, for looking up localized strings, etc.
|
||||
/// </summary>
|
||||
// This public class was auto-generated by the StronglyTypedResourceBuilder
|
||||
// public 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", "16.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 public 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("HISP.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 public class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
set {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to <cross-domain-policy>
|
||||
/// <allow-access-from domain="*" to-ports="12321" secure="false"/>
|
||||
///</cross-domain-policy>.
|
||||
/// </summary>
|
||||
internal static string DefaultCrossDomain {
|
||||
get {
|
||||
return ResourceManager.GetString("DefaultCrossDomain", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to # HorseIsleServer Default Configuration File
|
||||
///
|
||||
///# Ip address the server will bind to (default: 0.0.0.0 ALL INTERFACES)
|
||||
///ip=0.0.0.0
|
||||
///# Port the server will bind to (default: 12321)
|
||||
///port=12321
|
||||
///
|
||||
///# MariaDB Database
|
||||
///db_ip=127.0.0.1
|
||||
///db_name=beta
|
||||
///db_username=root
|
||||
///db_password=test123
|
||||
///db_port=3306
|
||||
///
|
||||
///# Map Data
|
||||
///map=HI1.MAP
|
||||
///
|
||||
///# JSON Format Data
|
||||
///
|
||||
///gamedata=gamedata.json
|
||||
///
|
||||
///# Cross-Domain Policy File
|
||||
///crossdomain=CrossDomainPolicy.xml
|
||||
///
|
||||
///# Red Text Stating "Todays Note:"
|
||||
///motd=April 11, 2020. New breed, C [rest of string was truncated]";.
|
||||
/// </summary>
|
||||
internal static string DefaultServerProperties {
|
||||
get {
|
||||
return ResourceManager.GetString("DefaultServerProperties", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// UNKNOWN COMMIT HASH
|
||||
/// </summary>
|
||||
internal static string GitCommit {
|
||||
get {
|
||||
return ResourceManager.GetString("GitCommit", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
120
HorseIsleServer/N00BS/Properties/Resources.resx
Normal file
120
HorseIsleServer/N00BS/Properties/Resources.resx
Normal file
|
@ -0,0 +1,120 @@
|
|||
<?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.Runtime.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:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<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" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</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" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</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=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
7
HorseIsleServer/N00BS/Properties/launchSettings.json
Normal file
7
HorseIsleServer/N00BS/Properties/launchSettings.json
Normal file
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"profiles": {
|
||||
"HISP": {
|
||||
"commandName": "Project"
|
||||
}
|
||||
}
|
||||
}
|
BIN
HorseIsleServer/N00BS/icon.ico
Normal file
BIN
HorseIsleServer/N00BS/icon.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.6 KiB |
Loading…
Add table
Add a link
Reference in a new issue