RC4 part 2

This commit is contained in:
Bitl 2019-06-16 07:51:03 -07:00
parent 4934e161e9
commit 5396bc8ded
25 changed files with 602 additions and 70 deletions

View File

@ -0,0 +1,83 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Build">
<PropertyGroup>
<ProjectGuid>{BAC99C87-F6C1-4ED0-AA2E-05C6AE8979EA}</ProjectGuid>
<ProjectTypeGuids>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<Configuration Condition=" '$(Configuration)' == '' ">Release</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<OutputType>Exe</OutputType>
<RootNamespace>NovetusCMD</RootNamespace>
<AssemblyName>NovetusCMD</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<AppDesignerFolder>Properties</AppDesignerFolder>
<NoWin32Manifest>False</NoWin32Manifest>
<AllowUnsafeBlocks>False</AllowUnsafeBlocks>
<NoStdLib>False</NoStdLib>
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
<IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
<WarningLevel>4</WarningLevel>
<ApplicationIcon>Resources\NovetusIcon.ico</ApplicationIcon>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'AnyCPU' ">
<PlatformTarget>x86</PlatformTarget>
<BaseAddress>4194304</BaseAddress>
<RegisterForComInterop>False</RegisterForComInterop>
<GenerateSerializationAssemblies>Auto</GenerateSerializationAssemblies>
<FileAlignment>4096</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<OutputPath>bin\Debug\</OutputPath>
<DebugSymbols>True</DebugSymbols>
<DebugType>Full</DebugType>
<Optimize>False</Optimize>
<CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>
<DefineConstants>DEBUG;TRACE;NOVETUS_APPS</DefineConstants>
<BaseIntermediateOutputPath>obj\</BaseIntermediateOutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<OutputPath>bin\Release\</OutputPath>
<DebugSymbols>False</DebugSymbols>
<DebugType>None</DebugType>
<Optimize>True</Optimize>
<CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
<DefineConstants>TRACE;NOVETUS_APPS</DefineConstants>
<BaseIntermediateOutputPath>obj\</BaseIntermediateOutputPath>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.CSharp">
<RequiredTargetFramework>4.0</RequiredTargetFramework>
</Reference>
<Reference Include="Mono.Nat">
<HintPath>..\packages\Mono.Nat.1.2.24.0\lib\net40\Mono.Nat.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Data" />
<Reference Include="System.Data.DataSetExtensions">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
<Reference Include="System.Xml.Linq">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\NovetusShared\NovetusShared.csproj">
<Project>{759bfc2b-c130-4a2a-a01f-65abfee85b4c}</Project>
<Name>NovetusShared</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

View File

@ -0,0 +1,329 @@
/*
* Created by SharpDevelop.
* User: Bitl
* Date: 6/15/2019
* Time: 5:10 PM
*
* To change this template use Tools | Options | Coding | Edit Standard Headers.
*/
using System;
using Mono.Nat;
using NovetusShared;
using System.Diagnostics;
using System.IO;
using System.ComponentModel;
using System.Reflection;
namespace NovetusCMD
{
class Program
{
public static void InitUPnP()
{
if (GlobalVars.UPnP == true)
{
try
{
UPnP.InitUPnP(DeviceFound,DeviceLost);
ConsolePrint("UPnP: Service initialized", 3);
}
catch (Exception ex)
{
ConsolePrint("UPnP: Unable to initialize UPnP. Reason - " + ex.Message, 2);
}
}
}
public static void StartUPnP(INatDevice device, Protocol protocol, int port)
{
if (GlobalVars.UPnP == true)
{
try
{
UPnP.StartUPnP(device,protocol,port);
ConsolePrint("UPnP: Port " + port + " opened on '" + device.GetExternalIP() + "' (" + protocol.ToString() + ")", 3);
}
catch (Exception ex)
{
ConsolePrint("UPnP: Unable to open port mapping. Reason - " + ex.Message, 2);
}
}
}
public static void StopUPnP(INatDevice device, Protocol protocol, int port)
{
if (GlobalVars.UPnP == true)
{
try
{
UPnP.StopUPnP(device,protocol,port);
ConsolePrint("UPnP: Port " + port + " closed on '" + device.GetExternalIP() + "' (" + protocol.ToString() + ")", 3);
}
catch (Exception ex)
{
ConsolePrint("UPnP: Unable to close port mapping. Reason - " + ex.Message, 2);
}
}
}
private static void DeviceFound(object sender, DeviceEventArgs args)
{
try
{
INatDevice device = args.Device;
ConsolePrint("UPnP: Device '" + device.GetExternalIP() + "' registered.", 3);
StartUPnP(device, Protocol.Udp, GlobalVars.RobloxPort);
StartUPnP(device, Protocol.Tcp, GlobalVars.RobloxPort);
StartUPnP(device, Protocol.Udp, GlobalVars.WebServer_Port);
StartUPnP(device, Protocol.Tcp, GlobalVars.WebServer_Port);
}
catch (Exception ex)
{
ConsolePrint("UPnP: Unable to register device. Reason - " + ex.Message, 2);
}
}
private static void DeviceLost(object sender, DeviceEventArgs args)
{
try
{
INatDevice device = args.Device;
ConsolePrint("UPnP: Device '" + device.GetExternalIP() + "' disconnected.", 3);
StopUPnP(device, Protocol.Udp, GlobalVars.RobloxPort);
StopUPnP(device, Protocol.Tcp, GlobalVars.RobloxPort);
StopUPnP(device, Protocol.Udp, GlobalVars.WebServer_Port);
StopUPnP(device, Protocol.Tcp, GlobalVars.WebServer_Port);
}
catch (Exception ex)
{
ConsolePrint("UPnP: Unable to disconnect device. Reason - " + ex.Message, 2);
}
}
static void StartWebServer()
{
if (SecurityFuncs.IsElevated)
{
try
{
GlobalVars.WebServer = new SimpleHTTPServer(GlobalVars.DataPath, GlobalVars.WebServer_Port);
ConsolePrint("WebServer: Server is running on port: " + GlobalVars.WebServer.Port.ToString(), 3);
}
catch (Exception ex)
{
ConsolePrint("WebServer: Failed to launch WebServer. Some features may not function. (" + ex.Message + ")", 2);
}
}
else
{
ConsolePrint("WebServer: Failed to launch WebServer. Some features may not function. (Did not run as Administrator)", 2);
}
}
static void StopWebServer()
{
if (SecurityFuncs.IsElevated)
{
try
{
ConsolePrint("WebServer: Server has stopped on port: " + GlobalVars.WebServer.Port.ToString(), 2);
GlobalVars.WebServer.Stop();
}
catch (Exception ex)
{
ConsolePrint("WebServer: Failed to stop WebServer. Some features may not function. (" + ex.Message + ")", 2);
}
}
else
{
ConsolePrint("WebServer: Failed to stop WebServer. Some features may not function. (Did not run as Administrator)", 2);
}
}
static void WriteConfigValues()
{
LauncherFuncs.WriteConfigValues(GlobalVars.ConfigDir + "\\config.ini");
ConsolePrint("Config Saved.", 3);
}
static void ProgramClose(object sender, EventArgs e)
{
WriteConfigValues();
if (GlobalVars.IsWebServerOn == true)
{
StopWebServer();
}
}
static void ReadConfigValues()
{
LauncherFuncs.ReadConfigValues(GlobalVars.ConfigDir + "\\config.ini");
if (GlobalVars.UserID == 0)
{
LauncherFuncs.GeneratePlayerID();
WriteConfigValues();
}
if (GlobalVars.PlayerLimit == 0)
{
//We need at least a limit of 12 players.
GlobalVars.PlayerLimit = 12;
}
ConsolePrint("Config loaded.", 3);
ReadClientValues(GlobalVars.SelectedClient);
}
static void ReadClientValues(string ClientName)
{
string clientpath = GlobalVars.ClientDir + @"\\" + ClientName + @"\\clientinfo.nov";
if (!File.Exists(clientpath))
{
ConsolePrint("ERROR 1 - No clientinfo.nov detected with the client you chose. The client either cannot be loaded, or it is not available.", 2);
GlobalVars.SelectedClient = GlobalVars.DefaultClient;
}
LauncherFuncs.ReadClientValues(clientpath);
ConsolePrint("Client '" + GlobalVars.SelectedClient + "' successfully loaded.", 3);
}
public static void Main(string[] args)
{
if (args.Length == 0)
{
ConsolePrint("NovetusCMD will use values defined from the launcher. If you want to define values for NovetusCMD, change the settings on the launcher through the 'Host' tab.", 5);
}
string[] lines = File.ReadAllLines(GlobalVars.ConfigDir + "\\info.txt"); //File is in System.IO
string version = lines[0];
GlobalVars.DefaultClient = lines[1];
GlobalVars.DefaultMap = lines[2];
GlobalVars.SelectedClient = GlobalVars.DefaultClient;
GlobalVars.Map = GlobalVars.DefaultMap;
Console.Title = "Novetus " + version;
ConsolePrint("Novetus version " + version + " loaded. Initializing config.", 4);
if (!File.Exists(GlobalVars.ConfigDir + "\\config.ini"))
{
ConsolePrint("WARNING 2 - config.ini not found. Creating one with default values.", 5);
WriteConfigValues();
}
GlobalVars.Version = version;
ReadConfigValues();
InitUPnP();
StartWebServer();
AppDomain.CurrentDomain.ProcessExit += new EventHandler(ProgramClose);
StartServer(true);
Console.ReadKey();
}
static void StartServer(bool no3d)
{
string luafile = "";
if (!GlobalVars.FixScriptMapMode)
{
luafile = "rbxasset://scripts\\\\" + GlobalVars.ScriptName + ".lua";
}
else
{
luafile = GlobalVars.ClientDir + @"\\" + GlobalVars.SelectedClient + @"\\content\\scripts\\" + GlobalVars.ScriptGenName + ".lua";
}
string mapfile = GlobalVars.MapsDir + @"\\" + TreeNodeHelper.GetFolderNameFromPrefix(GlobalVars.Map) + GlobalVars.Map;
string rbxexe = "";
if (GlobalVars.LegacyMode == true)
{
rbxexe = GlobalVars.ClientDir + @"\\" + GlobalVars.SelectedClient + @"\\RobloxApp.exe";
}
else
{
rbxexe = GlobalVars.ClientDir + @"\\" + GlobalVars.SelectedClient + @"\\RobloxApp_server.exe";
}
string quote = "\"";
string args = "";
if (GlobalVars.CustomArgs.Equals("%args%"))
{
if (!GlobalVars.FixScriptMapMode)
{
args = quote + mapfile + "\" -script \"dofile('" + luafile + "'); " + ScriptGenerator.GetScriptFuncForType(ScriptGenerator.ScriptType.Server, GlobalVars.SelectedClient) + quote + (no3d ? " -no3d" : "");
}
else
{
ScriptGenerator.GenerateScriptForClient(ScriptGenerator.ScriptType.Server, GlobalVars.SelectedClient);
args = "-script " + quote + luafile + quote + (no3d ? " -no3d" : "") + " " + quote + mapfile + quote;
}
}
else
{
if (!no3d)
{
args = ClientScript.CompileScript(GlobalVars.CustomArgs, "<server>", "</server>", mapfile, luafile, rbxexe);
}
else
{
args = ClientScript.CompileScript(GlobalVars.CustomArgs, "<no3d>", "</no3d>", mapfile, luafile, rbxexe);
}
}
try
{
//when we add upnp, change this
ConsolePrint("Server Loaded.", 4);
Process client = new Process();
client.StartInfo.FileName = rbxexe;
client.StartInfo.Arguments = args;
client.EnableRaisingEvents = true;
ReadClientValues(GlobalVars.SelectedClient);
client.Exited += new EventHandler(ServerExited);
client.Start();
SecurityFuncs.RenameWindow(client, ScriptGenerator.ScriptType.Server);
}
catch (Exception ex)
{
ConsolePrint("ERROR 2 - Failed to launch Novetus. (" + ex.Message + ")", 2);
}
}
static void ServerExited(object sender, EventArgs e)
{
Environment.Exit(0);
}
static void ConsolePrint(string text, int type)
{
ConsoleText("[" + DateTime.Now.ToShortTimeString() + "] - ", ConsoleColor.White);
if (type == 1)
{
ConsoleText(text, ConsoleColor.White);
}
else if (type == 2)
{
ConsoleText(text, ConsoleColor.Red);
}
else if (type == 3)
{
ConsoleText(text, ConsoleColor.Green);
}
else if (type == 4)
{
ConsoleText(text, ConsoleColor.Cyan);
}
else if (type == 5)
{
ConsoleText(text, ConsoleColor.Yellow);
}
ConsoleText(Environment.NewLine, ConsoleColor.White);
}
static void ConsoleText(string text, ConsoleColor color)
{
Console.ForegroundColor = color;
Console.Write(text);
}
}
}

View File

@ -0,0 +1,31 @@
#region Using directives
using System;
using System.Reflection;
using System.Runtime.InteropServices;
#endregion
// 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("NovetusCMD")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("NovetusCMD")]
[assembly: AssemblyCopyright("Copyright 2019")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// This sets the default COM visibility of types in the assembly to invisible.
// If you need to expose a type to COM, use [ComVisible(true)] on that type.
[assembly: ComVisible(false)]
// The assembly version has following format :
//
// Major.Minor.Build.Revision
//
// You can specify all the values or you can use the default the Revision and
// Build Numbers by using the '*' as shown below:
[assembly: AssemblyVersion("1.0.*")]

Binary file not shown.

After

Width:  |  Height:  |  Size: 130 KiB

View File

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

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Mono.Nat" version="1.2.24.0" targetFramework="net40" />
</packages>

View File

@ -4,6 +4,10 @@ Microsoft Visual Studio Solution File, Format Version 11.00
# SharpDevelop 5.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NovetusLauncher", "NovetusLauncher\NovetusLauncher.csproj", "{F92FFBED-2767-4676-9711-BB89CDA58A43}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NovetusCMD", "NovetusCMD\NovetusCMD.csproj", "{BAC99C87-F6C1-4ED0-AA2E-05C6AE8979EA}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NovetusShared", "NovetusShared\NovetusShared.csproj", "{759BFC2B-C130-4A2A-A01F-65ABFEE85B4C}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@ -14,5 +18,13 @@ Global
{F92FFBED-2767-4676-9711-BB89CDA58A43}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F92FFBED-2767-4676-9711-BB89CDA58A43}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F92FFBED-2767-4676-9711-BB89CDA58A43}.Release|Any CPU.Build.0 = Release|Any CPU
{BAC99C87-F6C1-4ED0-AA2E-05C6AE8979EA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BAC99C87-F6C1-4ED0-AA2E-05C6AE8979EA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BAC99C87-F6C1-4ED0-AA2E-05C6AE8979EA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BAC99C87-F6C1-4ED0-AA2E-05C6AE8979EA}.Release|Any CPU.Build.0 = Release|Any CPU
{759BFC2B-C130-4A2A-A01F-65ABFEE85B4C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{759BFC2B-C130-4A2A-A01F-65ABFEE85B4C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{759BFC2B-C130-4A2A-A01F-65ABFEE85B4C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{759BFC2B-C130-4A2A-A01F-65ABFEE85B4C}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobal

View File

@ -16,6 +16,7 @@ using System.Text;
using System.Text.RegularExpressions;
using System.Diagnostics;
using System.ComponentModel;
using NovetusShared;
namespace NovetusLauncher
{

View File

@ -10,6 +10,7 @@ using System;
using System.Drawing;
using System.Windows.Forms;
using System.IO;
using NovetusShared;
namespace NovetusLauncher
{

View File

@ -12,6 +12,7 @@ using System.Windows.Forms;
using System.IO;
using System.Diagnostics;
using System.Threading;
using NovetusShared;
namespace NovetusLauncher
{

View File

@ -13,6 +13,7 @@ using System.Net;
using System.IO;
using System.Reflection;
using System.ComponentModel;
using NovetusShared;
namespace NovetusLauncher
{

View File

@ -16,6 +16,7 @@ using System.Reflection;
using System.Security.Cryptography;
using System.Text;
using System.Text.RegularExpressions;
using NovetusShared;
namespace NovetusLauncher
{

View File

@ -57,7 +57,6 @@ namespace NovetusLauncher
this.button6 = new System.Windows.Forms.Button();
this.textBox3 = new System.Windows.Forms.TextBox();
this.treeView1 = new System.Windows.Forms.TreeView();
this.checkBox2 = new System.Windows.Forms.CheckBox();
this.button23 = new System.Windows.Forms.Button();
this.button22 = new System.Windows.Forms.Button();
this.numericUpDown3 = new System.Windows.Forms.NumericUpDown();
@ -313,7 +312,6 @@ namespace NovetusLauncher
this.tabPage2.Controls.Add(this.button6);
this.tabPage2.Controls.Add(this.textBox3);
this.tabPage2.Controls.Add(this.treeView1);
this.tabPage2.Controls.Add(this.checkBox2);
this.tabPage2.Controls.Add(this.button23);
this.tabPage2.Controls.Add(this.button22);
this.tabPage2.Controls.Add(this.numericUpDown3);
@ -346,7 +344,7 @@ namespace NovetusLauncher
//
// checkBox4
//
this.checkBox4.Location = new System.Drawing.Point(152, 198);
this.checkBox4.Location = new System.Drawing.Point(152, 187);
this.checkBox4.Name = "checkBox4";
this.checkBox4.Size = new System.Drawing.Size(104, 17);
this.checkBox4.TabIndex = 57;
@ -382,16 +380,6 @@ namespace NovetusLauncher
this.treeView1.TabIndex = 54;
this.treeView1.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.TreeView1AfterSelect);
//
// checkBox2
//
this.checkBox2.Location = new System.Drawing.Point(152, 182);
this.checkBox2.Name = "checkBox2";
this.checkBox2.Size = new System.Drawing.Size(134, 16);
this.checkBox2.TabIndex = 53;
this.checkBox2.Text = "Disable Teapot Turret";
this.checkBox2.UseVisualStyleBackColor = true;
this.checkBox2.CheckedChanged += new System.EventHandler(this.CheckBox2CheckedChanged);
//
// button23
//
this.button23.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
@ -1079,7 +1067,6 @@ namespace NovetusLauncher
private System.Windows.Forms.Label label7;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.TabPage tabPage5;
private System.Windows.Forms.CheckBox checkBox2;
private System.Windows.Forms.Button button23;
private System.Windows.Forms.Button button22;
private System.Windows.Forms.Button button7;

View File

@ -15,6 +15,7 @@ using System.Diagnostics;
using System.ComponentModel;
using System.Reflection;
using Mono.Nat;
using NovetusShared;
namespace NovetusLauncher
{
@ -411,7 +412,6 @@ namespace NovetusLauncher
numericUpDown2.Value = Convert.ToDecimal(GlobalVars.RobloxPort);
label37.Text = GlobalVars.IP;
label38.Text = GlobalVars.RobloxPort.ToString();
checkBox2.Checked = GlobalVars.DisableTeapotTurret;
checkBox4.Checked = GlobalVars.UPnP;
ConsolePrint("Config loaded.", 3);
ReadClientValues(GlobalVars.SelectedClient);
@ -727,8 +727,7 @@ namespace NovetusLauncher
void ConsolePrint(string text, int type)
{
richTextBox1.AppendText("[" + DateTime.Now.ToShortTimeString() + "]", Color.White);
richTextBox1.AppendText(" - ", Color.White);
richTextBox1.AppendText("[" + DateTime.Now.ToShortTimeString() + "] - ", Color.White);
if (type == 1)
{
richTextBox1.AppendText(text, Color.White);
@ -844,7 +843,6 @@ namespace NovetusLauncher
client.Exited += new EventHandler(ClientExited);
client.Start();
SecurityFuncs.RenameWindow(client, ScriptGenerator.ScriptType.Client);
SecurityFuncs.InjectAntiCheat(client);
GlobalVars.presence.details = "";
GlobalVars.presence.state = "In " + GlobalVars.SelectedClient + " Game";
GlobalVars.presence.largeImageText = GlobalVars.PlayerName + " | In " + GlobalVars.SelectedClient + " Game";
@ -1389,18 +1387,6 @@ namespace NovetusLauncher
GlobalVars.RobloxPort = GlobalVars.DefaultRobloxPort;
}
void CheckBox2CheckedChanged(object sender, EventArgs e)
{
if (checkBox2.Checked == true)
{
GlobalVars.DisableTeapotTurret = true;
}
else if (checkBox2.Checked == false)
{
GlobalVars.DisableTeapotTurret = false;
}
}
void TreeView1AfterSelect(object sender, TreeViewEventArgs e)
{
if (treeView1.SelectedNode.Nodes.Count == 0)

View File

@ -18,6 +18,9 @@
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
<IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
<WarningLevel>4</WarningLevel>
<SignAssembly>False</SignAssembly>
<DelaySign>False</DelaySign>
<RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'AnyCPU' ">
<PlatformTarget>x86</PlatformTarget>
@ -32,16 +35,18 @@
<DebugType>Full</DebugType>
<Optimize>False</Optimize>
<CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DefineConstants>DEBUG;TRACE;LAUNCHER;NOVETUS_APPS</DefineConstants>
<BaseIntermediateOutputPath>obj\</BaseIntermediateOutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<OutputPath>bin\Release\</OutputPath>
<DebugSymbols>False</DebugSymbols>
<DebugType>None</DebugType>
<Optimize>True</Optimize>
<CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
<DefineConstants>TRACE</DefineConstants>
<CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>
<DefineConstants>TRACE;LAUNCHER;NOVETUS_APPS</DefineConstants>
<BaseIntermediateOutputPath>obj\</BaseIntermediateOutputPath>
<StartAction>Project</StartAction>
</PropertyGroup>
<ItemGroup>
<Reference Include="Mono.Nat">
@ -79,7 +84,6 @@
<Compile Include="ItemMaker.Designer.cs">
<DependentUpon>ItemMaker.cs</DependentUpon>
</Compile>
<Compile Include="LauncherFuncs.cs" />
<Compile Include="LoaderForm.cs" />
<Compile Include="LoaderForm.Designer.cs">
<DependentUpon>LoaderForm.cs</DependentUpon>
@ -129,5 +133,11 @@
<None Include="app.config" />
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\NovetusShared\NovetusShared.csproj">
<Project>{759bfc2b-c130-4a2a-a01f-65abfee85b4c}</Project>
<Name>NovetusShared</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

View File

@ -8,6 +8,7 @@
*/
using System;
using System.Windows.Forms;
using NovetusShared;
namespace NovetusLauncher
{

View File

@ -1,31 +1,27 @@
#region Using directives
#region Using directives
using System;
using System.Reflection;
using System.Runtime.InteropServices;
#endregion
// 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("Novetus")]
[assembly: AssemblyDescription("Launcher for old ROBLOX clients")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Bitl")]
[assembly: AssemblyProduct("Novetus")]
[assembly: AssemblyCopyright("(c) Bitl 2018-2019. All rights to ROBLOX go to the ROBLOX Corporation")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: AssemblyTitle ("Novetus")]
[assembly: AssemblyDescription ("Launcher for old ROBLOX clients")]
[assembly: AssemblyConfiguration ("")]
[assembly: AssemblyCompany ("Bitl")]
[assembly: AssemblyProduct ("Novetus")]
[assembly: AssemblyCopyright ("(c) Bitl 2018-2019. All rights to ROBLOX go to the ROBLOX Corporation")]
[assembly: AssemblyTrademark ("")]
[assembly: AssemblyCulture ("")]
// This sets the default COM visibility of types in the assembly to invisible.
// If you need to expose a type to COM, use [ComVisible(true)] on that type.
[assembly: ComVisible(false)]
[assembly: ComVisible (false)]
// The assembly version has following format :
//
// Major.Minor.Build.Revision
//
// You can specify all the values or you can use the default the Revision and
// Build Numbers by using the '*' as shown below:
[assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion ("1.0.*")]

View File

@ -15,6 +15,7 @@ using System.Text;
using System.Text.RegularExpressions;
using System.IO;
using System.ComponentModel;
using NovetusShared;
namespace NovetusLauncher
{

View File

@ -10,6 +10,7 @@ using System;
using System.Drawing;
using System.Windows.Forms;
using System.Net;
using NovetusShared;
namespace NovetusLauncher
{

View File

@ -26,7 +26,7 @@ using System.Net.Sockets;
using System.Net;
using Mono.Nat;
namespace NovetusLauncher
namespace NovetusShared
{
/// <summary>
/// Description of LauncherFuncs.
@ -39,7 +39,7 @@ namespace NovetusLauncher
public static void ReadConfigValues(string cfgpath)
{
string Decryptline1, Decryptline2, Decryptline3, Decryptline4, Decryptline5, Decryptline6, Decryptline7, Decryptline8, Decryptline9, Decryptline10;
string Decryptline1, Decryptline2, Decryptline3, Decryptline4, Decryptline5, Decryptline6, Decryptline7, Decryptline9, Decryptline10;
IniFile ini = new IniFile(cfgpath);
@ -52,7 +52,6 @@ namespace NovetusLauncher
Decryptline5 = ini.IniReadValue(section, "Map");
Decryptline6 = ini.IniReadValue(section, "RobloxPort");
Decryptline7 = ini.IniReadValue(section, "PlayerLimit");
Decryptline8 = ini.IniReadValue(section, "DisableTeapotTurret");
Decryptline9 = ini.IniReadValue(section, "ShowHatsOnExtra");
Decryptline10 = ini.IniReadValue(section, "UPnP");
@ -74,9 +73,6 @@ namespace NovetusLauncher
int iline7 = Convert.ToInt32(Decryptline7);
GlobalVars.PlayerLimit = iline7;
bool bline8 = Convert.ToBoolean(Decryptline8);
GlobalVars.DisableTeapotTurret = bline8;
bool bline9 = Convert.ToBoolean(Decryptline9);
GlobalVars.Custom_Extra_ShowHats = bline9;
@ -99,7 +95,6 @@ namespace NovetusLauncher
ini.IniWriteValue(section, "Map", GlobalVars.Map.ToString());
ini.IniWriteValue(section, "RobloxPort", GlobalVars.RobloxPort.ToString());
ini.IniWriteValue(section, "PlayerLimit", GlobalVars.PlayerLimit.ToString());
ini.IniWriteValue(section, "DisableTeapotTurret", GlobalVars.DisableTeapotTurret.ToString());
ini.IniWriteValue(section, "ShowHatsOnExtra", GlobalVars.Custom_Extra_ShowHats.ToString());
ini.IniWriteValue(section, "UPnP", GlobalVars.UPnP.ToString());
WriteCustomizationValues(cfgpath.Replace(".ini","_customization.ini"));
@ -116,7 +111,6 @@ namespace NovetusLauncher
GlobalVars.Map = GlobalVars.DefaultMap;
GlobalVars.RobloxPort = 53640;
GlobalVars.PlayerLimit = 12;
GlobalVars.DisableTeapotTurret = false;
GlobalVars.Custom_Extra_ShowHats = false;
GlobalVars.UPnP = false;
ResetCustomizationValues();
@ -833,17 +827,8 @@ namespace NovetusLauncher
RenameWindow(exe, type);
}
}
public static void InjectAntiCheat(Process client)
{
if (client.IsRunning() == true)
{
var injector = new DllInjector();
injector.Inject(client, GlobalVars.BasePath + "\\AntiCheat.dll");
}
}
}
public static class RichTextBoxExtensions
{
public static void AppendText(this RichTextBox box, string text, Color color)
@ -980,7 +965,7 @@ namespace NovetusLauncher
}
else if (type == ScriptType.Server)
{
return "_G.CSServer(" + GlobalVars.RobloxPort + "," + GlobalVars.PlayerLimit + "," + md5s + "," + GlobalVars.DisableTeapotTurret.ToString().ToLower() + ")";
return "_G.CSServer(" + GlobalVars.RobloxPort + "," + GlobalVars.PlayerLimit + "," + md5s + ")";
}
else if (type == ScriptType.Solo)
{
@ -1254,7 +1239,7 @@ namespace NovetusLauncher
}
else if (type == ScriptGenerator.ScriptType.Server)
{
return "dofile('" + luafile + "'); _G.CSServer(" + GlobalVars.RobloxPort + "," + GlobalVars.PlayerLimit + "," + md5s + "," + GlobalVars.DisableTeapotTurret.ToString().ToLower() + ")";
return "dofile('" + luafile + "'); _G.CSServer(" + GlobalVars.RobloxPort + "," + GlobalVars.PlayerLimit + "," + md5s + ")";
}
else if (type == ScriptGenerator.ScriptType.Solo)
{
@ -2114,7 +2099,6 @@ namespace NovetusLauncher
public static int DefaultRobloxPort = 53640;
public static int WebServer_Port = (RobloxPort+1);
public static int PlayerLimit = 12;
public static bool DisableTeapotTurret = false;
//player settings
public static int UserID = 0;
public static string PlayerName = "Player";

View File

@ -0,0 +1,59 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Build">
<PropertyGroup>
<ProjectGuid>{759BFC2B-C130-4A2A-A01F-65ABFEE85B4C}</ProjectGuid>
<ProjectTypeGuids>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<Configuration Condition=" '$(Configuration)' == '' ">Release</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<OutputType>Library</OutputType>
<RootNamespace>NovetusShared</RootNamespace>
<AssemblyName>NovetusShared</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<AppDesignerFolder>Properties</AppDesignerFolder>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<OutputPath>bin\Debug\</OutputPath>
<DebugSymbols>True</DebugSymbols>
<DebugType>Full</DebugType>
<Optimize>False</Optimize>
<CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>
<DefineConstants>DEBUG;TRACE</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<OutputPath>bin\Release\</OutputPath>
<DebugSymbols>False</DebugSymbols>
<DebugType>None</DebugType>
<Optimize>True</Optimize>
<CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
<DefineConstants>TRACE</DefineConstants>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.CSharp">
<RequiredTargetFramework>4.0</RequiredTargetFramework>
</Reference>
<Reference Include="Mono.Nat">
<HintPath>..\packages\Mono.Nat.1.2.24.0\lib\net40\Mono.Nat.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
<Reference Include="System.Xml.Linq">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="LauncherFuncs.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

View File

@ -0,0 +1,31 @@
#region Using directives
using System;
using System.Reflection;
using System.Runtime.InteropServices;
#endregion
// 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("NovetusShared")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("NovetusShared")]
[assembly: AssemblyCopyright("Copyright 2019")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// This sets the default COM visibility of types in the assembly to invisible.
// If you need to expose a type to COM, use [ComVisible(true)] on that type.
[assembly: ComVisible(false)]
// The assembly version has following format :
//
// Major.Minor.Build.Revision
//
// You can specify all the values or you can use the default the Revision and
// Build Numbers by using the '*' as shown below:
[assembly: AssemblyVersion("1.0.*")]

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Mono.Nat" version="1.2.24.0" targetFramework="net40" />
</packages>

View File

@ -1,4 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<repositories>
<repository path="..\NovetusCMD\packages.config" />
<repository path="..\NovetusLauncher\packages.config" />
<repository path="..\NovetusShared\packages.config" />
</repositories>