From f91a6a0e41160a627dfd32c01f4325d3cdb51664 Mon Sep 17 00:00:00 2001 From: plane000 Date: Sat, 12 May 2018 12:54:49 +0100 Subject: [PATCH] Started networking tools --- C#/IRC/IRCServer/IRCServer/Program.cs | 5 ++ C#/IRC/Networking Tools/Networking Tools.sln | 25 +++++++++ .../Networking Tools/App.config | 6 ++ .../Networking Tools/Networking Tools.csproj | 53 ++++++++++++++++++ .../Networking Tools/Program.cs | 12 ++++ .../Properties/AssemblyInfo.cs | 36 ++++++++++++ .../Networking Tools/UserInterface.cs | 13 +++++ C#/Networking Tools/Networking Tools.sln | 25 +++++++++ .../Networking Tools/App.config | 6 ++ .../Networking Tools/DNSTest.cs | 26 +++++++++ .../Networking Tools/Networking Tools.csproj | 55 +++++++++++++++++++ .../Networking Tools/Program.cs | 14 +++++ .../Properties/AssemblyInfo.cs | 36 ++++++++++++ .../Networking Tools/UserInterface.cs | 24 ++++++++ .../Networking Tools/WebTools.cs | 13 +++++ 15 files changed, 349 insertions(+) create mode 100644 C#/IRC/Networking Tools/Networking Tools.sln create mode 100644 C#/IRC/Networking Tools/Networking Tools/App.config create mode 100644 C#/IRC/Networking Tools/Networking Tools/Networking Tools.csproj create mode 100644 C#/IRC/Networking Tools/Networking Tools/Program.cs create mode 100644 C#/IRC/Networking Tools/Networking Tools/Properties/AssemblyInfo.cs create mode 100644 C#/IRC/Networking Tools/Networking Tools/UserInterface.cs create mode 100644 C#/Networking Tools/Networking Tools.sln create mode 100644 C#/Networking Tools/Networking Tools/App.config create mode 100644 C#/Networking Tools/Networking Tools/DNSTest.cs create mode 100644 C#/Networking Tools/Networking Tools/Networking Tools.csproj create mode 100644 C#/Networking Tools/Networking Tools/Program.cs create mode 100644 C#/Networking Tools/Networking Tools/Properties/AssemblyInfo.cs create mode 100644 C#/Networking Tools/Networking Tools/UserInterface.cs create mode 100644 C#/Networking Tools/Networking Tools/WebTools.cs diff --git a/C#/IRC/IRCServer/IRCServer/Program.cs b/C#/IRC/IRCServer/IRCServer/Program.cs index 90347ab..8b2dfa4 100644 --- a/C#/IRC/IRCServer/IRCServer/Program.cs +++ b/C#/IRC/IRCServer/IRCServer/Program.cs @@ -1,12 +1,17 @@ using System; +using System.Net; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; +using System.Net.Sockets; namespace IRCServer { class Program { static void Main(string[] args) { + + + } } } diff --git a/C#/IRC/Networking Tools/Networking Tools.sln b/C#/IRC/Networking Tools/Networking Tools.sln new file mode 100644 index 0000000..e29f275 --- /dev/null +++ b/C#/IRC/Networking Tools/Networking Tools.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.27703.1 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Networking Tools", "Networking Tools\Networking Tools.csproj", "{B0B5BFC7-FAE9-4DBD-B622-9CF51AE79873}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {B0B5BFC7-FAE9-4DBD-B622-9CF51AE79873}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B0B5BFC7-FAE9-4DBD-B622-9CF51AE79873}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B0B5BFC7-FAE9-4DBD-B622-9CF51AE79873}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B0B5BFC7-FAE9-4DBD-B622-9CF51AE79873}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {BCDA8177-4DC7-46E6-AF05-CF559BC641E2} + EndGlobalSection +EndGlobal diff --git a/C#/IRC/Networking Tools/Networking Tools/App.config b/C#/IRC/Networking Tools/Networking Tools/App.config new file mode 100644 index 0000000..731f6de --- /dev/null +++ b/C#/IRC/Networking Tools/Networking Tools/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/C#/IRC/Networking Tools/Networking Tools/Networking Tools.csproj b/C#/IRC/Networking Tools/Networking Tools/Networking Tools.csproj new file mode 100644 index 0000000..609c1f6 --- /dev/null +++ b/C#/IRC/Networking Tools/Networking Tools/Networking Tools.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + {B0B5BFC7-FAE9-4DBD-B622-9CF51AE79873} + Exe + Networking_Tools + Networking Tools + v4.6.1 + 512 + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/C#/IRC/Networking Tools/Networking Tools/Program.cs b/C#/IRC/Networking Tools/Networking Tools/Program.cs new file mode 100644 index 0000000..4542cb1 --- /dev/null +++ b/C#/IRC/Networking Tools/Networking Tools/Program.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Networking_Tools { + class Program { + static void Main(string[] args) { + } + } +} diff --git a/C#/IRC/Networking Tools/Networking Tools/Properties/AssemblyInfo.cs b/C#/IRC/Networking Tools/Networking Tools/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..090a1de --- /dev/null +++ b/C#/IRC/Networking Tools/Networking Tools/Properties/AssemblyInfo.cs @@ -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("Networking Tools")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Networking Tools")] +[assembly: AssemblyCopyright("Copyright © 2018")] +[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("b0b5bfc7-fae9-4dbd-b622-9cf51ae79873")] + +// 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")] diff --git a/C#/IRC/Networking Tools/Networking Tools/UserInterface.cs b/C#/IRC/Networking Tools/Networking Tools/UserInterface.cs new file mode 100644 index 0000000..7bcf609 --- /dev/null +++ b/C#/IRC/Networking Tools/Networking Tools/UserInterface.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Networking_Tools { + class UserInterface { + + + + } +} diff --git a/C#/Networking Tools/Networking Tools.sln b/C#/Networking Tools/Networking Tools.sln new file mode 100644 index 0000000..a883d70 --- /dev/null +++ b/C#/Networking Tools/Networking Tools.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.27703.1 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Networking Tools", "Networking Tools\Networking Tools.csproj", "{9F0BDD71-F93F-4800-B76A-0142A0CAA8BB}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {9F0BDD71-F93F-4800-B76A-0142A0CAA8BB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9F0BDD71-F93F-4800-B76A-0142A0CAA8BB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9F0BDD71-F93F-4800-B76A-0142A0CAA8BB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9F0BDD71-F93F-4800-B76A-0142A0CAA8BB}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {12E4FA83-42D0-401E-9FCA-CCEFE4AEABA1} + EndGlobalSection +EndGlobal diff --git a/C#/Networking Tools/Networking Tools/App.config b/C#/Networking Tools/Networking Tools/App.config new file mode 100644 index 0000000..731f6de --- /dev/null +++ b/C#/Networking Tools/Networking Tools/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/C#/Networking Tools/Networking Tools/DNSTest.cs b/C#/Networking Tools/Networking Tools/DNSTest.cs new file mode 100644 index 0000000..c3a96d5 --- /dev/null +++ b/C#/Networking Tools/Networking Tools/DNSTest.cs @@ -0,0 +1,26 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net; +using System.Text; +using System.Threading.Tasks; + +namespace Networking_Tools { + class DNSTest { + public string HostName { get; set; } + + public string[] GetIPs() { + List ipAddresses = new List(); + IPHostEntry iphost = Dns.GetHostEntry(HostName); + + foreach (IPAddress theAddress in iphost.AddressList) { + if (theAddress.AddressFamily == System.Net.Sockets.AddressFamily.InterNetwork) { + ipAddresses.Add(theAddress.ToString()); + } + } + + return ipAddresses.ToArray(); + } + + } +} diff --git a/C#/Networking Tools/Networking Tools/Networking Tools.csproj b/C#/Networking Tools/Networking Tools/Networking Tools.csproj new file mode 100644 index 0000000..220dfe8 --- /dev/null +++ b/C#/Networking Tools/Networking Tools/Networking Tools.csproj @@ -0,0 +1,55 @@ + + + + + Debug + AnyCPU + {9F0BDD71-F93F-4800-B76A-0142A0CAA8BB} + Exe + Networking_Tools + Networking Tools + v4.6.1 + 512 + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/C#/Networking Tools/Networking Tools/Program.cs b/C#/Networking Tools/Networking Tools/Program.cs new file mode 100644 index 0000000..71d8eeb --- /dev/null +++ b/C#/Networking Tools/Networking Tools/Program.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Networking_Tools { + class Program { + static void Main(string[] args) { + UserInterface UI = new UserInterface(); + UI.Load(); + } + } +} diff --git a/C#/Networking Tools/Networking Tools/Properties/AssemblyInfo.cs b/C#/Networking Tools/Networking Tools/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..4a0777f --- /dev/null +++ b/C#/Networking Tools/Networking Tools/Properties/AssemblyInfo.cs @@ -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("Networking Tools")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Networking Tools")] +[assembly: AssemblyCopyright("Copyright © 2018")] +[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("9f0bdd71-f93f-4800-b76a-0142a0caa8bb")] + +// 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")] diff --git a/C#/Networking Tools/Networking Tools/UserInterface.cs b/C#/Networking Tools/Networking Tools/UserInterface.cs new file mode 100644 index 0000000..8b0d6cf --- /dev/null +++ b/C#/Networking Tools/Networking Tools/UserInterface.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Networking_Tools { + class UserInterface { + + private int startWidth; + private int startHeight; + + public void Load() { + Console.SetCursorPosition(0, 0); + startHeight = Console.WindowHeight; + startWidth = Console.WindowWidth; + + + } + + + + } +} diff --git a/C#/Networking Tools/Networking Tools/WebTools.cs b/C#/Networking Tools/Networking Tools/WebTools.cs new file mode 100644 index 0000000..7bd5e22 --- /dev/null +++ b/C#/Networking Tools/Networking Tools/WebTools.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Networking_Tools { + class WebTools { + + + + } +}