Removed NioTSO client and server

- NioTSO client isn't needed because we're using RayLib
- Added FreeSO's API server to handle most backend operations
This commit is contained in:
Tony Bark 2024-05-01 02:55:43 -04:00
parent f12ba1502b
commit 22191ce648
591 changed files with 53264 additions and 3362 deletions

View file

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
</startup>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Common.Logging.Core" publicKeyToken="af08829b84f0328e" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.4.1.0" newVersion="3.4.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Common.Logging" publicKeyToken="af08829b84f0328e" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.4.1.0" newVersion="3.4.1.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

View file

@ -0,0 +1,189 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" 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>{7296CCEC-F459-4071-A9D2-9A07DCC29210}</ProjectGuid>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>FSO.Server.Debug</RootNamespace>
<AssemblyName>FSO.Server.Debug</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<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>
<UseVSHostingProcess>true</UseVSHostingProcess>
</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>
<UseVSHostingProcess>true</UseVSHostingProcess>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'ServerRelease|AnyCPU'">
<OutputPath>bin\ServerRelease\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="Be.Windows.Forms.HexBox, Version=1.5.0.30785, Culture=neutral, PublicKeyToken=e0e5adf0ebc99863, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>libs\Be.Windows.Forms.HexBox.dll</HintPath>
</Reference>
<Reference Include="Common.Logging, Version=3.4.1.0, Culture=neutral, PublicKeyToken=af08829b84f0328e, processorArchitecture=MSIL">
<HintPath>..\packages\Common.Logging.3.4.1\lib\net40\Common.Logging.dll</HintPath>
</Reference>
<Reference Include="Common.Logging.Core, Version=3.4.1.0, Culture=neutral, PublicKeyToken=af08829b84f0328e, processorArchitecture=MSIL">
<HintPath>..\packages\Common.Logging.Core.3.4.1\lib\net40\Common.Logging.Core.dll</HintPath>
</Reference>
<Reference Include="Mina.NET, Version=2.0.11.0, Culture=neutral, PublicKeyToken=bc4dde96e5154fe5, processorArchitecture=MSIL">
<HintPath>..\packages\Mina.2.0.11\lib\net40\Mina.NET.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.12.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="Ninject, Version=3.0.0.0, Culture=neutral, PublicKeyToken=c7192dc5380945e7, processorArchitecture=MSIL">
<HintPath>..\packages\Portable.Ninject.3.3.1\lib\net40-client\Ninject.dll</HintPath>
</Reference>
<Reference Include="ScintillaNET">
<HintPath>libs\ScintillaNET.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="PacketAnalyzer\ByteCountPacketAnalyzer.cs" />
<Compile Include="PacketAnalyzer\ConstantsPacketAnalyzer.cs" />
<Compile Include="PacketAnalyzer\ContentPacketAnalyzer.cs" />
<Compile Include="PacketAnalyzer\IPacketAnalyzer.cs" />
<Compile Include="PacketAnalyzer\PascalStringPacketAnalyzer.cs" />
<Compile Include="NetworkDebugger.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="NetworkDebugger.Designer.cs">
<DependentUpon>NetworkDebugger.cs</DependentUpon>
</Compile>
<Compile Include="NetworkStash.cs" />
<Compile Include="PacketAnalyzer\VariableLengthStringAnalyzer.cs" />
<Compile Include="PacketView.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="PacketView.designer.cs">
<DependentUpon>PacketView.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="RawPacketReference.cs" />
<Compile Include="StringDialog.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="StringDialog.designer.cs">
<DependentUpon>StringDialog.cs</DependentUpon>
</Compile>
<EmbeddedResource Include="NetworkDebugger.resx">
<DependentUpon>NetworkDebugger.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="PacketView.resx">
<DependentUpon>PacketView.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<EmbeddedResource Include="StringDialog.resx">
<DependentUpon>StringDialog.cs</DependentUpon>
</EmbeddedResource>
<None Include="packages.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\FSO.Common.DatabaseService\FSO.Common.DatabaseService.csproj">
<Project>{c051793d-1a9c-4554-9bb8-bafdc01a096a}</Project>
<Name>FSO.Common.DatabaseService</Name>
</ProjectReference>
<ProjectReference Include="..\FSO.Server.Common\FSO.Server.Common.csproj">
<Project>{39b61962-fe43-4b64-8e57-8f793737fffe}</Project>
<Name>FSO.Server.Common</Name>
</ProjectReference>
<ProjectReference Include="..\FSO.Server.Protocol\FSO.Server.Protocol.csproj">
<Project>{a08ade32-27e2-44f4-bc52-11a16c56baa8}</Project>
<Name>FSO.Server.Protocol</Name>
</ProjectReference>
<ProjectReference Include="..\tso.common\FSO.Common.csproj">
<Project>{c42962a1-8796-4f47-9dcd-79ed5904d8ca}</Project>
<Name>FSO.Common</Name>
</ProjectReference>
<ProjectReference Include="..\tso.content\FSO.Content.csproj">
<Project>{c0068df7-f2e8-4399-846d-556bf9a35c00}</Project>
<Name>FSO.Content</Name>
</ProjectReference>
<ProjectReference Include="..\tso.files\FSO.Files.csproj">
<Project>{18583453-a970-4ac5-83b1-2d6bfdf94c24}</Project>
<Name>FSO.Files</Name>
</ProjectReference>
<ProjectReference Include="..\tso.vitaboy.model\FSO.Vitaboy.csproj">
<Project>{9d9558a9-755e-43f9-8bb6-b26f365f5042}</Project>
<Name>FSO.Vitaboy</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Folder Include="Resources\" />
</ItemGroup>
<ItemGroup>
<Content Include="libs\Be.Windows.Forms.HexBox.dll" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

View file

@ -0,0 +1,214 @@
namespace FSO.Server.Debug
{
partial class NetworkDebugger
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(NetworkDebugger));
this.menuStrip1 = new System.Windows.Forms.MenuStrip();
this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.menuStash = new System.Windows.Forms.ToolStripMenuItem();
this.tab = new System.Windows.Forms.TabControl();
this.toolStrip1 = new System.Windows.Forms.ToolStrip();
this.btnInspect = new System.Windows.Forms.ToolStripButton();
this.btnCreate = new System.Windows.Forms.ToolStripDropDownButton();
this.btnClear = new System.Windows.Forms.ToolStripButton();
this.btnStash = new System.Windows.Forms.ToolStripButton();
this.packetList = new System.Windows.Forms.ListView();
this.packetIcons = new System.Windows.Forms.ImageList(this.components);
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.menuStrip1.SuspendLayout();
this.toolStrip1.SuspendLayout();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
this.SuspendLayout();
//
// menuStrip1
//
this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.fileToolStripMenuItem,
this.menuStash});
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
this.menuStrip1.Name = "menuStrip1";
this.menuStrip1.Size = new System.Drawing.Size(778, 24);
this.menuStrip1.TabIndex = 0;
this.menuStrip1.Text = "menuStrip1";
//
// fileToolStripMenuItem
//
this.fileToolStripMenuItem.Name = "fileToolStripMenuItem";
this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 20);
this.fileToolStripMenuItem.Text = "File";
//
// menuStash
//
this.menuStash.Name = "menuStash";
this.menuStash.Size = new System.Drawing.Size(47, 20);
this.menuStash.Text = "Stash";
this.menuStash.DropDownOpening += new System.EventHandler(this.menuStash_DropDownOpening);
//
// tab
//
this.tab.Dock = System.Windows.Forms.DockStyle.Fill;
this.tab.Location = new System.Drawing.Point(0, 0);
this.tab.Name = "tab";
this.tab.SelectedIndex = 0;
this.tab.Size = new System.Drawing.Size(515, 435);
this.tab.TabIndex = 1;
//
// toolStrip1
//
this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.btnInspect,
this.btnCreate,
this.btnClear,
this.btnStash});
this.toolStrip1.Location = new System.Drawing.Point(0, 24);
this.toolStrip1.Name = "toolStrip1";
this.toolStrip1.Size = new System.Drawing.Size(778, 25);
this.toolStrip1.TabIndex = 3;
this.toolStrip1.Text = "toolStrip1";
//
// btnInspect
//
this.btnInspect.Image = ((System.Drawing.Image)(resources.GetObject("btnInspect.Image")));
this.btnInspect.ImageTransparentColor = System.Drawing.Color.Magenta;
this.btnInspect.Name = "btnInspect";
this.btnInspect.Size = new System.Drawing.Size(103, 22);
this.btnInspect.Text = "Inspect Packet";
//
// btnCreate
//
this.btnCreate.Image = global::FSO.Server.Debug.Properties.Resources.blueprint__plus;
this.btnCreate.ImageTransparentColor = System.Drawing.Color.Magenta;
this.btnCreate.Name = "btnCreate";
this.btnCreate.Size = new System.Drawing.Size(108, 22);
this.btnCreate.Text = "Create Packet";
//
// btnClear
//
this.btnClear.Image = global::FSO.Server.Debug.Properties.Resources.bin;
this.btnClear.ImageTransparentColor = System.Drawing.Color.Magenta;
this.btnClear.Name = "btnClear";
this.btnClear.Size = new System.Drawing.Size(54, 22);
this.btnClear.Text = "Clear";
this.btnClear.Click += new System.EventHandler(this.btnClear_Click);
//
// btnStash
//
this.btnStash.Enabled = false;
this.btnStash.Image = global::FSO.Server.Debug.Properties.Resources.jar__plus;
this.btnStash.ImageTransparentColor = System.Drawing.Color.Magenta;
this.btnStash.Name = "btnStash";
this.btnStash.Size = new System.Drawing.Size(102, 22);
this.btnStash.Text = "Stash Selected";
this.btnStash.Click += new System.EventHandler(this.btnStash_Click);
//
// packetList
//
this.packetList.Dock = System.Windows.Forms.DockStyle.Fill;
this.packetList.FullRowSelect = true;
this.packetList.LargeImageList = this.packetIcons;
this.packetList.Location = new System.Drawing.Point(0, 0);
this.packetList.Name = "packetList";
this.packetList.Size = new System.Drawing.Size(259, 435);
this.packetList.SmallImageList = this.packetIcons;
this.packetList.TabIndex = 0;
this.packetList.UseCompatibleStateImageBehavior = false;
this.packetList.View = System.Windows.Forms.View.List;
this.packetList.DoubleClick += new System.EventHandler(this.packetList_DoubleClick);
this.packetList.ItemSelectionChanged += new System.Windows.Forms.ListViewItemSelectionChangedEventHandler(this.packetList_ItemSelectionChanged);
//
// packetIcons
//
this.packetIcons.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("packetIcons.ImageStream")));
this.packetIcons.TransparentColor = System.Drawing.Color.Transparent;
this.packetIcons.Images.SetKeyName(0, "navigation-180.png");
this.packetIcons.Images.SetKeyName(1, "navin.png");
//
// splitContainer1
//
this.splitContainer1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.splitContainer1.Location = new System.Drawing.Point(0, 52);
this.splitContainer1.Name = "splitContainer1";
//
// splitContainer1.Panel1
//
this.splitContainer1.Panel1.Controls.Add(this.packetList);
//
// splitContainer1.Panel2
//
this.splitContainer1.Panel2.Controls.Add(this.tab);
this.splitContainer1.Size = new System.Drawing.Size(778, 435);
this.splitContainer1.SplitterDistance = 259;
this.splitContainer1.TabIndex = 4;
//
// NetworkInspector
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(778, 487);
this.Controls.Add(this.toolStrip1);
this.Controls.Add(this.menuStrip1);
this.Controls.Add(this.splitContainer1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.SizableToolWindow;
this.MainMenuStrip = this.menuStrip1;
this.Name = "NetworkInspector";
this.Text = "Network Inspector";
this.Load += new System.EventHandler(this.NetworkInspector_Load);
this.menuStrip1.ResumeLayout(false);
this.menuStrip1.PerformLayout();
this.toolStrip1.ResumeLayout(false);
this.toolStrip1.PerformLayout();
this.splitContainer1.Panel1.ResumeLayout(false);
this.splitContainer1.Panel2.ResumeLayout(false);
this.splitContainer1.ResumeLayout(false);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.MenuStrip menuStrip1;
private System.Windows.Forms.ToolStripMenuItem fileToolStripMenuItem;
private System.Windows.Forms.TabControl tab;
private System.Windows.Forms.ToolStrip toolStrip1;
private System.Windows.Forms.ToolStripButton btnInspect;
private System.Windows.Forms.ListView packetList;
private System.Windows.Forms.ToolStripMenuItem menuStash;
private System.Windows.Forms.ImageList packetIcons;
private System.Windows.Forms.ToolStripButton btnClear;
private System.Windows.Forms.SplitContainer splitContainer1;
private System.Windows.Forms.ToolStripButton btnStash;
private System.Windows.Forms.ToolStripDropDownButton btnCreate;
}
}

View file

@ -0,0 +1,212 @@
using System;
using System.Collections.Generic;
using System.Windows.Forms;
using System.IO;
using FSO.Server.Common;
using FSO.Server.Protocol.Voltron;
using tso.debug.network;
using FSO.Common.Serialization;
using Ninject;
namespace FSO.Server.Debug
{
public partial class NetworkDebugger : Form, IServerDebugger, IPacketLogger
{
private Dictionary<string, RawPacketReference> Packets = new Dictionary<string, RawPacketReference>();
private int PacketSequence = 0;
private NetworkStash _Stash;
private ISerializationContext Context;
public NetworkDebugger(IKernel kernel)
{
Context = kernel.Get<ISerializationContext>();
_Stash = new NetworkStash(Path.Combine(Directory.GetCurrentDirectory(), "debug-network-stash"));
InitializeComponent();
var packetTypes = Enum.GetNames(typeof(VoltronPacketType));
foreach (var packetType in packetTypes)
{
var item = new ToolStripMenuItem();
item.Text = packetType;
item.Click += new EventHandler(createPacket_Click);
btnCreate.DropDownItems.Add(item);
}
}
void createPacket_Click(object sender, EventArgs e)
{
var index = btnCreate.DropDownItems.IndexOf((ToolStripItem)sender);
if (index != -1)
{
var enumNames = Enum.GetNames(typeof(VoltronPacketType));
var packetType = (VoltronPacketType)Enum.Parse(typeof(VoltronPacketType), (string)enumNames.GetValue(index));
OnPacket(new Packet {
Type = PacketType.VOLTRON,
SubType = packetType.GetPacketCode(),
Direction = PacketDirection.OUTPUT,
Data = new byte[0]
});
}
}
private void RefreshStashMenu()
{
this.menuStash.DropDownItems.Clear();
foreach (var stashItem in _Stash.Items)
{
ToolStripMenuItem item = new ToolStripMenuItem();
item.Text = stashItem.Name;
item.Click += new EventHandler(stash_item_Click);
this.menuStash.DropDownItems.Add(item);
}
}
void stash_item_Click(object sender, EventArgs e)
{
var index = menuStash.DropDownItems.IndexOf((ToolStripItem)sender);
if (index != -1)
{
var stash = _Stash.Items[index];
foreach (var item in stash.Packets)
{
OnPacket(new Packet {
Type = item.Type,
SubType = item.SubType,
Data = item.Data,
Direction = item.Direction
});
}
}
}
private void NetworkInspector_Load(object sender, EventArgs e)
{
}
private delegate void OnPacketDelegate(Packet packet);
public void OnPacket(Packet packet)
{
try {
this.BeginInvoke(new OnPacketDelegate(_OnPacket), new object[] { packet });
}catch(Exception ex)
{
}
}
private void _OnPacket(Packet packet)
{
var dataItem = new RawPacketReference();
dataItem.Packet = packet;
dataItem.Sequence = PacketSequence;
PacketSequence++;
var listItem = new ListViewItem();
if (packet.Direction == PacketDirection.OUTPUT)
{
listItem.ImageIndex = 0;
}
else
{
listItem.ImageIndex = 1;
}
listItem.Text = dataItem.Sequence + " - " + packet.GetPacketName();
listItem.Name = Guid.NewGuid().ToString();
Packets.Add(listItem.Name, dataItem);
packetList.Items.Add(listItem);
}
private void btnClear_Click(object sender, EventArgs e)
{
Packets.Clear();
packetList.Items.Clear();
}
private void packetList_DoubleClick(object sender, EventArgs e)
{
foreach (ListViewItem item in packetList.SelectedItems)
{
ViewPacket((RawPacketReference)Packets[item.Name]);
}
}
private void ViewPacket(RawPacketReference packet)
{
var tabPage = new TabPage();
tabPage.Text = packet.Sequence + " - " + packet.Packet.GetPacketName();
PacketView control = new PacketView(packet, tabPage, this, Context);
control.Dock = DockStyle.Fill;
tabPage.Controls.Add(control);
this.tab.TabPages.Add(tabPage);
this.tab.SelectedTab = tabPage;
}
public void Stash(params RawPacketReference[] packets)
{
var dialog = new StringDialog("Stash packets", "Your selected packets will be stored with the name below");
if (dialog.ShowDialog(this) == DialogResult.OK)
{
_Stash.Add(dialog.Result.Value, packets);
}
}
private void menuStash_DropDownOpening(object sender, EventArgs e)
{
RefreshStashMenu();
}
private void btnStash_Click(object sender, EventArgs e)
{
RawPacketReference[] packets = new RawPacketReference[packetList.SelectedItems.Count];
for (int i = 0; i < packetList.SelectedItems.Count; i++)
{
var listItem = (ListViewItem)packetList.SelectedItems[i];
var packet = Packets[listItem.Name];
packets[i] = packet;
}
Stash(packets);
}
private void packetList_ItemSelectionChanged(object sender, ListViewItemSelectionChangedEventArgs e)
{
btnStash.Enabled = packetList.SelectedItems.Count > 0;
}
public IPacketLogger GetPacketLogger()
{
return this;
}
public List<ISocketServer> SocketServers = new List<ISocketServer>();
public void AddSocketServer(ISocketServer server)
{
SocketServers.Add(server);
}
public List<ISocketSession> GetSessions()
{
var result = new List<ISocketSession>();
foreach(var server in SocketServers)
{
result.AddRange(server.GetSocketSessions());
}
return result;
}
}
}

View file

@ -0,0 +1,191 @@
<?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=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>
<metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="toolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>132, 17</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="btnInspect.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAFTSURBVDhPYyAVvJ7GkPa4j+HMzRaGNKgQ8QCm+c8jz/+X
6xjOnColwRBkza+3y/1/d0T7/+E8hjNQafwAl+bdaUS4gCLNQBDGyMi4mmjNf5YzpH1fxHDm01yGM0Cb
z5Cl+f+70P//n/r8/3vf7f+PqzZkaL7r8v/Pdbv/X04agDW/2CxF0M82IKeCNN+dyYCi+eEizv9PlvH+
B2rGHV0gzR0dHf+bm5vBmq9PZoBrfjCb6f/b1UL/tybgj29boCGbW1pa/iclJYE1n2xlAGt+vZTn/+89
yv/XRxFOMI5AQw7k5ub+t7AwB2veW8kA17wqlLg4dwcaciEgIOi/o6M3SZqZgJgHiMWAOBGIH4SFpfwH
0q9r7BiKgbQgEPMBMTcQcwAxGxAzAzEjEIMBCxCLA7EOEBsDcS4QvwbiHCBWB2JFIJYBYpAFAkAMMghk
CNBiBgYAtkz9leWyevkAAAAASUVORK5CYII=
</value>
</data>
<metadata name="packetIcons.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>237, 17</value>
</metadata>
<data name="packetIcons.ImageStream" mimetype="application/x-microsoft.net.object.binary.base64">
<value>
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj0yLjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAACc
CQAAAk1TRnQBSQFMAgEBAgEAAVABAAFQAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
AWYDAAGZAwABzAIAATMDAAIzAgABMwFmAgABMwGZAgABMwHMAgABMwH/AgABZgMAAWYBMwIAAmYCAAFm
AZkCAAFmAcwCAAFmAf8CAAGZAwABmQEzAgABmQFmAgACmQIAAZkBzAIAAZkB/wIAAcwDAAHMATMCAAHM
AWYCAAHMAZkCAALMAgABzAH/AgAB/wFmAgAB/wGZAgAB/wHMAQABMwH/AgAB/wEAATMBAAEzAQABZgEA
ATMBAAGZAQABMwEAAcwBAAEzAQAB/wEAAf8BMwIAAzMBAAIzAWYBAAIzAZkBAAIzAcwBAAIzAf8BAAEz
AWYCAAEzAWYBMwEAATMCZgEAATMBZgGZAQABMwFmAcwBAAEzAWYB/wEAATMBmQIAATMBmQEzAQABMwGZ
AWYBAAEzApkBAAEzAZkBzAEAATMBmQH/AQABMwHMAgABMwHMATMBAAEzAcwBZgEAATMBzAGZAQABMwLM
AQABMwHMAf8BAAEzAf8BMwEAATMB/wFmAQABMwH/AZkBAAEzAf8BzAEAATMC/wEAAWYDAAFmAQABMwEA
AWYBAAFmAQABZgEAAZkBAAFmAQABzAEAAWYBAAH/AQABZgEzAgABZgIzAQABZgEzAWYBAAFmATMBmQEA
AWYBMwHMAQABZgEzAf8BAAJmAgACZgEzAQADZgEAAmYBmQEAAmYBzAEAAWYBmQIAAWYBmQEzAQABZgGZ
AWYBAAFmApkBAAFmAZkBzAEAAWYBmQH/AQABZgHMAgABZgHMATMBAAFmAcwBmQEAAWYCzAEAAWYBzAH/
AQABZgH/AgABZgH/ATMBAAFmAf8BmQEAAWYB/wHMAQABzAEAAf8BAAH/AQABzAEAApkCAAGZATMBmQEA
AZkBAAGZAQABmQEAAcwBAAGZAwABmQIzAQABmQEAAWYBAAGZATMBzAEAAZkBAAH/AQABmQFmAgABmQFm
ATMBAAGZATMBZgEAAZkBZgGZAQABmQFmAcwBAAGZATMB/wEAApkBMwEAApkBZgEAA5kBAAKZAcwBAAKZ
Af8BAAGZAcwCAAGZAcwBMwEAAWYBzAFmAQABmQHMAZkBAAGZAswBAAGZAcwB/wEAAZkB/wIAAZkB/wEz
AQABmQHMAWYBAAGZAf8BmQEAAZkB/wHMAQABmQL/AQABzAMAAZkBAAEzAQABzAEAAWYBAAHMAQABmQEA
AcwBAAHMAQABmQEzAgABzAIzAQABzAEzAWYBAAHMATMBmQEAAcwBMwHMAQABzAEzAf8BAAHMAWYCAAHM
AWYBMwEAAZkCZgEAAcwBZgGZAQABzAFmAcwBAAGZAWYB/wEAAcwBmQIAAcwBmQEzAQABzAGZAWYBAAHM
ApkBAAHMAZkBzAEAAcwBmQH/AQACzAIAAswBMwEAAswBZgEAAswBmQEAA8wBAALMAf8BAAHMAf8CAAHM
Af8BMwEAAZkB/wFmAQABzAH/AZkBAAHMAf8BzAEAAcwC/wEAAcwBAAEzAQAB/wEAAWYBAAH/AQABmQEA
AcwBMwIAAf8CMwEAAf8BMwFmAQAB/wEzAZkBAAH/ATMBzAEAAf8BMwH/AQAB/wFmAgAB/wFmATMBAAHM
AmYBAAH/AWYBmQEAAf8BZgHMAQABzAFmAf8BAAH/AZkCAAH/AZkBMwEAAf8BmQFmAQAB/wKZAQAB/wGZ
AcwBAAH/AZkB/wEAAf8BzAIAAf8BzAEzAQAB/wHMAWYBAAH/AcwBmQEAAf8CzAEAAf8BzAH/AQAC/wEz
AQABzAH/AWYBAAL/AZkBAAL/AcwBAAJmAf8BAAFmAf8BZgEAAWYC/wEAAf8CZgEAAf8BZgH/AQAC/wFm
AQABIQEAAaUBAANfAQADdwEAA4YBAAOWAQADywEAA7IBAAPXAQAD3QEAA+MBAAPqAQAD8QEAA/gBAAHw
AfsB/wEAAaQCoAEAA4ADAAH/AgAB/wMAAv8BAAH/AwAB/wEAAf8BAAL/AgAD/wIADv8CAA7/IgAC/wH0
AfIBBwG1Aq4BtQEHAfIB9AL/AgAC/wH0AfIBBwEcAm4BHAEHAfIB9AL/JAAB8wHPAq0CzgKtAc8B8wYA
AfMBbwFMBBcBTAFvAfMlAAHzAc8BrQLOAq0CzgGtAc8B8wQAAfMBbwEXAkcCRgJHAUYBbwHzIwAB/wG0
BK0C8wStAbQB/wIAAf8BdAFMA0YC8wRGAW8B/yIAAfABzwOtAvIBCQWtAfACAAEaAW8ERgEaAvMDRgFM
ARoiAAG1Ac8BrQGnAfAB8QEHBKcCrQG1AgABkwFvBUYBBwLzA0YBkyIAAbQBzwGtA/AB8QLyAvMCrQG0
AgACbwFGA/AB8QLyAvMCRgFvIgABtAHPAa0B/wHyAvAB8QLyAfMBpwGtAbQCAAJvAUYB/wHyAvAB8QLy
AfMCRgFvIgABtQG0Aq0C/wEJAqcChgGnAa0BtQIAAZMBbwNMAkYBGgLyAkUBTAGTIgAB3QG0Ac8CrQL/
Ad0DrQLPAd0CAAEaAm8DTAEaAv8CTAJvARoiAAH/AbQB1QPPAv8BrQLPArQB/wIAAf8BdAEWAm8BTAL/
BG8BdAH/IwAB8wG0AtUBtALPAbQC1QG0AfMEAAHzAW8BFgHjAW8BTAJvAuMBbwHzJQAB8wK0BNUCtAHz
BgAB8wF0AW8EFgFvAXQB8ycAAf8B3QG1ArQBtQHdAf8IAAH/ARoBkwJvAZMBGgH/ZAABQgFNAT4HAAE+
AwABKAMAAUADAAEQAwABAQEAAQEFAAGAFwAD/wEAAYABAQGAAQEEAAGAAQEBgAEBBAAB4AEHAeABBwQA
AcABAwHAAQMEAAGAAQEBgAEBBAABgAEBAYABAQQAAYABAQGAAQEEAAGAAQEBgAEBBAABgAEBAYABAQQA
AYABAQGAAQEEAAGAAQEBgAEBBAABgAEBAYABAQQAAcABAwHAAQMEAAHgAQcB4AEHBAAB8AEPAfABDwQA
BP8EAAs=
</value>
</data>
</root>

View file

@ -0,0 +1,97 @@
using System;
using System.Collections.Generic;
using Newtonsoft.Json;
using System.IO;
using Newtonsoft.Json.Converters;
using FSO.Server.Common;
using FSO.Common.Utils;
using tso.debug.network;
namespace FSO.Server.Debug
{
public class NetworkStash
{
private static JsonSerializerSettings SETTINGS;
static NetworkStash()
{
SETTINGS = new JsonSerializerSettings();
SETTINGS.Formatting = Formatting.Indented;
SETTINGS.Converters.Add(new StringEnumConverter());
}
private string Dir;
public List<NetworkStashItem> Items;
public NetworkStash(string dir)
{
this.Dir = dir;
this.Items = new List<NetworkStashItem>();
if (!Directory.Exists(dir))
{
Directory.CreateDirectory(dir);
}
string[] files = Directory.GetFiles(dir);
foreach (var file in files)
{
if (file.EndsWith(".json"))
{
var parsedItem = JsonConvert.DeserializeObject<NetworkStashItem>(File.ReadAllText(file), SETTINGS);
this.Items.Add(parsedItem);
}
}
}
public void Add(string name, RawPacketReference[] packets)
{
var item = new NetworkStashItem();
item.Name = name;
item.Packets = new List<NetworkStashItemPacket>();
foreach (var packet in packets)
{
item.Packets.Add(new NetworkStashItemPacket {
Type = packet.Packet.Type,
SubType = (ushort)packet.Packet.SubType,
Data = packet.Packet.Data,
Direction = packet.Packet.Direction
});
}
this.Items.Add(item);
var jsonData = JsonConvert.SerializeObject(item, SETTINGS);
File.WriteAllText(Path.Combine(Dir, "stash-" + DateTime.Now.Ticks + ".json"), jsonData);
}
}
public class NetworkStashItem
{
[JsonProperty]
public string Name;
[JsonProperty]
public List<NetworkStashItemPacket> Packets;
}
public class NetworkStashItemPacket
{
[JsonProperty]
public PacketType Type;
[JsonProperty]
public uint SubType;
[JsonProperty]
public PacketDirection Direction;
[JsonConverter(typeof(Base64JsonConverter))]
public byte[] Data;
}
}

View file

@ -0,0 +1,41 @@
using System.Collections.Generic;
namespace FSO.Server.Debug.PacketAnalyzer
{
public class ByteCountPacketAnalyzer : IPacketAnalyzer
{
#region IPacketAnalyzer Members
public List<PacketAnalyzerResult> Analyze(byte[] data)
{
var result = new List<PacketAnalyzerResult>();
for (var i = 0; i < data.Length; i++)
{
if (i + 4 < data.Length)
{
byte len1 = data[i];
byte len2 = data[i + 1];
byte len3 = data[i + 2];
byte len4 = data[i + 3];
long len = len1 << 24 | len2 << 16 | len3 << 8 | len4;
if (len == data.Length - (i + 4))
{
result.Add(new PacketAnalyzerResult
{
Offset = i,
Length = 4,
Description = "byte-count(" + len + ")"
});
}
}
}
return result;
}
#endregion
}
}

View file

@ -0,0 +1,226 @@
using System;
using System.Collections.Generic;
using FSO.Server.Protocol.Voltron.Model;
using FSO.Server.Protocol.Voltron;
using FSO.Common.DatabaseService.Model;
namespace FSO.Server.Debug.PacketAnalyzer
{
public class ConstantsPacketAnalyzer : IPacketAnalyzer
{
private static List<Constant> Constants = new List<Constant>();
static ConstantsPacketAnalyzer()
{
/*var voltronTypes = Enum.GetNames(typeof(VoltronPacketType));
foreach (var name in voltronTypes)
{
var enumValue = (VoltronPacketType)Enum.Parse(typeof(VoltronPacketType), name);
if (enumValue == VoltronPacketType.Unknown) { continue; }
Constants.Add(new Constant {
Type = ConstantType.USHORT,
Description = "VoltronPacket." + name,
Value = VoltronPacketTypeUtils.GetPacketCode(enumValue)
});
}*/
var dbRequestTypes = Enum.GetNames(typeof(DBRequestType));
foreach (var name in dbRequestTypes)
{
var enumValue = (DBRequestType)Enum.Parse(typeof(DBRequestType), name);
if (enumValue == DBRequestType.Unknown) { continue; }
Constants.Add(new Constant
{
Type = ConstantType.UINT,
Description = "DBRequestType." + name,
Value = DBRequestTypeUtils.GetRequestID(enumValue)
});
if (enumValue == DBRequestType.UpdatePreferedLanguageByID)
{
var val = DBRequestTypeUtils.GetRequestID(enumValue);
}
}
var dbResponseTypes = Enum.GetNames(typeof(DBResponseType));
foreach (var name in dbResponseTypes)
{
var enumValue = (DBResponseType)Enum.Parse(typeof(DBResponseType), name);
if (enumValue == DBResponseType.Unknown)
{
continue;
}
Constants.Add(new Constant
{
Type = ConstantType.UINT,
Description = "DBResponseType." + name,
Value = DBResponseTypeUtils.GetResponseID(enumValue)
});
}
var magicNumberTypes = Enum.GetNames(typeof(MagicNumberEnum));
foreach (var name in magicNumberTypes)
{
var enumValue = (MagicNumberEnum)Enum.Parse(typeof(MagicNumberEnum), name);
var intVal = MagicNumberEnumUtils.ToInt(enumValue);
var floatVal = MagicNumberEnumUtils.ToFloat(enumValue);
Constants.Add(new Constant
{
Type = ConstantType.UINT,
Description = "MagicNumberEnum." + name + "( " + intVal + ", " + floatVal + ")",
Value = MagicNumberEnumUtils.ToID(enumValue)
});
}
var voltronTypes = Enum.GetNames(typeof(VoltronPacketType));
foreach (var name in voltronTypes)
{
var enumValue = (VoltronPacketType)Enum.Parse(typeof(VoltronPacketType), name);
if (enumValue == VoltronPacketType.Unknown)
{
continue;
}
var intVal = VoltronPacketTypeUtils.GetPacketCode(enumValue);
Constants.Add(new Constant
{
Type = ConstantType.USHORT,
Description = "VoltronPacketType." + name,
Value = intVal
});
}
Constants.Add(new Constant { Type = ConstantType.UINT, Value = 0x09736027, Description = "cTSOTopicUpdateMessage" });
Constants.Add(new Constant { Type = ConstantType.UINT, Value = 0x0A2C6585, Description = "cTSODataTransportBuffer" });
Constants.Add(new Constant { Type = ConstantType.UINT, Value = 0x496A78BC, Description = "cTSODataDefinitionContainer" });
Constants.Add(new Constant { Type = ConstantType.UINT, Value = 0x097608AB, Description = "cTSOValueVector < unsigned char>" });
Constants.Add(new Constant { Type = ConstantType.UINT, Value = 0x097608B3, Description = "cTSOValueVector < signed char>" });
Constants.Add(new Constant { Type = ConstantType.UINT, Value = 0x097608B6, Description = "cTSOValueVector < unsigned short>" });
Constants.Add(new Constant { Type = ConstantType.UINT, Value = 0x29739B14, Description = "cTSOTopic" });
Constants.Add(new Constant { Type = ConstantType.UINT, Value = 0x2A404946, Description = "cTSOTopicUpdateErrorMessage" });
Constants.Add(new Constant { Type = ConstantType.UINT, Value = 0x496A78BC, Description = "cTSODataDefinitionContainer" });
Constants.Add(new Constant { Type = ConstantType.UINT, Value = 0x696D1183, Description = "cTSOValue < bool >" });
Constants.Add(new Constant { Type = ConstantType.UINT, Value = 0x696D1189, Description = "cTSOValue < unsigned long>" });
Constants.Add(new Constant { Type = ConstantType.UINT, Value = 0x69D3E3DB, Description = "cTSOValue < unsigned __int64 >" });
Constants.Add(new Constant { Type = ConstantType.UINT, Value = 0x896D1196, Description = "cTSOValue < long >" });
Constants.Add(new Constant { Type = ConstantType.UINT, Value = 0x896D11A2, Description = "cTSOValueMap <class cRZAutoRefCount<class cITSOProperty> >" });
Constants.Add(new Constant { Type = ConstantType.UINT, Value = 0x896D1688, Description = "cTSOValue<class cRZAutoRefCount<class cIGZString> >" });
Constants.Add(new Constant { Type = ConstantType.UINT, Value = 0x89738492, Description = "cTSOValueBVector" });
Constants.Add(new Constant { Type = ConstantType.UINT, Value = 0x89738496, Description = "cTSOValueVector<unsigned long>" });
Constants.Add(new Constant { Type = ConstantType.UINT, Value = 0x8973849A, Description = "cTSOValueVector<long>" });
Constants.Add(new Constant { Type = ConstantType.UINT, Value = 0x8973849E, Description = "cTSOValueVector <class cRZAutoRefCount<class cIGZString> >" });
Constants.Add(new Constant { Type = ConstantType.UINT, Value = 0x89739A79, Description = "cTSOProperty" });
Constants.Add(new Constant { Type = ConstantType.UINT, Value = 0x89D3E3EF, Description = "cTSOValue<__int64>" });
Constants.Add(new Constant { Type = ConstantType.UINT, Value = 0x89D3E40E, Description = "cTSOValueMap<unsigned __int64>" });
Constants.Add(new Constant { Type = ConstantType.UINT, Value = 0xA96E38A0, Description = "cTSOValueMap<unsigned long>" });
Constants.Add(new Constant { Type = ConstantType.UINT, Value = 0xA96E38A8, Description = "cTSOValueMap<long>" });
Constants.Add(new Constant { Type = ConstantType.UINT, Value = 0xA96E38AC, Description = "cTSOValueMap <class cRZAutoRefCount<class cIGZString> >" });
Constants.Add(new Constant { Type = ConstantType.UINT, Value = 0xA96E7E5B, Description = "cTSOValue<class cRZAutoRefCount<class cITSOProperty> >" });
Constants.Add(new Constant { Type = ConstantType.UINT, Value = 0xA97353EE, Description = "cTSODataService" });
Constants.Add(new Constant { Type = ConstantType.UINT, Value = 0xA97384A3, Description = "cTSOValueVector<class cRZAutoRefCount<class cITSOProperty> >" });
Constants.Add(new Constant { Type = ConstantType.UINT, Value = 0xA975FA6E, Description = "cTSODataServiceClient" });
Constants.Add(new Constant { Type = ConstantType.UINT, Value = 0xA99AF3A8, Description = "cTSOValueMap<class cRZAutoRefCount<class cIGZUnknown> >" });
Constants.Add(new Constant { Type = ConstantType.UINT, Value = 0xA99AF3AC, Description = "cTSOValueVector <class cRZAutoRefCount<class cIGZUnknown> >" });
Constants.Add(new Constant { Type = ConstantType.UINT, Value = 0xA99AF3B7, Description = "cTSOValue<class cRZAutoRefCount<class cIGZUnknown> >" });
Constants.Add(new Constant { Type = ConstantType.UINT, Value = 0xA9D3E412, Description = "cTSOValueMap<__int64>" });
Constants.Add(new Constant { Type = ConstantType.UINT, Value = 0xA9D3E428, Description = "cTSOValueVector <unsigned __int64>" });
Constants.Add(new Constant { Type = ConstantType.UINT, Value = 0xA9D3E42D, Description = "cTSOValueVector<__int64>" });
Constants.Add(new Constant { Type = ConstantType.UINT, Value = 0xC976087C, Description = "cTSOValue<unsigned char>" });
Constants.Add(new Constant { Type = ConstantType.UINT, Value = 0xC97757F5, Description = "cTSOValueMap<bool>" });
Constants.Add(new Constant { Type = ConstantType.UINT, Value = 0xE976088A, Description = "cTSOValue<signed char>" });
Constants.Add(new Constant { Type = ConstantType.UINT, Value = 0xE9760891, Description = "cTSOValue<unsigned short>" });
Constants.Add(new Constant { Type = ConstantType.UINT, Value = 0xE9760897, Description = "cTSOValue<short>" });
Constants.Add(new Constant { Type = ConstantType.UINT, Value = 0xE976089F, Description = "cTSOValueMap<unsigned char>" });
Constants.Add(new Constant { Type = ConstantType.UINT, Value = 0xE97608A2, Description = "cTSOValueMap<signed char>" });
Constants.Add(new Constant { Type = ConstantType.UINT, Value = 0xE97608A5, Description = "cTSOValueMap <unsigned short>" });
Constants.Add(new Constant { Type = ConstantType.UINT, Value = 0xE97608A8, Description = "cTSOValueMap<short>" });
}
#region IPacketAnalyzer Members
public List<PacketAnalyzerResult> Analyze(byte[] data)
{
var result = new List<PacketAnalyzerResult>();
for (var i = 0; i < data.Length; i++)
{
foreach (var constant in GetConstants())
{
int len = 0;
object value = null;
switch (constant.Type)
{
case ConstantType.UINT:
if (i + 4 >= data.Length) { continue; }
byte len1 = data[i];
byte len2 = data[i + 1];
byte len3 = data[i + 2];
byte len4 = data[i + 3];
value = (uint)(len1 << 24 | len2 << 16 | len3 << 8 | len4);
len = 4;
break;
case ConstantType.USHORT:
if (i + 2 >= data.Length) { continue; }
byte short1 = data[i];
byte short2 = data[i + 1];
value = (ushort)(short1 << 8 | short2);
len = 2;
break;
case ConstantType.ULONG:
if (i + 8 >= data.Length) { continue; }
byte long1 = data[i];
byte long2 = data[i + 1];
byte long3 = data[i + 2];
byte long4 = data[i + 3];
byte long5 = data[i + 4];
byte long6 = data[i + 5];
byte long7 = data[i + 6];
byte long8 = data[i + 7];
value = (ulong)(long1 << 54 | long2 << 48 | long3 << 40 | long4 << 32 | long5 << 24 | long6 << 16 | long7 << 8 | long8);
len = 4;
break;
}
if (value.ToString() == constant.Value.ToString())
{
result.Add(new PacketAnalyzerResult {
Offset = i,
Length = len,
Description = constant.Description
});
}
}
}
return result;
}
#endregion
public virtual List<Constant> GetConstants()
{
return Constants;
}
}
public class Constant
{
public ConstantType Type;
public object Value;
public string Description;
}
public enum ConstantType
{
USHORT,
UINT,
ULONG
}
}

View file

@ -0,0 +1,58 @@
using FSO.Content.Framework;
using FSO.Vitaboy;
using System.Collections.Generic;
namespace FSO.Server.Debug.PacketAnalyzer
{
public class ContentPacketAnalyzer : ConstantsPacketAnalyzer
{
private List<Constant> Constants = new List<Constant>();
public ContentPacketAnalyzer()
{
var content = Content.Content.Get();
/** Avatar Collections **/
foreach(var collection in content.AvatarCollections.List())
{
var items = collection.Get();
var collectionCast = (Far3ProviderEntry<Collection>)collection;
foreach(var item in items)
{
Constants.Add(new Constant {
Type = ConstantType.ULONG,
Value = item.PurchasableOutfitId,
Description = collectionCast.FarEntry.Filename + "." + item.Index
});
/**Constants.Add(new Constant
{
Type = ConstantType.UINT,
Value = item.FileID,
Description = collectionCast.FarEntry.Filename + "." + item.Index
});**/
}
}
//TSODataDefinition file
var dataDef = content.DataDefinition;
foreach (var str in dataDef.Strings)
{
Constants.Add(new Constant
{
Type = ConstantType.UINT,
Description = "TSOData_datadefinition(" + str.Value + ")",
Value = str.ID
});
}
}
public override List<Constant> GetConstants()
{
return Constants;
}
}
}

View file

@ -0,0 +1,22 @@
using System.Collections.Generic;
namespace FSO.Server.Debug.PacketAnalyzer
{
public interface IPacketAnalyzer
{
List<PacketAnalyzerResult> Analyze(byte[] data);
}
public class PacketAnalyzerResult
{
public int Offset;
public int Length;
public string Description;
public override string ToString()
{
return Description;
}
}
}

View file

@ -0,0 +1,66 @@
using System.Collections.Generic;
using System.Text;
namespace FSO.Server.Debug.PacketAnalyzer
{
public class PascalStringPacketAnalyzer : IPacketAnalyzer
{
#region IPacketAnalyzer Members
public List<PacketAnalyzerResult> Analyze(byte[] data)
{
var result = new List<PacketAnalyzerResult>();
/**
* We are looking for a uint32 with the msb flipped for length followed by that many chars within a reasonable ascii range
*/
for (var i = 0; i < data.Length; i++)
{
var stringValue = GetString(data, i);
if (stringValue != null)
{
result.Add(new PacketAnalyzerResult {
Offset = i,
Length = stringValue.Length + 4,
Description = "pascal-string(" + stringValue + ")"
});
}
}
return result;
}
private string GetString(byte[] data, int index)
{
if (index + 4 <= data.Length)
{
byte len1 = data[index];
byte len2 = data[index + 1];
byte len3 = data[index + 2];
byte len4 = data[index + 3];
//Is msb set?
if ((len1 >> 7) != 1) { return null; }
len1 &= 0x7F;
long len = len1 << 24 | len2 << 16 | len3 << 8 | len4;
if (len < 0) { return null; }
if (index + 4 + len <= data.Length)
{
/** Could be! **/
StringBuilder str = new StringBuilder();
for (int i = 0; i < len; i++)
{
byte charValue = data[index + 4 + i];
str.Append((char)charValue);
}
return str.ToString();
}
}
return null;
}
#endregion
}
}

View file

@ -0,0 +1,97 @@
using System.Collections.Generic;
using System.Text;
namespace FSO.Server.Debug.PacketAnalyzer
{
public class VariableLengthStringAnalyzer : IPacketAnalyzer
{
public List<PacketAnalyzerResult> Analyze(byte[] data)
{
var result = new List<PacketAnalyzerResult>();
/**
* We are looking for a uint32 with the msb flipped for length followed by that many chars within a reasonable ascii range
*/
for (var i = 0; i < data.Length; i++)
{
var stringValue = GetString(data, i);
if (stringValue != null)
{
var offset = 1;
if(stringValue.Length > 128)
{
offset = 2;
}
result.Add(new PacketAnalyzerResult
{
Offset = i,
Length = stringValue.Length + offset,
Description = "var-string(" + stringValue + ")"
});
}
}
return result;
}
private string GetString(byte[] data, int index)
{
byte lengthByte = 0;
uint length = 0;
int shift = 0;
byte lengthBytes = 0;
do
{
lengthByte = data[index + lengthBytes];
length |= (uint)((lengthByte & (uint)0x7F) << shift);
shift += 7;
lengthBytes++;
} while (
(lengthByte >> 7) == 1 &&
index + lengthBytes < data.Length
);
if (length > 600 || length == 0)
{
return null;
}
if((index + lengthBytes + length) <= data.Length)
{
/** Could be! **/
StringBuilder str = new StringBuilder();
for (int i = 0; i < length; i++)
{
byte charValue = data[index + lengthBytes + i];
if(charValue == 0x09)
{
//Tab
}
else if(charValue == 0x0A)
{
//Line feed
}else if(charValue == 0x0D)
{
//CR
}else if(charValue >= 0x20 && charValue <= 0x7E)
{
//a-z, special chars, numbers
}
else
{
return null;
}
str.Append((char)charValue);
}
return str.ToString();
}
return null;
}
}
}

View file

@ -0,0 +1,242 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
using Be.Windows.Forms;
using Mina.Core.Buffer;
using System.IO;
using tso.debug.network;
using FSO.Server.Common;
using FSO.Server.Protocol.Voltron;
using FSO.Server.Debug.PacketAnalyzer;
using FSO.Server.Protocol.Aries;
using FSO.Server.Protocol.Voltron.Packets;
using FSO.Common.Serialization;
namespace FSO.Server.Debug
{
public partial class PacketView : UserControl
{
private RawPacketReference Packet;
private TabPage Tab;
private DynamicByteProvider BytesProvider;
private NetworkDebugger Inspector;
private object ParsedPacket;
private ISerializationContext Context;
public PacketView(RawPacketReference packet, TabPage tab, NetworkDebugger inspector, ISerializationContext context)
{
this.Tab = tab;
this.Packet = packet;
this.Inspector = inspector;
this.Context = context;
InitializeComponent();
BytesProvider = new DynamicByteProvider(packet.Packet.Data);
hex.ByteProvider = BytesProvider;
hex.StringViewVisible = true;
splitContainer1.Panel2Collapsed = true;
}
private void PacketView_Load(object sender, EventArgs e)
{
}
private void btnClose_Click(object sender, EventArgs e)
{
((TabControl)this.Tab.Parent).TabPages.Remove(Tab);
}
private void btnStash_Click(object sender, EventArgs e)
{
var toStash = new RawPacketReference
{
Packet = new Packet
{
Data = GetBytes(),
Direction = this.Packet.Packet.Direction,
Type = this.Packet.Packet.Type,
SubType = this.Packet.Packet.SubType
},
Sequence = this.Packet.Sequence
};
this.Inspector.Stash(toStash);
}
private void btnTools_Click(object sender, EventArgs e)
{
Analyze();
splitContainer1.Panel2Collapsed = !splitContainer1.Panel2Collapsed;
}
private void ParsePacket()
{
/** Can we parse it? **/
try
{
var packet = Packet.Packet;
if(packet.Type == PacketType.VOLTRON)
{
var voltronClazz = VoltronPackets.GetByPacketCode((ushort)packet.SubType);
if(voltronClazz != null)
{
IVoltronPacket parsed = (IVoltronPacket)Activator.CreateInstance(voltronClazz);
//TODO: VoltronContext
parsed.Deserialize(IoBuffer.Wrap(GetBytes()), Context);
this.ParsedPacket = parsed;
this.parsedInspetor.SelectedObject = ParsedPacket;
}
}else if(packet.Type == PacketType.ARIES)
{
var ariesClazz = AriesPackets.GetByPacketCode(packet.SubType);
if(ariesClazz != null)
{
IAriesPacket parsed = (IAriesPacket)Activator.CreateInstance(ariesClazz);
parsed.Deserialize(IoBuffer.Wrap(GetBytes()), Context);
this.ParsedPacket = parsed;
this.parsedInspetor.SelectedObject = ParsedPacket;
}
}
}
catch (Exception ex)
{
}
}
private void Analyze()
{
analyzeResults.Items.Clear();
var analyzers = new IPacketAnalyzer[]{
new PascalStringPacketAnalyzer(),
new ByteCountPacketAnalyzer(),
new ConstantsPacketAnalyzer(),
new VariableLengthStringAnalyzer(),
new ContentPacketAnalyzer()
};
var data = GetBytes();
foreach (var analyzer in analyzers)
{
var results = analyzer.Analyze(data);
if (results != null)
{
foreach (var result in results)
{
analyzeResults.Items.Add(result);
}
}
}
}
private List<ISocketSession> AllSessions = new List<ISocketSession>();
private void menuSend_DropDownOpening(object sender, EventArgs e)
{
/** Get the list of sessions **/
menuSend.DropDownItems.Clear();
AllSessions.Clear();
foreach (var session in Inspector.GetSessions())
{
var label = session.ToString();
var menuItem = new ToolStripMenuItem();
menuItem.Text = label;
menuItem.Click += new EventHandler(sendSession_Click);
menuSend.DropDownItems.Add(menuItem);
AllSessions.Add(session);
}
}
void sendSession_Click(object sender, EventArgs e)
{
var index = menuSend.DropDownItems.IndexOf((ToolStripItem)sender);
if (index != -1)
{
var session = AllSessions[index];
switch (Packet.Packet.Type)
{
case PacketType.VOLTRON:
var packet = new VariableVoltronPacket((ushort)Packet.Packet.SubType, GetBytes());
session.Write(packet);
break;
}
}
}
private byte[] GetBytes()
{
BytesProvider.ApplyChanges();
byte[] allBytes = new byte[BytesProvider.Bytes.Count];
for (int i = 0; i < allBytes.Length; i++)
{
allBytes[i] = BytesProvider.Bytes[i];
}
return allBytes;
}
private void analyzeResults_SelectedIndexChanged(object sender, EventArgs e)
{
if (analyzeResults.SelectedItem != null)
{
PacketAnalyzerResult item = (PacketAnalyzerResult)analyzeResults.SelectedItem;
hex.Select(item.Offset, item.Length);
}
}
private void btnParse_Click(object sender, EventArgs e)
{
ParsePacket();
}
private void btnImportBytes_Click(object sender, EventArgs e)
{
var result = importBrowser.ShowDialog(this);
if (result == DialogResult.OK)
{
var bytes = File.ReadAllBytes(importBrowser.FileName);
BytesProvider.InsertBytes(BytesProvider.Length, bytes);
}
}
private void btnExportByteArray_Click(object sender, EventArgs e)
{
var bytes = GetBytes();
var str = new StringBuilder();
str.Append("new byte[]{");
for (var i = 0; i < bytes.Length; i++)
{
if (i > 0)
{
str.Append(", ");
}
str.Append("0x" + (bytes[i].ToString("X2")));
}
str.Append("}");
Clipboard.SetText(str.ToString());
}
}
}

372
server/FSO.Server.Debug/PacketView.designer.cs generated Executable file
View file

@ -0,0 +1,372 @@
namespace FSO.Server.Debug
{
partial class PacketView
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(PacketView));
this.toolStrip1 = new System.Windows.Forms.ToolStrip();
this.btnClose = new System.Windows.Forms.ToolStripButton();
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
this.btnStash = new System.Windows.Forms.ToolStripButton();
this.menuSend = new System.Windows.Forms.ToolStripDropDownButton();
this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator();
this.btnParse = new System.Windows.Forms.ToolStripButton();
this.tabControl1 = new System.Windows.Forms.TabControl();
this.tabPage1 = new System.Windows.Forms.TabPage();
this.toolStrip2 = new System.Windows.Forms.ToolStrip();
this.btnTools = new System.Windows.Forms.ToolStripButton();
this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
this.btnWriteUint32 = new System.Windows.Forms.ToolStripButton();
this.btnWriteint32 = new System.Windows.Forms.ToolStripButton();
this.btnWriteUint16 = new System.Windows.Forms.ToolStripButton();
this.btnWriteint16 = new System.Windows.Forms.ToolStripButton();
this.btnWritePascalString = new System.Windows.Forms.ToolStripButton();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.hex = new Be.Windows.Forms.HexBox();
this.analyzeResults = new System.Windows.Forms.ListBox();
this.tabPage2 = new System.Windows.Forms.TabPage();
this.parsedInspetor = new System.Windows.Forms.PropertyGrid();
this.btnImportBytes = new System.Windows.Forms.ToolStripButton();
this.importBrowser = new System.Windows.Forms.OpenFileDialog();
this.toolStripButton1 = new System.Windows.Forms.ToolStripDropDownButton();
this.btnExportByteArray = new System.Windows.Forms.ToolStripMenuItem();
this.toolStrip1.SuspendLayout();
this.tabControl1.SuspendLayout();
this.tabPage1.SuspendLayout();
this.toolStrip2.SuspendLayout();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
this.tabPage2.SuspendLayout();
this.SuspendLayout();
//
// toolStrip1
//
this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.btnClose,
this.toolStripSeparator1,
this.btnStash,
this.menuSend,
this.toolStripSeparator3,
this.btnParse});
this.toolStrip1.Location = new System.Drawing.Point(0, 0);
this.toolStrip1.Name = "toolStrip1";
this.toolStrip1.Size = new System.Drawing.Size(628, 25);
this.toolStrip1.TabIndex = 0;
this.toolStrip1.Text = "toolStrip1";
//
// btnClose
//
this.btnClose.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.btnClose.Image = global::FSO.Server.Debug.Properties.Resources.cross_button;
this.btnClose.ImageTransparentColor = System.Drawing.Color.Magenta;
this.btnClose.Name = "btnClose";
this.btnClose.Size = new System.Drawing.Size(23, 22);
this.btnClose.Text = "Close";
this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
//
// toolStripSeparator1
//
this.toolStripSeparator1.Name = "toolStripSeparator1";
this.toolStripSeparator1.Size = new System.Drawing.Size(6, 25);
//
// btnStash
//
this.btnStash.Image = global::FSO.Server.Debug.Properties.Resources.jar__plus;
this.btnStash.ImageTransparentColor = System.Drawing.Color.Magenta;
this.btnStash.Name = "btnStash";
this.btnStash.Size = new System.Drawing.Size(55, 22);
this.btnStash.Text = "Stash";
this.btnStash.Click += new System.EventHandler(this.btnStash_Click);
//
// menuSend
//
this.menuSend.Image = ((System.Drawing.Image)(resources.GetObject("menuSend.Image")));
this.menuSend.ImageTransparentColor = System.Drawing.Color.Magenta;
this.menuSend.Name = "menuSend";
this.menuSend.Size = new System.Drawing.Size(62, 22);
this.menuSend.Text = "Send";
this.menuSend.DropDownOpening += new System.EventHandler(this.menuSend_DropDownOpening);
//
// toolStripSeparator3
//
this.toolStripSeparator3.Name = "toolStripSeparator3";
this.toolStripSeparator3.Size = new System.Drawing.Size(6, 25);
//
// btnParse
//
this.btnParse.Image = ((System.Drawing.Image)(resources.GetObject("btnParse.Image")));
this.btnParse.ImageTransparentColor = System.Drawing.Color.Magenta;
this.btnParse.Name = "btnParse";
this.btnParse.Size = new System.Drawing.Size(93, 22);
this.btnParse.Text = "Parse Packet";
this.btnParse.Click += new System.EventHandler(this.btnParse_Click);
//
// tabControl1
//
this.tabControl1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.tabControl1.Controls.Add(this.tabPage1);
this.tabControl1.Controls.Add(this.tabPage2);
this.tabControl1.Location = new System.Drawing.Point(3, 28);
this.tabControl1.Name = "tabControl1";
this.tabControl1.SelectedIndex = 0;
this.tabControl1.Size = new System.Drawing.Size(622, 360);
this.tabControl1.TabIndex = 2;
//
// tabPage1
//
this.tabPage1.Controls.Add(this.toolStrip2);
this.tabPage1.Controls.Add(this.splitContainer1);
this.tabPage1.Location = new System.Drawing.Point(4, 22);
this.tabPage1.Name = "tabPage1";
this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
this.tabPage1.Size = new System.Drawing.Size(614, 334);
this.tabPage1.TabIndex = 0;
this.tabPage1.Text = "Hex";
this.tabPage1.UseVisualStyleBackColor = true;
//
// toolStrip2
//
this.toolStrip2.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.btnTools,
this.toolStripSeparator2,
this.btnWriteUint32,
this.btnWriteint32,
this.btnWriteUint16,
this.btnWriteint16,
this.btnWritePascalString,
this.btnImportBytes,
this.toolStripButton1});
this.toolStrip2.Location = new System.Drawing.Point(3, 3);
this.toolStrip2.Name = "toolStrip2";
this.toolStrip2.Size = new System.Drawing.Size(608, 25);
this.toolStrip2.TabIndex = 5;
this.toolStrip2.Text = "toolStrip2";
//
// btnTools
//
this.btnTools.Image = ((System.Drawing.Image)(resources.GetObject("btnTools.Image")));
this.btnTools.ImageTransparentColor = System.Drawing.Color.Magenta;
this.btnTools.Name = "btnTools";
this.btnTools.Size = new System.Drawing.Size(68, 22);
this.btnTools.Text = "Analyse";
this.btnTools.Click += new System.EventHandler(this.btnTools_Click);
//
// toolStripSeparator2
//
this.toolStripSeparator2.Name = "toolStripSeparator2";
this.toolStripSeparator2.Size = new System.Drawing.Size(6, 25);
//
// btnWriteUint32
//
this.btnWriteUint32.Image = ((System.Drawing.Image)(resources.GetObject("btnWriteUint32.Image")));
this.btnWriteUint32.ImageTransparentColor = System.Drawing.Color.Magenta;
this.btnWriteUint32.Name = "btnWriteUint32";
this.btnWriteUint32.Size = new System.Drawing.Size(61, 22);
this.btnWriteUint32.Text = "UInt32";
//
// btnWriteint32
//
this.btnWriteint32.Image = ((System.Drawing.Image)(resources.GetObject("btnWriteint32.Image")));
this.btnWriteint32.ImageTransparentColor = System.Drawing.Color.Magenta;
this.btnWriteint32.Name = "btnWriteint32";
this.btnWriteint32.Size = new System.Drawing.Size(53, 22);
this.btnWriteint32.Text = "Int32";
//
// btnWriteUint16
//
this.btnWriteUint16.Image = ((System.Drawing.Image)(resources.GetObject("btnWriteUint16.Image")));
this.btnWriteUint16.ImageTransparentColor = System.Drawing.Color.Magenta;
this.btnWriteUint16.Name = "btnWriteUint16";
this.btnWriteUint16.Size = new System.Drawing.Size(61, 22);
this.btnWriteUint16.Text = "UInt16";
//
// btnWriteint16
//
this.btnWriteint16.Image = ((System.Drawing.Image)(resources.GetObject("btnWriteint16.Image")));
this.btnWriteint16.ImageTransparentColor = System.Drawing.Color.Magenta;
this.btnWriteint16.Name = "btnWriteint16";
this.btnWriteint16.Size = new System.Drawing.Size(53, 22);
this.btnWriteint16.Text = "Int16";
//
// btnWritePascalString
//
this.btnWritePascalString.Image = ((System.Drawing.Image)(resources.GetObject("btnWritePascalString.Image")));
this.btnWritePascalString.ImageTransparentColor = System.Drawing.Color.Magenta;
this.btnWritePascalString.Name = "btnWritePascalString";
this.btnWritePascalString.Size = new System.Drawing.Size(94, 22);
this.btnWritePascalString.Text = "Pascal String";
//
// splitContainer1
//
this.splitContainer1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.splitContainer1.Location = new System.Drawing.Point(0, 31);
this.splitContainer1.Name = "splitContainer1";
this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal;
//
// splitContainer1.Panel1
//
this.splitContainer1.Panel1.Controls.Add(this.hex);
//
// splitContainer1.Panel2
//
this.splitContainer1.Panel2.BackColor = System.Drawing.Color.Gainsboro;
this.splitContainer1.Panel2.Controls.Add(this.analyzeResults);
this.splitContainer1.Size = new System.Drawing.Size(614, 307);
this.splitContainer1.SplitterDistance = 150;
this.splitContainer1.TabIndex = 4;
//
// hex
//
this.hex.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.hex.Dock = System.Windows.Forms.DockStyle.Fill;
this.hex.Font = new System.Drawing.Font("Courier New", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.hex.InfoForeColor = System.Drawing.Color.Empty;
this.hex.LineInfoVisible = true;
this.hex.Location = new System.Drawing.Point(0, 0);
this.hex.Name = "hex";
this.hex.ShadowSelectionColor = System.Drawing.Color.FromArgb(((int)(((byte)(100)))), ((int)(((byte)(60)))), ((int)(((byte)(188)))), ((int)(((byte)(255)))));
this.hex.Size = new System.Drawing.Size(614, 150);
this.hex.StringViewVisible = true;
this.hex.TabIndex = 2;
this.hex.VScrollBarVisible = true;
//
// analyzeResults
//
this.analyzeResults.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.analyzeResults.FormattingEnabled = true;
this.analyzeResults.Location = new System.Drawing.Point(304, 16);
this.analyzeResults.Name = "analyzeResults";
this.analyzeResults.Size = new System.Drawing.Size(304, 121);
this.analyzeResults.TabIndex = 0;
this.analyzeResults.SelectedIndexChanged += new System.EventHandler(this.analyzeResults_SelectedIndexChanged);
//
// tabPage2
//
this.tabPage2.Controls.Add(this.parsedInspetor);
this.tabPage2.Location = new System.Drawing.Point(4, 22);
this.tabPage2.Name = "tabPage2";
this.tabPage2.Size = new System.Drawing.Size(614, 334);
this.tabPage2.TabIndex = 1;
this.tabPage2.Text = "Parsed Packet";
this.tabPage2.UseVisualStyleBackColor = true;
//
// parsedInspetor
//
this.parsedInspetor.Location = new System.Drawing.Point(3, 3);
this.parsedInspetor.Name = "parsedInspetor";
this.parsedInspetor.Size = new System.Drawing.Size(608, 328);
this.parsedInspetor.TabIndex = 0;
//
// btnImportBytes
//
this.btnImportBytes.Image = ((System.Drawing.Image)(resources.GetObject("btnImportBytes.Image")));
this.btnImportBytes.ImageTransparentColor = System.Drawing.Color.Magenta;
this.btnImportBytes.Name = "btnImportBytes";
this.btnImportBytes.Size = new System.Drawing.Size(84, 22);
this.btnImportBytes.Text = "Import File";
this.btnImportBytes.Click += new System.EventHandler(this.btnImportBytes_Click);
//
// toolStripButton1
//
this.toolStripButton1.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.btnExportByteArray});
this.toolStripButton1.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton1.Image")));
this.toolStripButton1.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolStripButton1.Name = "toolStripButton1";
this.toolStripButton1.Size = new System.Drawing.Size(69, 22);
this.toolStripButton1.Text = "Export";
//
// btnExportByteArray
//
this.btnExportByteArray.Name = "btnExportByteArray";
this.btnExportByteArray.Size = new System.Drawing.Size(207, 22);
this.btnExportByteArray.Text = "To clipboard as C# byte[]";
this.btnExportByteArray.Click += new System.EventHandler(this.btnExportByteArray_Click);
//
// PacketView
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.tabControl1);
this.Controls.Add(this.toolStrip1);
this.Name = "PacketView";
this.Size = new System.Drawing.Size(628, 391);
this.Load += new System.EventHandler(this.PacketView_Load);
this.toolStrip1.ResumeLayout(false);
this.toolStrip1.PerformLayout();
this.tabControl1.ResumeLayout(false);
this.tabPage1.ResumeLayout(false);
this.tabPage1.PerformLayout();
this.toolStrip2.ResumeLayout(false);
this.toolStrip2.PerformLayout();
this.splitContainer1.Panel1.ResumeLayout(false);
this.splitContainer1.Panel2.ResumeLayout(false);
this.splitContainer1.ResumeLayout(false);
this.tabPage2.ResumeLayout(false);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.ToolStrip toolStrip1;
private System.Windows.Forms.ToolStripButton btnClose;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
private System.Windows.Forms.TabControl tabControl1;
private System.Windows.Forms.TabPage tabPage1;
private Be.Windows.Forms.HexBox hex;
private System.Windows.Forms.ToolStripButton btnStash;
private System.Windows.Forms.SplitContainer splitContainer1;
private System.Windows.Forms.ToolStrip toolStrip2;
private System.Windows.Forms.ToolStripButton btnTools;
private System.Windows.Forms.ToolStripDropDownButton menuSend;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator2;
private System.Windows.Forms.ToolStripButton btnWriteint32;
private System.Windows.Forms.ToolStripButton btnWriteUint32;
private System.Windows.Forms.ToolStripButton btnWriteUint16;
private System.Windows.Forms.ToolStripButton btnWriteint16;
private System.Windows.Forms.ToolStripButton btnWritePascalString;
private System.Windows.Forms.ListBox analyzeResults;
private System.Windows.Forms.TabPage tabPage2;
private System.Windows.Forms.PropertyGrid parsedInspetor;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator3;
private System.Windows.Forms.ToolStripButton btnParse;
private System.Windows.Forms.ToolStripButton btnImportBytes;
private System.Windows.Forms.OpenFileDialog importBrowser;
private System.Windows.Forms.ToolStripDropDownButton toolStripButton1;
private System.Windows.Forms.ToolStripMenuItem btnExportByteArray;
}
}

View file

@ -0,0 +1,277 @@
<?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=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>
<metadata name="toolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="menuSend.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAKGSURBVDhPhZBtSFNhFMeftTAqDT8kkkJ9CMrELBUzM3tR
MBpRrBVBKJIJVhCRWWliKpo1rYzMpcyX1HJWohSmlJGO0MrNzFpjIfNlU1llZo4MauPfc64XHJb1hx/3
cM7v3Oe5l/2RTIO79JJ1n1Q5opLkjzwiqKYezURrjqS98JaeN6iD1f2Gc1rbhNow4WgZnXJUDU5NyO4O
G2hGjmjPyrE2d+kJbUV844A1u9WCZ2M/cVFrQ3nPGPQ/gC7OydZRKznkilszmRenORCUpzWdabGgsOsL
6vq+I715EE8/A6qXNjz8CGiGfmFl6hMTueLaTCRyVeXOou7J7cVvsLfGhP23TYit+4BTTRYoinUoeAsc
brAiIrd9klxxzSXRF7SyEpMjUtWH4GuvEX7zHcL5y2SVA0h87ET0DRMCcjsQmK11kCtuuWRb1vOQnA5n
gLIXa5R6rL3ag0COf24nNuQbEFpgRGSpDWHKbie54pZLonKqAtPa7YGXexF6/T02FRuxWWVERJEBUSX9
iCjohaIJ2FExZCdX3HJJzJWD3gkac4x6ELJyC+TVVv4fhgX2lPUj9t4oTusAv5RmM7nilkt2l3kwRfmd
oCydLbF+HEcavuL4g2mS7o8ho20ciltGm4Q7gvvX+MmXsbj6Wr/0TnN8zYg9teWbk4ivttrXZXeYJXwm
OHNkPseXefhuZFuSk9mhRg2LOqsToJp6Hj7h3FnBcaOF2ZnHWcKhE3zY6oU+/JknMF0TNPPk0GH/Sa1X
Kcvw1AtQ/Y8s5YRxkjglnDaOnu1aoJd/SgBBtdBj7BWnjpPC2crx4gjfQ1enK67irOeEsKOLClnmYr0A
1dSbxp+znMM/hbn9Bi6RVNbCkBvIAAAAAElFTkSuQmCC
</value>
</data>
<data name="btnParse.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAEfSURBVDhP1ZK9SgNBFIVnwSaNgjGitrYhghISBDWii13a
kDTp1NfwiRI1/iFEbVTEVJpWLETxKdbveu/gJplgZeGBj3vmsHPPFOv+SutRFLWgLV4jt8G5A6f4ikZh
TctlZh6K+GPLTpgFKOMvmGMlHx+mfMfmmUYui780H5R8fJTy8mS55FvFd83/iFBa6+Bb5bkl/DnTty7B
Kv6aOShCaW3oyVXkIkjrpkZui/MV3OC3Nfpvinn+LdzjdzQKaDFuJSu1p+EfZYaLd8xlWMP3vtO0mgcf
SbnRTVjwWqw9JxZ7yYIH8znoqw1ozAtyLHg0Pwsvan+Rte6Cby1BDO8QVAQTkIFJa90HURXe4BP2YApG
NLAAsjAHC0PMAwuc+wKYtDjrv8PKOgAAAABJRU5ErkJggg==
</value>
</data>
<metadata name="toolStrip2.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>227, 17</value>
</metadata>
<data name="btnTools.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAHBSURBVDhPxdNPS9twHMfxX4jsIXjwWew5ePM2URlFaWXi
0KEtaCpSpRFMW9s4DfaPzGS2moJVwUroOsusrNgJWXWMFvQkO+lWHIMi4sr46DcHYYMNdQd/8D4kfF7h
dwl7+JPvbni+4+CD94kse+fg5V9HSfwsx+8UGbIsZ+dfXn5+DXFqGG6/+1bRlgxZ9qaLVy4OFjA0OQR9
U0e9XkepXIKsytDWNIQWQpCi0m/RlgxZZnTykXMzBqfoRHw9jsxOBqffTqGndRx/OUZ4KYzKYQW+qA+i
IlrRlgxZtmHj52sf5tDv6YexbaD6vWp9yPxkIp1Lo7BXgHlgIrochUf2WNGWDFm2/pRXfxRm0CP0YOv9
FtSUCvmVjEAsgNHgKCaUCYwERiD4hJtoS4YsW+ng42f5EOwuO8bkMQiSgP3yPlJGCsWPReR380isJZDd
zkLRFMyqs9aWDFmmt3J6NeeH7YXNupp32gun1wmX6MLA+ID17s9oS4YsW3zCpb5mJ9Hd14b23va/tmqs
olarQUtq1pYMWTbXwmWqbyWcGOI/qyQGb6JnMmTZs8dcRGrmdu8TWfodHl3XeF3THSND9n8OY1cLIuRK
tChIkwAAAABJRU5ErkJggg==
</value>
</data>
<data name="btnWriteUint32.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAI6SURBVDhPrY9RSFNhFMe/jRkK18l228xF2e5wCmZBRhFW
w1aTio0chhWGUNDTHnsNeiuhh156qcwecq5J8yGNyvQWW2bEEnNrFSO23T0Mttdd9nI5nXP9nCThU3/4
weGc/+/uG/v/CYsO9twWYlFbmEXFxDo4045u2yYi+htftMkH46eUwI8r1Yu/b2hDCM0H4v1KA96ow9tb
Min6hRln8mx6VA3+ug6B76Pg+XRBh+bBn9fAl7qqCrF9Sepyi+ex6GiYbJN9qRF1YOUS+L4Ow7EP52Aj
NNOObme+DavUJYfbmCfWUNfbPsX7ZQhOfAzo9M6f5jro88a+/3MQOt4cUsjhNuZhy5RnabB6ZHEAeuZO
6rhjR6FcLkOhUICd4x1gfeTSsU90gmv6cJUcbmMetCQ8SwGt++VxqNVqkM/nIZ1OQyaTgWw2C7lcDorF
IpRKJbA8lWB3dL9GDrcx9/ED8fOaNNMLqVQK1tbW/ilXKhWwhCVojXVp5HAbc695yr3QV7XOusASkdZ5
JtVlmuv7WQmEqLNKDrcxd80hMdKu2N67wbKIJWJO2nw2zvU9YpqwK+RwGzPW5DCMNcvW+U7VuoyvWMbi
O2nz2TjrO8T8ul2lLjnc5rnV5DfeEZJm2alaV/Ejqyi84tCMmBf2qtShLre2JLjDb7jZKJvGRUWQ91Qt
K06NoJl2dKMOb/8VE9KKdDMH8zKv4Ta7bJhmI8aEDs20oxtjPcgu7tRjRATEjtB/2w76Ieqiw9gfhDpi
1Mewf+0AAAAASUVORK5CYII=
</value>
</data>
<data name="btnWriteint32.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAI8SURBVDhPrY9PaJJxGMd/So4NnEPf6ZpRy1f2J9bqYBSx
SpbVRqFsEllgDOrSwWPXoFsNOnTpUq11aM6suUNbMNpmgpIRFqbOFh7U14Og1/fFizw9z7vfHI3YqS98
4OF5vp/Xn+z/JyhY2VtzgIXNQRYW4tvgTDu67ZuQ4G5f7I2eTFyUPFt+2Ve817yBeH755RPxMUmHN+rw
9p7MC279ki11LT+teH/fBc/mNDi/TKrQPLV1ByY2byv6yNEUdbnF81Kw6uZ7oxNZvzL+4yZc+e6Ds7Gr
sBOaaUe3yz99CnXJ4TbmlSlwbG1Ucn27DucTHhXHp0tcB3Xe2Y999UL/qkMih9uY510LzuSUfHpjHEZW
LqgMRM5ArVaDcrkM3bP9YHphV7HMDYJ98ZRMDrcxz7rizuRkc/jDOWg0GlAqlSCXy0E+n4dCoQDFYhEq
lQpUq1UwvhbhUPh4kxxuY57iBxLuprjkgGw2C5lM5p9yvV4HY1CEnshQkxxuY550Lgytj8qmZTsYQ+I2
b8SWTHNrvyyC4b1NJofbmMeGgBDqk8yfB8C4gSViRdx9Ns6tPdI2Z5HI4TZmpsOqmemMdq8PKqYkviKJ
xTVx99k4qzvEsNqnUJccbvM86HBrH+lThphNMaXxI2kUPnJoRgzRIwp1qMutPfG2uTX326O6WUHSxw7L
xrStSdBMO7pRh7f/ygGkBxlmVuZiLs1Ddkvzjvm1cRWaaUc3xkaQg9xpRYvoEQtC/20/6Ieoiw5jfwAq
DGMd1erLWwAAAABJRU5ErkJggg==
</value>
</data>
<data name="btnWriteUint16.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAI6SURBVDhPrY9BaJJhGMdfZcYG6tAvXTNq+cnmYK2gRRGr
ZFkJI61JtaLFoA5dPHYNutWgQ5cu1VqH5syVO7RFsaVGhouwWuqsEFI/D4Jevw8v8vQ83945GrFTf/jB
w/P8f5+v7P8nKNjYc0uAhS1BFhYSa+BMO7ptmZDgbX3ZGdufOCH5flyRL/6+0biA0Lzvw5Ckwxt1eHtT
pgWvfs6eGl4dV/y/roNvdRxcyXMqNI/8vAae7FVFH9mToi63eB4LNt10Z8yTGVM8Xy/B6S+jcOT9MKyH
ZtrR7dT3UYW65HAb88Qc6F0clNyfz8Oxjz6VgcWTXAd1Xt8PffJD99sDEjncxjxsn3ElR+RDUQ/0LxxX
6Ykchmq1CqVSCbZPdoP5kUPFOuUEx4uDMjncxjxoT7iSZxt9r45CvV6HYrEI2WwWcrkc5PN5KBQKUC6X
oVKpgOmpCDvDexvkcBtzHz+QONMQ5wYgk8lAOp3+p1yr1cAUFKEj0tsgh9uYe4YZ57tB2TzvAFNIXOOZ
2JRpbu7nRTDM2mVyuI25awwIoS7JEu8BUxRLxIK48Wycm3tEN2WVyOE2ZqLNppkwxIQlp2JexlcsY3FJ
3Hg2zuoOMb7pUqhLDrd5brV5tXf0KWPcrphX8CMrKLzm0IwYo7sV6lCXW5vi3+bV3GyNtUwKkj6+SzZ9
szcImmlHN+rw9l9pQTqQPmZjbubW3GaXNbNsTJtQoZl2dGOsH9nBnWa0iB6xIvTftoJ+iLroMPYHz9di
9dziY6IAAAAASUVORK5CYII=
</value>
</data>
<data name="btnWriteint16.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAI6SURBVDhPrY9RSFNhFMe/jRkK18l228xF2e5wCmZBRhFW
w1aTio0chhWGUNDTHnsNeiuhh156qcwecq5J8yGNyvQWW2bEEnNrFSO23T0Mttdd9nI5nXP9nCThU3/4
weGc/+/uG/v/CYsO9twWYlFbmEXFxDo4045u2yYi+htftMkH46eUwI8r1Yu/b2hDCM0H4v1KA96ow9tb
Min6hRln8mx6VA3+ug6B76Pg+XRBh+bBn9fAl7qqCrF9Sepyi+ex6GiYbJN9qRF1YOUS+L4Ow7EP52Aj
NNOObme+DavUJYfbmCfWUNfbPsX7ZQhOfAzo9M6f5jro88a+/3MQOt4cUsjhNuZhy5RnabB6ZHEAeuZO
6rhjR6FcLkOhUICd4x1gfeTSsU90gmv6cJUcbmMetCQ8SwGt++VxqNVqkM/nIZ1OQyaTgWw2C7lcDorF
IpRKJbA8lWB3dL9GDrcx9/ED8fOaNNMLqVQK1tbW/ilXKhWwhCVojXVp5HAbc695yr3QV7XOusASkdZ5
JtVlmuv7WQmEqLNKDrcxd80hMdKu2N67wbKIJWJO2nw2zvU9YpqwK+RwGzPW5DCMNcvW+U7VuoyvWMbi
O2nz2TjrO8T8ul2lLjnc5rnV5DfeEZJm2alaV/Ejqyi84tCMmBf2qtShLre2JLjDb7jZKJvGRUWQ91Qt
K06NoJl2dKMOb/8VE9KKdDMH8zKv4Ta7bJhmI8aEDs20oxtjPcgu7tRjRATEjtB/2w76Ieqiw9gfhDpi
1Mewf+0AAAAASUVORK5CYII=
</value>
</data>
<data name="btnWritePascalString.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAI6SURBVDhPrY9RaFJhFMc/xcUGdw696ZpRyytzg7WCFkWs
kmW5GCjNBmuwGBS9+dhr0FsNeuill2qth+ackXtoi1pLqyktwsVSs8JAvT4I+urFl8vpnLtvjkbsqT/8
4HDO/3f9ZP8/QdHG5i0BFrYEWViMb4Iz7ei2a0Kit/lFR+zo6jnZ92O8Nvr7hnoZofnI6qDchDfq8PaO
zIpeYcGevJieVPy/roPv+yS4Pl3SoHnk5zXwpK8qQuRQkrrc4nks2ppmO2Ke9IQy9PUKeNbH4NSHYdgK
zbSj24VvYwp1yeE25ok50LM8ILu/jMKZhE+j/+15roM2b+0HP/uh680xmRxuYx62zbkSI7UT0SHoWzqr
4YychEqlAsViEfZOd4H5kUPDOtMNjvDxGjncxjxoi7sSXrX35Wmo1+tQKBQgk8lANpuFXC4H+XweSqUS
lMtlMD2VYH/4sEoOtzH38QMfh1VpoR/S6TSkUql/ytVqFUxBCdojPSo53Mbca51zvhuomRcdYApJmzyT
GjLNjf2iBMK8vUYOtzF3jQEx1Clb3jvBFMUSsSRtPxvnxh4xzFhlcriNmWqx6aZaY6blbsW8hq9Yw+KK
tP1snLUdYnzdqVCXHG7z3Grx6u8ISWPUrpg38CMbKLzi0IwYVw4q1KEut3bEv8eru9kcM0yLshA7UDOt
21WCZtrRjTq8/VcMSDvSy2zMzdy622xc95xN6OMaNNOOboz1Ifu404geERArQv9tN+iHqIsOY38ATfti
vc3anMAAAAAASUVORK5CYII=
</value>
</data>
<data name="btnImportBytes.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAF2SURBVDhPYxgawH7uixggPgOioULEA5sZj2NsZj45M/n+
//8gGsSHSqECs0l3Z5pPuosiCeKbT753pv/2v/+NZ3//77v19z+Ij64ODIx6rp8BYcOuq2BJEA3id1//
87/iyHc47rjy+z9IHKwJGWi3nD/TefX3fxCt03yuH0S3Xvz5v2DPZzhuOvcTIt96HtMFqlVHz5Qf/gJU
9OM/iN1w5sf/zK0f4Lj6+DewuFrNcexhIF+850zx/k//0za9+19z4tv/hLWv/ocufvDfe9b1/0kbHv4H
ySuW7MeuGQTEs7aeKdz76X/8+tf/3RY++G8x48Z/s+nX/weve/wfJCeRsw23ZhAQTFxzJmLru//aC5/8
V5v/CIydN778DxIXTFjdD1WGG/BELT2jteHTf7Hl71GwzqZP/0Fy3BGL8buAPWjuGbkdv/+LbP71XxiI
hYBYYNOv//xALLbl13+QPGvwXNyGMPvNnMnkO+MMPgxSA1U+aAADAwA7TQnn8HZE9QAAAABJRU5ErkJg
gg==
</value>
</data>
<data name="toolStripButton1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAFoSURBVDhPYxh8wH7ey5n2c1+cwYuBaqDKMYHN7GcxNjOf
nJl8////7uv//nddQ8V9t/79B8lDlWMH5pPuxphPvnem58bv/8X7v6Lg2pPf/4PkoEpxA8Oe6/1GPdfP
NJ//8T998zs4Ltr36T9IHKoMO9BpOhuj3XL+TOXRD/99Z1797zHlwn/XiWfBOGLJrf8gOahSTKBSeSRG
teromdydT/+7TDgDx6kbH4DpoHlX/4PkocpRgVzhnhj54j1nknc8/2819QocR214/B8kHrbm4X/3BbfA
bKgWBBDL3BIjnrX1TPCut//V5z+CY8/Nr/+DxMUzt/aDaLu1L8B8qDYEEExcc8Zx37f/Iis/wrHpjq//
QeLCiatjQGpANIgPwmBNyIA3elkMT9TSM5r7/v5n2fjnv/Kev/9BfJA4VAkYgPhAjD0hcQTPjWEPmntG
avf//yAaxIdKEQ+YfGfEAPEZEA0VGtSAgQEAqhMIKUAk180AAAAASUVORK5CYII=
</value>
</data>
<metadata name="importBrowser.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>332, 17</value>
</metadata>
</root>

View file

@ -0,0 +1,19 @@
using System;
using System.Windows.Forms;
namespace FSO.Server.Debug
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
//Application.Run(new NetworkDebugger());
}
}
}

View 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("FSO.Server.Debug")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("FSO.Server.Debug")]
[assembly: AssemblyCopyright("Copyright © 2015")]
[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)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("7296ccec-f459-4071-a9d2-9a07dcc29210")]
// 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

@ -0,0 +1,163 @@
//------------------------------------------------------------------------------
// <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 FSO.Server.Debug.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", "4.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("FSO.Server.Debug.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;
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap bin {
get {
object obj = ResourceManager.GetObject("bin", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap blueprint__plus {
get {
object obj = ResourceManager.GetObject("blueprint--plus", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap box_add {
get {
object obj = ResourceManager.GetObject("box-add", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap cross_button {
get {
object obj = ResourceManager.GetObject("cross-button", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap filter {
get {
object obj = ResourceManager.GetObject("filter", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap icondsel {
get {
object obj = ResourceManager.GetObject("icondsel", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap iconsel {
get {
object obj = ResourceManager.GetObject("iconsel", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap jar__plus {
get {
object obj = ResourceManager.GetObject("jar--plus", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap search {
get {
object obj = ResourceManager.GetObject("search", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap users {
get {
object obj = ResourceManager.GetObject("users", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
}
}

View file

@ -0,0 +1,151 @@
<?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=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>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="iconsel" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\iconsel.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="cross-button" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\cross-button.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="users" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\users.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="icondsel" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Icondsel.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="filter" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\filter.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="blueprint--plus" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\blueprint--plus.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="search" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\search.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="box-add" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\box-add.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="bin" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\bin.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="jar--plus" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\jar--plus.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>

View file

@ -0,0 +1,26 @@
//------------------------------------------------------------------------------
// <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 FSO.Server.Debug.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.0.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

@ -0,0 +1,7 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>

View file

@ -0,0 +1,28 @@
using FSO.Server.Common;
using FSO.Server.Protocol.Voltron;
using FSO.Server.Protocol.Aries;
namespace tso.debug.network
{
public class RawPacketReference
{
public Packet Packet;
public int Sequence;
}
public static class PacketExtensions
{
public static string GetPacketName(this Packet packet)
{
switch (packet.Type)
{
case PacketType.VOLTRON:
return VoltronPacketTypeUtils.FromPacketCode((ushort)packet.SubType).ToString();
case PacketType.ARIES:
return AriesPacketTypeUtils.FromPacketCode(packet.SubType).ToString();
}
return packet.Type.ToString() + " (" + packet.SubType + ")";
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 699 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 712 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 213 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 588 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 234 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 870 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 321 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 301 B

View file

@ -0,0 +1,52 @@
using System;
using System.Windows.Forms;
namespace tso.debug.network
{
public partial class StringDialog : Form
{
public StringDialogResult Result;
public StringDialog(string title, string description)
{
this.Text = title;
InitializeComponent();
this.description.Text = description;
}
private void StringModal_Load(object sender, EventArgs e)
{
}
private void txtValue_Enter(object sender, EventArgs e)
{
btnOk.PerformClick();
}
private void txtValue_TextChanged(object sender, EventArgs e)
{
this.btnOk.Enabled = txtValue.Text.Length > 0;
}
private void StringDialog_Deactivate(object sender, EventArgs e)
{
}
private void btnOk_Click(object sender, EventArgs e)
{
SetResult();
}
private void SetResult()
{
Result = new StringDialogResult { Value = txtValue.Text };
}
}
public class StringDialogResult
{
public string Value;
}
}

103
server/FSO.Server.Debug/StringDialog.designer.cs generated Executable file
View file

@ -0,0 +1,103 @@
namespace tso.debug.network
{
partial class StringDialog
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.description = new System.Windows.Forms.Label();
this.btnCancel = new System.Windows.Forms.Button();
this.btnOk = new System.Windows.Forms.Button();
this.txtValue = new System.Windows.Forms.TextBox();
this.SuspendLayout();
//
// description
//
this.description.AutoSize = true;
this.description.Location = new System.Drawing.Point(12, 9);
this.description.Name = "description";
this.description.Size = new System.Drawing.Size(35, 13);
this.description.TabIndex = 0;
this.description.Text = "label1";
//
// btnCancel
//
this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.btnCancel.Location = new System.Drawing.Point(299, 62);
this.btnCancel.Name = "btnCancel";
this.btnCancel.Size = new System.Drawing.Size(75, 23);
this.btnCancel.TabIndex = 1;
this.btnCancel.Text = "Cancel";
this.btnCancel.UseVisualStyleBackColor = true;
//
// btnOk
//
this.btnOk.DialogResult = System.Windows.Forms.DialogResult.OK;
this.btnOk.Enabled = false;
this.btnOk.Location = new System.Drawing.Point(218, 62);
this.btnOk.Name = "btnOk";
this.btnOk.Size = new System.Drawing.Size(75, 23);
this.btnOk.TabIndex = 2;
this.btnOk.Text = "Ok";
this.btnOk.UseVisualStyleBackColor = true;
this.btnOk.Click += new System.EventHandler(this.btnOk_Click);
//
// txtValue
//
this.txtValue.Location = new System.Drawing.Point(15, 36);
this.txtValue.Name = "txtValue";
this.txtValue.Size = new System.Drawing.Size(359, 20);
this.txtValue.TabIndex = 3;
this.txtValue.TextChanged += new System.EventHandler(this.txtValue_TextChanged);
this.txtValue.Enter += new System.EventHandler(this.txtValue_Enter);
//
// StringDialog
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(386, 96);
this.Controls.Add(this.txtValue);
this.Controls.Add(this.btnOk);
this.Controls.Add(this.btnCancel);
this.Controls.Add(this.description);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.Name = "StringDialog";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Deactivate += new System.EventHandler(this.StringDialog_Deactivate);
this.Load += new System.EventHandler(this.StringModal_Load);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label description;
private System.Windows.Forms.Button btnCancel;
private System.Windows.Forms.Button btnOk;
private System.Windows.Forms.TextBox txtValue;
}
}

View 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=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>

Binary file not shown.

View file

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Common.Logging" version="3.4.1" targetFramework="net45" />
<package id="Common.Logging.Core" version="3.4.1" targetFramework="net45" />
<package id="Microsoft.CSharp" version="4.3.0" targetFramework="net45" />
<package id="Mina" version="2.0.11" targetFramework="net45" />
<package id="Newtonsoft.Json" version="12.0.2" targetFramework="net45" />
<package id="Portable.Ninject" version="3.3.1" targetFramework="net45" />
</packages>