Skip to content

Commit

Permalink
Release v0.9.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
thejoe8495 committed Dec 16, 2017
1 parent 00f540a commit 8b53f04
Show file tree
Hide file tree
Showing 105 changed files with 677 additions and 8,183 deletions.
10 changes: 10 additions & 0 deletions ARPScanner/ARPScanner.cs
@@ -0,0 +1,10 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace NIHT.Plugins.ARPScanner {
public class ARPScanner {
}
}
76 changes: 76 additions & 0 deletions ARPScanner/ARPScanner.csproj
@@ -0,0 +1,76 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" 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>{B4879FD3-73BD-49F4-BA71-2104BF4ECF41}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>NIHT.Plugins.ARPScanner</RootNamespace>
<AssemblyName>Plugin.ARPScanner</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>none</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\x64\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<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.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="ARPScanner.cs" />
<Compile Include="pcapwrapper.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Basetools\Basetools.csproj">
<Project>{b1eacf94-22a9-4c47-9be5-33332e39e07b}</Project>
<Name>Basetools</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>mkdir "$(SolutionDir)WPFApp\bin\$(Configuration)\plugins\"
copy "$(TargetPath)" "$(SolutionDir)WPFApp\bin\$(Configuration)\plugins\$(TargetFileName)"</PostBuildEvent>
</PropertyGroup>
</Project>
36 changes: 36 additions & 0 deletions ARPScanner/Properties/AssemblyInfo.cs
@@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// Allgemeine Informationen über eine Assembly werden über die folgenden
// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
// die einer Assembly zugeordnet sind.
[assembly: AssemblyTitle("ARPScanner")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("ARPScanner")]
[assembly: AssemblyCopyright("Copyright © 2017")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// Durch Festlegen von ComVisible auf FALSE werden die Typen in dieser Assembly
// für COM-Komponenten unsichtbar. Wenn Sie auf einen Typ in dieser Assembly von
// COM aus zugreifen müssen, sollten Sie das ComVisible-Attribut für diesen Typ auf "True" festlegen.
[assembly: ComVisible(false)]

// Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird
[assembly: Guid("b4879fd3-73bd-49f4-ba71-2104bf4ecf41")]

// Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
//
// Hauptversion
// Nebenversion
// Buildnummer
// Revision
//
// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
// indem Sie "*" wie unten gezeigt eingeben:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
79 changes: 79 additions & 0 deletions ARPScanner/pcapwrapper.cs
@@ -0,0 +1,79 @@
using PcapDotNet.Base;
using PcapDotNet.Core;
using PcapDotNet.Packets;
using PcapDotNet.Packets.Arp;
using PcapDotNet.Packets.Dns;
using PcapDotNet.Packets.Ethernet;
using PcapDotNet.Packets.Gre;
using PcapDotNet.Packets.Http;
using PcapDotNet.Packets.Icmp;
using PcapDotNet.Packets.Igmp;
using PcapDotNet.Packets.IpV4;
using PcapDotNet.Packets.IpV6;
using PcapDotNet.Packets.Transport;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace NIHT.Plugins.Lanscanner {
class PcapWrapper {


/// <summary>
/// This function build an ARP over Ethernet packet.
/// </summary>
private static Packet BuildArpPacket() {
EthernetLayer ethernetLayer =
new EthernetLayer {
Source = new MacAddress("36:63:35:66:62:62"),
Destination = new MacAddress("FF:FF:FF:FF:FF:FF"),
EtherType = EthernetType.None, // Will be filled automatically.
};

ArpLayer arpLayer =
new ArpLayer {
ProtocolType = EthernetType.IpV4,
Operation = ArpOperation.Request,
SenderHardwareAddress = new byte[] { 36, 63, 35, 66, 62, 62 }.AsReadOnly(), // 03:03:03:03:03:03.
SenderProtocolAddress = new byte[] { 192, 168, 10, 203 }.AsReadOnly(), // 1.2.3.4.
TargetHardwareAddress = new byte[] { 255, 255, 255, 255, 255, 255 }.AsReadOnly(), // 04:04:04:04:04:04.
TargetProtocolAddress = new byte[] { 255, 255, 255, 255 }.AsReadOnly(), // 11.22.33.44.
};

PacketBuilder builder = new PacketBuilder(ethernetLayer, arpLayer);

return builder.Build(DateTime.Now);
}

/// <summary>
/// This function build a VLanTaggedFrame over Ethernet with payload packet.
/// </summary>
private static Packet BuildVLanTaggedFramePacket() {
EthernetLayer ethernetLayer =
new EthernetLayer {
Source = new MacAddress("01:01:01:01:01:01"),
Destination = new MacAddress("02:02:02:02:02:02"),
EtherType = EthernetType.None, // Will be filled automatically.
};

VLanTaggedFrameLayer vLanTaggedFrameLayer =
new VLanTaggedFrameLayer {
PriorityCodePoint = ClassOfService.Background,
CanonicalFormatIndicator = false,
VLanIdentifier = 50,
EtherType = EthernetType.IpV4,
};

PayloadLayer payloadLayer =
new PayloadLayer {
Data = new Datagram(Encoding.ASCII.GetBytes("hello world")),
};

PacketBuilder builder = new PacketBuilder(ethernetLayer, vLanTaggedFrameLayer, payloadLayer);

return builder.Build(DateTime.Now);
}
}
}
31 changes: 25 additions & 6 deletions BasePlugins/BasePlugins.csproj
Expand Up @@ -22,13 +22,31 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<DebugType>none</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\x64\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
Expand All @@ -43,17 +61,18 @@
<Reference Include="WindowsBase" />
</ItemGroup>
<ItemGroup>
<Compile Include="Extensions.cs" />
<Compile Include="LanInfo.cs" />
<Compile Include="NetworkTools.cs" />
<Compile Include="PluginInterface.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\DnsDig\DnsDig.csproj">
<ProjectReference Include="..\Basetools\Basetools.csproj">
<Project>{b1eacf94-22a9-4c47-9be5-33332e39e07b}</Project>
<Name>DnsDig</Name>
<Name>Basetools</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>mkdir "$(SolutionDir)WPFApp\bin\$(Configuration)\plugins\"
copy "$(TargetPath)" "$(SolutionDir)WPFApp\bin\$(Configuration)\plugins\$(TargetFileName)"</PostBuildEvent>
</PropertyGroup>
</Project>
3 changes: 2 additions & 1 deletion BasePlugins/laninfo.cs
Expand Up @@ -11,8 +11,9 @@
using System.Windows.Controls;
using System.Windows.Media;
using System.Windows.Shapes;
using NIHT.Plugins.Base;

namespace NIHT.Plugins.Base {
namespace NIHT.Plugins.LanInfo {
public class LanInfo : NetworkTools, PluginInterface {
#region IPlugin Members
Grid grd;
Expand Down
42 changes: 30 additions & 12 deletions DnsDig/DnsDig.csproj → Basetools/Basetools.csproj
Expand Up @@ -8,8 +8,8 @@
<ProjectGuid>{B1EACF94-22A9-4C47-9BE5-33332E39E07B}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>DnsDig</RootNamespace>
<AssemblyName>DnsDig</AssemblyName>
<RootNamespace>NIHT.Plugins.Base</RootNamespace>
<AssemblyName>Basetools</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileUpgradeFlags>
</FileUpgradeFlags>
Expand Down Expand Up @@ -45,7 +45,7 @@
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<DebugType>none</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
Expand All @@ -57,8 +57,32 @@
<PropertyGroup>
<StartupObject />
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\x64\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.CSharp" />
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
<Reference Include="System" />
<Reference Include="System.Xml" />
<Reference Include="System.Xml.Linq" />
<Reference Include="WindowsBase" />
</ItemGroup>
<ItemGroup>
<Compile Include="Dns\Records\NotUsed\RecordSSHFP.cs" />
Expand Down Expand Up @@ -127,6 +151,9 @@
<Compile Include="Dns\RR.cs" />
<Compile Include="Dns\RecordReader.cs" />
<Compile Include="Dns\Resolver.cs" />
<Compile Include="Extensions.cs" />
<Compile Include="NetworkTools.cs" />
<Compile Include="PluginInterface.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
Expand All @@ -153,17 +180,8 @@
<Compile Include="Dns\Records\RecordSOA.cs" />
<Compile Include="Dns\Structs.cs" />
</ItemGroup>
<ItemGroup>
<None Include="Doc\rfc1034.txt" />
<None Include="Doc\rfc1035.txt" />
</ItemGroup>
<ItemGroup>
<None Include="Doc\rfc1886.txt" />
</ItemGroup>
<ItemGroup>
<Content Include="Dns\Root\named_root.txt" />
<Content Include="Doc\rfc2782.txt" />
<Content Include="Doc\rfc2915.txt" />
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
17 changes: 9 additions & 8 deletions BasePlugins/NetworkTools.cs → Basetools/NetworkTools.cs
Expand Up @@ -26,22 +26,23 @@ public class NetworkTools {
int success = 0;
Console.WriteLine("Ping wird ausgeführt für " + ip + " mit 32 Bytes Daten:");
for (int i = 0; i < menge; i++) {
PingReply reply = pingSender.Send(ip, timeout, buffer, options);
if (reply.Status == IPStatus.Success) {
Console.WriteLine("Antwort von {0} Bytes = {1} Zeit {2}ms TTL = {3}", ip, reply.Buffer.Length, reply.RoundtripTime, reply.Options.Ttl);
success++;
}else
Console.WriteLine("Zeitüberschreitung");
try {
PingReply reply = pingSender.Send(ip, timeout, buffer, options);
if (reply.Status == IPStatus.Success) {
//Console.WriteLine("Antwort von {0} Bytes = {1} Zeit {2}ms TTL = {3}", ip, reply.Buffer.Length, reply.RoundtripTime, reply.Options.Ttl);
success++;
} //else
//Console.WriteLine("Zeitüberschreitung");
} catch {
}
}
if (success > 0) return true;
return false;
}
public static string DNSLookup(string hostNameOrAddress) {
try {
IPHostEntry hostEntry = Dns.GetHostEntry(hostNameOrAddress);

IPAddress[] ips = hostEntry.AddressList;

return string.Join("; ", ips.Select(m => m.ToString()));
} catch (System.Net.Sockets.SocketException) {
return "";
Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit 8b53f04

Please sign in to comment.