Initial commit
|
@ -0,0 +1,205 @@
|
|||
## Ignore Visual Studio temporary files, build results, and
|
||||
## files generated by popular Visual Studio add-ons.
|
||||
|
||||
# User-specific files
|
||||
*.suo
|
||||
*.user
|
||||
*.userosscache
|
||||
*.sln.docstates
|
||||
|
||||
# User-specific files (MonoDevelop/Xamarin Studio)
|
||||
*.userprefs
|
||||
|
||||
# Build results
|
||||
[Dd]ebug/
|
||||
[Dd]ebugPublic/
|
||||
[Rr]elease/
|
||||
[Rr]eleases/
|
||||
x64/
|
||||
x86/
|
||||
build/
|
||||
bld/
|
||||
[Bb]in/
|
||||
[Oo]bj/
|
||||
|
||||
# Visual Studio 2015 cache/options directory
|
||||
.vs/
|
||||
|
||||
# MSTest test Results
|
||||
[Tt]est[Rr]esult*/
|
||||
[Bb]uild[Ll]og.*
|
||||
|
||||
# NUNIT
|
||||
*.VisualState.xml
|
||||
TestResult.xml
|
||||
|
||||
# Build Results of an ATL Project
|
||||
[Dd]ebugPS/
|
||||
[Rr]eleasePS/
|
||||
dlldata.c
|
||||
|
||||
# DNX
|
||||
project.lock.json
|
||||
artifacts/
|
||||
|
||||
*_i.c
|
||||
*_p.c
|
||||
*_i.h
|
||||
*.ilk
|
||||
*.meta
|
||||
*.obj
|
||||
*.pch
|
||||
*.pdb
|
||||
*.pgc
|
||||
*.pgd
|
||||
*.rsp
|
||||
*.sbr
|
||||
*.tlb
|
||||
*.tli
|
||||
*.tlh
|
||||
*.tmp
|
||||
*.tmp_proj
|
||||
*.log
|
||||
*.vspscc
|
||||
*.vssscc
|
||||
.builds
|
||||
*.pidb
|
||||
*.svclog
|
||||
*.scc
|
||||
|
||||
# Chutzpah Test files
|
||||
_Chutzpah*
|
||||
|
||||
# Visual C++ cache files
|
||||
ipch/
|
||||
*.aps
|
||||
*.ncb
|
||||
*.opensdf
|
||||
*.sdf
|
||||
*.cachefile
|
||||
|
||||
# Visual Studio profiler
|
||||
*.psess
|
||||
*.vsp
|
||||
*.vspx
|
||||
|
||||
# TFS 2012 Local Workspace
|
||||
$tf/
|
||||
|
||||
# Guidance Automation Toolkit
|
||||
*.gpState
|
||||
|
||||
# ReSharper is a .NET coding add-in
|
||||
_ReSharper*/
|
||||
*.[Rr]e[Ss]harper
|
||||
*.DotSettings.user
|
||||
|
||||
# JustCode is a .NET coding add-in
|
||||
.JustCode
|
||||
|
||||
# TeamCity is a build add-in
|
||||
_TeamCity*
|
||||
|
||||
# DotCover is a Code Coverage Tool
|
||||
*.dotCover
|
||||
|
||||
# NCrunch
|
||||
_NCrunch_*
|
||||
.*crunch*.local.xml
|
||||
|
||||
# MightyMoose
|
||||
*.mm.*
|
||||
AutoTest.Net/
|
||||
|
||||
# Web workbench (sass)
|
||||
.sass-cache/
|
||||
|
||||
# Installshield output folder
|
||||
[Ee]xpress/
|
||||
|
||||
# DocProject is a documentation generator add-in
|
||||
DocProject/buildhelp/
|
||||
DocProject/Help/*.HxT
|
||||
DocProject/Help/*.HxC
|
||||
DocProject/Help/*.hhc
|
||||
DocProject/Help/*.hhk
|
||||
DocProject/Help/*.hhp
|
||||
DocProject/Help/Html2
|
||||
DocProject/Help/html
|
||||
|
||||
# Click-Once directory
|
||||
publish/
|
||||
|
||||
# Publish Web Output
|
||||
*.[Pp]ublish.xml
|
||||
*.azurePubxml
|
||||
# TODO: Comment the next line if you want to checkin your web deploy settings
|
||||
# but database connection strings (with potential passwords) will be unencrypted
|
||||
*.pubxml
|
||||
*.publishproj
|
||||
|
||||
# NuGet Packages
|
||||
*.nupkg
|
||||
# The packages folder can be ignored because of Package Restore
|
||||
**/packages/*
|
||||
# except build/, which is used as an MSBuild target.
|
||||
!**/packages/build/
|
||||
# Uncomment if necessary however generally it will be regenerated when needed
|
||||
#!**/packages/repositories.config
|
||||
|
||||
# Windows Azure Build Output
|
||||
csx/
|
||||
*.build.csdef
|
||||
|
||||
# Windows Store app package directory
|
||||
AppPackages/
|
||||
|
||||
# Visual Studio cache files
|
||||
# files ending in .cache can be ignored
|
||||
*.[Cc]ache
|
||||
# but keep track of directories ending in .cache
|
||||
!*.[Cc]ache/
|
||||
|
||||
# Others
|
||||
ClientBin/
|
||||
[Ss]tyle[Cc]op.*
|
||||
~$*
|
||||
*~
|
||||
*.dbmdl
|
||||
*.dbproj.schemaview
|
||||
*.pfx
|
||||
*.publishsettings
|
||||
node_modules/
|
||||
orleans.codegen.cs
|
||||
|
||||
# RIA/Silverlight projects
|
||||
Generated_Code/
|
||||
|
||||
# Backup & report files from converting an old project file
|
||||
# to a newer Visual Studio version. Backup files are not needed,
|
||||
# because we have git ;-)
|
||||
_UpgradeReport_Files/
|
||||
Backup*/
|
||||
UpgradeLog*.XML
|
||||
UpgradeLog*.htm
|
||||
|
||||
# SQL Server files
|
||||
*.mdf
|
||||
*.ldf
|
||||
|
||||
# Business Intelligence projects
|
||||
*.rdl.data
|
||||
*.bim.layout
|
||||
*.bim_*.settings
|
||||
|
||||
# Microsoft Fakes
|
||||
FakesAssemblies/
|
||||
|
||||
# Node.js Tools for Visual Studio
|
||||
.ntvs_analysis.dat
|
||||
|
||||
# Visual Studio 6 build log
|
||||
*.plg
|
||||
|
||||
# Visual Studio 6 workspace options file
|
||||
*.opt
|
|
@ -0,0 +1,36 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 2012
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ProjectCarbon", "ProjectCarbon\ProjectCarbon.csproj", "{AF67D418-BCEB-4318-8ED7-201466FAECB4}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SharpPcap-vs2005", "..\SharpPcap\SharpPcap\SharpPcap-vs2005.csproj", "{67DFA5F8-6D82-4F58-A23F-F56A6598ABA5}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Debug|x86 = Debug|x86
|
||||
Release|Any CPU = Release|Any CPU
|
||||
Release|x86 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{AF67D418-BCEB-4318-8ED7-201466FAECB4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{AF67D418-BCEB-4318-8ED7-201466FAECB4}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{AF67D418-BCEB-4318-8ED7-201466FAECB4}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{AF67D418-BCEB-4318-8ED7-201466FAECB4}.Debug|x86.Build.0 = Debug|x86
|
||||
{AF67D418-BCEB-4318-8ED7-201466FAECB4}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{AF67D418-BCEB-4318-8ED7-201466FAECB4}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{AF67D418-BCEB-4318-8ED7-201466FAECB4}.Release|x86.ActiveCfg = Release|x86
|
||||
{AF67D418-BCEB-4318-8ED7-201466FAECB4}.Release|x86.Build.0 = Release|x86
|
||||
{67DFA5F8-6D82-4F58-A23F-F56A6598ABA5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{67DFA5F8-6D82-4F58-A23F-F56A6598ABA5}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{67DFA5F8-6D82-4F58-A23F-F56A6598ABA5}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{67DFA5F8-6D82-4F58-A23F-F56A6598ABA5}.Debug|x86.Build.0 = Debug|x86
|
||||
{67DFA5F8-6D82-4F58-A23F-F56A6598ABA5}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{67DFA5F8-6D82-4F58-A23F-F56A6598ABA5}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{67DFA5F8-6D82-4F58-A23F-F56A6598ABA5}.Release|x86.ActiveCfg = Release|x86
|
||||
{67DFA5F8-6D82-4F58-A23F-F56A6598ABA5}.Release|x86.Build.0 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
|
@ -0,0 +1,372 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace ProjectCarbon
|
||||
{
|
||||
public enum EndianType
|
||||
{
|
||||
BigEndian,
|
||||
LittleEndian
|
||||
}
|
||||
public interface IBinaryConverter
|
||||
{
|
||||
EndianType Type { get; }
|
||||
byte[] GetBytes(bool value);
|
||||
byte[] GetBytes(char value);
|
||||
byte[] GetBytes(float value);
|
||||
byte[] GetBytes(double value);
|
||||
byte[] GetBytes(short value);
|
||||
byte[] GetBytes(int value);
|
||||
byte[] GetBytes(long value);
|
||||
byte[] GetBytes(ushort value);
|
||||
byte[] GetBytes(uint value);
|
||||
byte[] GetBytes(ulong value);
|
||||
|
||||
bool ToBoolean(byte[] value, int startIndex);
|
||||
char ToChar(byte[] value, int startIndex);
|
||||
float ToSingle(byte[] value, int startIndex);
|
||||
double ToDouble(byte[] value, int startIndex);
|
||||
short ToInt16(byte[] value, int startIndex);
|
||||
int ToInt32(byte[] value, int startIndex);
|
||||
long ToInt64(byte[] value, int startIndex);
|
||||
ushort ToUInt16(byte[] value, int startIndex);
|
||||
uint ToUInt32(byte[] value, int startIndex);
|
||||
ulong ToUInt64(byte[] value, int startIndex);
|
||||
}
|
||||
#region BigEndianConverter
|
||||
public class BigEndianConverter : IBinaryConverter
|
||||
{
|
||||
public EndianType Type
|
||||
{
|
||||
get { return EndianType.BigEndian; }
|
||||
}
|
||||
|
||||
public byte[] GetBytes(bool value)
|
||||
{
|
||||
return new byte[] { (byte)(value ? 0x01 : 0x00) };
|
||||
}
|
||||
|
||||
public byte[] GetBytes(char value)
|
||||
{
|
||||
return GetBytes((short)value);
|
||||
}
|
||||
|
||||
public unsafe byte[] GetBytes(float value)
|
||||
{
|
||||
return GetBytes(*((int*)&value));
|
||||
}
|
||||
|
||||
public unsafe byte[] GetBytes(double value)
|
||||
{
|
||||
return GetBytes(*((long*)&value));
|
||||
}
|
||||
|
||||
public byte[] GetBytes(short value)
|
||||
{
|
||||
byte[] buffer = new byte[2];
|
||||
|
||||
buffer[0] = (byte)(value >> 8);
|
||||
buffer[1] = (byte)value;
|
||||
|
||||
return buffer;
|
||||
}
|
||||
|
||||
public byte[] GetBytes(int value)
|
||||
{
|
||||
byte[] buffer = new byte[4];
|
||||
|
||||
buffer[0] = (byte)(value >> 0x18);
|
||||
buffer[1] = (byte)(value >> 0x10);
|
||||
buffer[2] = (byte)(value >> 8);
|
||||
buffer[3] = (byte)value;
|
||||
|
||||
return buffer;
|
||||
}
|
||||
|
||||
public byte[] GetBytes(long value)
|
||||
{
|
||||
byte[] buffer = new byte[8];
|
||||
|
||||
buffer[0] = (byte)(value >> 0x38);
|
||||
buffer[1] = (byte)(value >> 0x30);
|
||||
buffer[2] = (byte)(value >> 0x28);
|
||||
buffer[3] = (byte)(value >> 0x20);
|
||||
buffer[4] = (byte)(value >> 0x18);
|
||||
buffer[5] = (byte)(value >> 0x10);
|
||||
buffer[6] = (byte)(value >> 8);
|
||||
buffer[7] = (byte)value;
|
||||
|
||||
return buffer;
|
||||
}
|
||||
|
||||
public byte[] GetBytes(ushort value)
|
||||
{
|
||||
byte[] buffer = new byte[2];
|
||||
|
||||
buffer[0] = (byte)(value >> 8);
|
||||
buffer[1] = (byte)value;
|
||||
|
||||
return buffer;
|
||||
}
|
||||
|
||||
public byte[] GetBytes(uint value)
|
||||
{
|
||||
byte[] buffer = new byte[4];
|
||||
|
||||
buffer[0] = (byte)(value >> 0x18);
|
||||
buffer[1] = (byte)(value >> 0x10);
|
||||
buffer[2] = (byte)(value >> 8);
|
||||
buffer[3] = (byte)value;
|
||||
|
||||
return buffer;
|
||||
}
|
||||
|
||||
public byte[] GetBytes(ulong value)
|
||||
{
|
||||
byte[] buffer = new byte[8];
|
||||
|
||||
buffer[0] = (byte)(value >> 0x38);
|
||||
buffer[1] = (byte)(value >> 0x30);
|
||||
buffer[2] = (byte)(value >> 0x28);
|
||||
buffer[3] = (byte)(value >> 0x20);
|
||||
buffer[4] = (byte)(value >> 0x18);
|
||||
buffer[5] = (byte)(value >> 0x10);
|
||||
buffer[6] = (byte)(value >> 8);
|
||||
buffer[7] = (byte)value;
|
||||
|
||||
return buffer;
|
||||
}
|
||||
|
||||
public bool ToBoolean(byte[] value, int startIndex)
|
||||
{
|
||||
return (value[startIndex] == 0) ? false : true;
|
||||
}
|
||||
|
||||
public char ToChar(byte[] value, int startIndex)
|
||||
{
|
||||
return (char)ToInt16(value, startIndex);
|
||||
}
|
||||
|
||||
public unsafe float ToSingle(byte[] value, int startIndex)
|
||||
{
|
||||
int rv = ToInt32(value, startIndex);
|
||||
return *((float*)&rv);
|
||||
}
|
||||
|
||||
public unsafe double ToDouble(byte[] value, int startIndex)
|
||||
{
|
||||
long rv = ToInt64(value, startIndex);
|
||||
return *((double*)&rv);
|
||||
}
|
||||
|
||||
public short ToInt16(byte[] value, int startIndex)
|
||||
{
|
||||
return (short)((value[startIndex] << 8) | (value[++startIndex] & 0xff));
|
||||
}
|
||||
|
||||
public int ToInt32(byte[] value, int startIndex)
|
||||
{
|
||||
return ((value[startIndex] << 0x18) | (value[++startIndex] << 0x10) | (value[++startIndex] << 8) | (value[++startIndex] & 0xff));
|
||||
}
|
||||
|
||||
public long ToInt64(byte[] value, int startIndex)
|
||||
{
|
||||
uint hi = (uint)((value[startIndex] << 0x18) | (value[++startIndex] << 0x10) | (value[++startIndex] << 8) | (value[++startIndex] & 0xff));
|
||||
uint lo = (uint)((value[++startIndex] << 0x18) | (value[++startIndex] << 0x10) | (value[++startIndex] << 8) | (value[++startIndex] & 0xff));
|
||||
|
||||
return (long)((((ulong)hi) << 0x20) | lo);
|
||||
}
|
||||
|
||||
public ushort ToUInt16(byte[] value, int startIndex)
|
||||
{
|
||||
return (ushort)((value[startIndex] << 8) | (value[++startIndex] & 0xff));
|
||||
}
|
||||
|
||||
|
||||
public uint ToUInt32(byte[] value, int startIndex)
|
||||
{
|
||||
return (uint)((value[startIndex] << 0x18) | (value[++startIndex] << 0x10) | (value[++startIndex] << 8) | (value[++startIndex] & 0xff));
|
||||
}
|
||||
|
||||
|
||||
public ulong ToUInt64(byte[] value, int startIndex)
|
||||
{
|
||||
uint hi = (uint)((value[startIndex] << 0x18) | (value[++startIndex] << 0x10) | (value[++startIndex] << 8) | (value[++startIndex] & 0xff));
|
||||
uint lo = (uint)((value[++startIndex] << 0x18) | (value[++startIndex] << 0x10) | (value[++startIndex] << 8) | (value[++startIndex] & 0xff));
|
||||
|
||||
return ((((ulong)hi) << 0x20) | lo);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region LittleEndianConverter
|
||||
public class LittleEndianConverter : IBinaryConverter
|
||||
{
|
||||
public EndianType Type
|
||||
{
|
||||
get { return EndianType.LittleEndian; }
|
||||
}
|
||||
|
||||
public byte[] GetBytes(bool value)
|
||||
{
|
||||
return new byte[] { (byte)(value ? 0x01 : 0x00) };
|
||||
}
|
||||
|
||||
public byte[] GetBytes(char value)
|
||||
{
|
||||
return GetBytes((short)value);
|
||||
}
|
||||
|
||||
public unsafe byte[] GetBytes(float value)
|
||||
{
|
||||
return GetBytes(*((int*)&value));
|
||||
}
|
||||
|
||||
public unsafe byte[] GetBytes(double value)
|
||||
{
|
||||
return GetBytes(*((long*)&value));
|
||||
}
|
||||
|
||||
public byte[] GetBytes(short value)
|
||||
{
|
||||
byte[] buffer = new byte[2];
|
||||
|
||||
buffer[0] = (byte)value;
|
||||
buffer[1] = (byte)(value >> 8);
|
||||
|
||||
return buffer;
|
||||
}
|
||||
|
||||
public byte[] GetBytes(int value)
|
||||
{
|
||||
byte[] buffer = new byte[4];
|
||||
|
||||
buffer[0] = (byte)value;
|
||||
buffer[1] = (byte)(value >> 8);
|
||||
buffer[2] = (byte)(value >> 0x10);
|
||||
buffer[3] = (byte)(value >> 0x18);
|
||||
|
||||
return buffer;
|
||||
}
|
||||
|
||||
public byte[] GetBytes(long value)
|
||||
{
|
||||
byte[] buffer = new byte[8];
|
||||
|
||||
buffer[0] = (byte)value;
|
||||
buffer[1] = (byte)(value >> 8);
|
||||
buffer[2] = (byte)(value >> 0x10);
|
||||
buffer[3] = (byte)(value >> 0x18);
|
||||
buffer[4] = (byte)(value >> 0x20);
|
||||
buffer[5] = (byte)(value >> 0x28);
|
||||
buffer[6] = (byte)(value >> 0x30);
|
||||
buffer[7] = (byte)(value >> 0x38);
|
||||
|
||||
return buffer;
|
||||
}
|
||||
|
||||
|
||||
public byte[] GetBytes(ushort value)
|
||||
{
|
||||
byte[] buffer = new byte[2];
|
||||
|
||||
buffer[0] = (byte)value;
|
||||
buffer[1] = (byte)(value >> 8);
|
||||
|
||||
return buffer;
|
||||
}
|
||||
|
||||
|
||||
public byte[] GetBytes(uint value)
|
||||
{
|
||||
byte[] buffer = new byte[4];
|
||||
|
||||
buffer[0] = (byte)value;
|
||||
buffer[1] = (byte)(value >> 8);
|
||||
buffer[2] = (byte)(value >> 0x10);
|
||||
buffer[3] = (byte)(value >> 0x18);
|
||||
|
||||
return buffer;
|
||||
}
|
||||
|
||||
|
||||
public byte[] GetBytes(ulong value)
|
||||
{
|
||||
byte[] buffer = new byte[8];
|
||||
|
||||
buffer[0] = (byte)value;
|
||||
buffer[1] = (byte)(value >> 8);
|
||||
buffer[2] = (byte)(value >> 0x10);
|
||||
buffer[3] = (byte)(value >> 0x18);
|
||||
buffer[4] = (byte)(value >> 0x20);
|
||||
buffer[5] = (byte)(value >> 0x28);
|
||||
buffer[6] = (byte)(value >> 0x30);
|
||||
buffer[7] = (byte)(value >> 0x38);
|
||||
|
||||
return buffer;
|
||||
}
|
||||
|
||||
public bool ToBoolean(byte[] value, int startIndex)
|
||||
{
|
||||
|
||||
return (value[startIndex] == 0) ? false : true;
|
||||
}
|
||||
|
||||
public char ToChar(byte[] value, int startIndex)
|
||||
{
|
||||
return (char)ToInt16(value, startIndex);
|
||||
}
|
||||
|
||||
public unsafe float ToSingle(byte[] value, int startIndex)
|
||||
{
|
||||
int rv = ToInt32(value, startIndex);
|
||||
return *((float*)&rv);
|
||||
}
|
||||
|
||||
public unsafe double ToDouble(byte[] value, int startIndex)
|
||||
{
|
||||
long rv = ToInt64(value, startIndex);
|
||||
return *((double*)&rv);
|
||||
}
|
||||
|
||||
public short ToInt16(byte[] value, int startIndex)
|
||||
{
|
||||
return (short)((value[startIndex] & 0xff) | (value[++startIndex] << 8));
|
||||
}
|
||||
|
||||
public int ToInt32(byte[] value, int startIndex)
|
||||
{
|
||||
return ((value[startIndex] & 0xff) | (value[++startIndex] << 8) | (value[++startIndex] << 0x10) | (value[++startIndex] << 0x18));
|
||||
}
|
||||
|
||||
public long ToInt64(byte[] value, int startIndex)
|
||||
{
|
||||
uint lo = (uint)((value[startIndex] & 0xff) | (value[++startIndex] << 8) | (value[++startIndex] << 0x10) | (value[++startIndex] << 0x18));
|
||||
uint hi = (uint)((value[++startIndex] & 0xff) | (value[++startIndex] << 8) | (value[++startIndex] << 0x10) | (value[++startIndex] << 0x18));
|
||||
|
||||
return (long)((((ulong)hi) << 0x20) | lo);
|
||||
}
|
||||
|
||||
|
||||
public ushort ToUInt16(byte[] value, int startIndex)
|
||||
{
|
||||
return (ushort)((value[startIndex] & 0xff) | (value[++startIndex] << 8));
|
||||
}
|
||||
|
||||
|
||||
public uint ToUInt32(byte[] value, int startIndex)
|
||||
{
|
||||
return (uint)((value[startIndex] & 0xff) | (value[++startIndex] << 8) | (value[++startIndex] << 0x10) | (value[++startIndex] << 0x18));
|
||||
}
|
||||
|
||||
|
||||
public ulong ToUInt64(byte[] value, int startIndex)
|
||||
{
|
||||
uint lo = (uint)((value[startIndex] & 0xff) | (value[++startIndex] << 8) | (value[++startIndex] << 0x10) | (value[++startIndex] << 0x18));
|
||||
uint hi = (uint)((value[++startIndex] & 0xff) | (value[++startIndex] << 8) | (value[++startIndex] << 0x10) | (value[++startIndex] << 0x18));
|
||||
|
||||
return ((((ulong)hi) << 0x20) | lo);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
|
@ -0,0 +1,174 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using System.Diagnostics;
|
||||
using Microsoft.Win32;
|
||||
|
||||
namespace ProjectCarbon
|
||||
{
|
||||
public static class Functions
|
||||
{
|
||||
const string REG_RUN = @"Software\Microsoft\Windows\CurrentVersion\Run";
|
||||
|
||||
public static void SetStartup()
|
||||
{
|
||||
RegistryKey key = Registry.CurrentUser;
|
||||
try
|
||||
{
|
||||
key = key.OpenSubKey(REG_RUN, true);
|
||||
key.SetValue(Application.ProductName,
|
||||
Application.ExecutablePath);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
//return "error " + e.Message;
|
||||
Debug.WriteLine(e.Message);
|
||||
}
|
||||
finally
|
||||
{
|
||||
key.Close();
|
||||
}
|
||||
}
|
||||
|
||||
public static void RemoveStartup()
|
||||
{
|
||||
RegistryKey key = Registry.CurrentUser;
|
||||
try
|
||||
{
|
||||
key = key.OpenSubKey(REG_RUN, true);
|
||||
key.DeleteValue(Application.ProductName);
|
||||
}
|
||||
catch (ArgumentException e)
|
||||
{
|
||||
//this just means it didnt exist...
|
||||
Debug.WriteLine(e.Message);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
//return "error " + e.Message;
|
||||
Debug.WriteLine(e.Message);
|
||||
}
|
||||
finally
|
||||
{
|
||||
key.Close();
|
||||
}
|
||||
}
|
||||
|
||||
public static string GetHexBlock(byte[] txt)
|
||||
{
|
||||
int i;
|
||||
// disp is the 16-bytes of display
|
||||
StringBuilder disp = new StringBuilder();
|
||||
// hex is the complete output (hex+disp)
|
||||
StringBuilder hex = new StringBuilder();
|
||||
|
||||
for (i = 0; i < txt.Length; i++)
|
||||
{
|
||||
if (i == 0)
|
||||
hex.Append("0000: ");
|
||||
|
||||
if (i > 0)
|
||||
{
|
||||
if (i % 16 == 0)
|
||||
{
|
||||
if (hex.Length > 0)
|
||||
{ // end current line
|
||||
hex.Append(" " + disp.ToString() + "\r\n");
|
||||
if (i % 16 == 0)
|
||||
hex.Append(String.Format("{0:X4}: ", (i / 16) * 16));
|
||||
disp.Length = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
hex.Append(string.Format("{0:X2} ", txt[i]));
|
||||
if (txt[i] >= ' ' && txt[i] <= 127)
|
||||
disp.Append(Convert.ToChar(txt[i]));
|
||||
else disp.Append('.');
|
||||
}
|
||||
// end of text - make sure we end the last line of hex
|
||||
if (disp.Length > 0)
|
||||
{
|
||||
if (disp.Length < 16)
|
||||
{
|
||||
for (i = disp.Length; i < 16; i++)
|
||||
hex.Append(" ");
|
||||
}
|
||||
hex.Append(" " + disp.ToString());
|
||||
}
|
||||
return hex.ToString();
|
||||
}
|
||||
|
||||
public static string GetHexOnly(byte[] txt)
|
||||
{
|
||||
StringBuilder disp = new StringBuilder();
|
||||
for (int i = 0; i < txt.Length; i++)
|
||||
disp.Append(String.Format("{0:X2} ", txt[i]));
|
||||
return disp.ToString().Trim();
|
||||
}
|
||||
|
||||
public static string GetDecBlock(byte[] txt)
|
||||
{
|
||||
int i;
|
||||
// disp is the 16-bytes of display
|
||||
StringBuilder disp = new StringBuilder();
|
||||
// hex is the complete output (hex+disp)
|
||||
StringBuilder hex = new StringBuilder();
|
||||
|
||||
for (i = 0; i < txt.Length; i++)
|
||||
{
|
||||
if (i == 0)
|
||||
hex.Append("0000: ");
|
||||
|
||||
if (i > 0)
|
||||
{
|
||||
if (i % 16 == 0)
|
||||
{
|
||||
if (hex.Length > 0)
|
||||
{ // end current line
|
||||
hex.Append(" " + disp.ToString() + "\r\n");
|
||||
if (i % 16 == 0)
|
||||
hex.Append(String.Format("{0:X4}: ", (i / 16) * 16));
|
||||
disp.Length = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
hex.Append(string.Format("{0:000} ", txt[i]));
|
||||
if (txt[i] >= ' ' && txt[i] <= 127)
|
||||
disp.Append(Convert.ToChar(txt[i]));
|
||||
else disp.Append('.');
|
||||
}
|
||||
// end of text - make sure we end the last line of hex
|
||||
if (disp.Length > 0)
|
||||
{
|
||||
if (disp.Length < 16)
|
||||
{
|
||||
for (i = disp.Length; i < 16; i++)
|
||||
hex.Append(" ");
|
||||
}
|
||||
hex.Append(" " + disp.ToString());
|
||||
}
|
||||
return hex.ToString();
|
||||
}
|
||||
|
||||
public static string GetDecOnly(byte[] txt)
|
||||
{
|
||||
StringBuilder disp = new StringBuilder();
|
||||
for (int i = 0; i < txt.Length; i++)
|
||||
disp.Append(txt[i].ToString() + " ");
|
||||
return disp.ToString().Trim();
|
||||
}
|
||||
|
||||
public static string GetSafeString(byte[] txt)
|
||||
{
|
||||
StringBuilder disp = new StringBuilder();
|
||||
for (int i = 0; i < txt.Length; i++)
|
||||
if (txt[i] >= ' ' && txt[i] <= 127 ||
|
||||
(txt[i] == 9 || txt[i] == 10 || txt[i] == 13))
|
||||
disp.Append(Convert.ToChar(txt[i]));
|
||||
else
|
||||
disp.Append('.');
|
||||
return disp.ToString().Trim();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Net;
|
||||
using ProjectCarbon.Properties;
|
||||
using ProjectCarbon.Protocols;
|
||||
using Tamir.IPLib;
|
||||
|
||||
|
||||
namespace ProjectCarbon
|
||||
{
|
||||
static class Global
|
||||
{
|
||||
public static System.Net.IPAddress[] LocalIPAddresses =
|
||||
Dns.GetHostEntry(Dns.GetHostName()).AddressList;
|
||||
|
||||
public static PacketCaptureInterface[] PacketCaptureArray;
|
||||
|
||||
public static PcapDeviceList DeviceList = SharpPcap.GetAllDevices();
|
||||
|
||||
public static List<Tamir.IPLib.Packets.Packet> CapturedPackets =
|
||||
new List<Tamir.IPLib.Packets.Packet>();
|
||||
|
||||
public static List<int> FilteredPortList = new List<int>();
|
||||
public static bool PortFilterInclusive = true;
|
||||
public static List<string> FilteredProtocolList = new List<string>();
|
||||
public static bool ProtocolFilterInclusive = true;
|
||||
|
||||
public delegate void PacketCapturedEvent(Tamir.IPLib.Packets.Packet packet);
|
||||
}
|
||||
}
|
After Width: | Height: | Size: 158 KiB |
|
@ -0,0 +1,151 @@
|
|||
using System;
|
||||
using System.Text;
|
||||
using System.Net;
|
||||
using System.Net.Sockets;
|
||||
using System.Net.NetworkInformation;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Diagnostics;
|
||||
using System.Timers;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace ProjectCarbon
|
||||
{
|
||||
class PacketCapturedEventArgs : EventArgs
|
||||
{
|
||||
private DateTime timestamp;
|
||||
private byte[] buffer;
|
||||
|
||||
public PacketCapturedEventArgs(byte[] buffer)
|
||||
{
|
||||
this.timestamp = DateTime.Now;
|
||||
this.buffer = buffer;
|
||||
}
|
||||
|
||||
public DateTime TimeStamp
|
||||
{
|
||||
get { return timestamp; }
|
||||
}
|
||||
|
||||
public byte[] Buffer
|
||||
{
|
||||
get { return buffer; }
|
||||
}
|
||||
}
|
||||
|
||||
class PacketCaptureInterface: IDisposable
|
||||
{
|
||||
public delegate void PacketCapturedEventHandler(object sender, PacketCapturedEventArgs e);
|
||||
|
||||
public event PacketCapturedEventHandler OnPacketCaptured;
|
||||
|
||||
private Socket socket;
|
||||
private IPAddress ipAddress;
|
||||
private byte[] packetBuffer;
|
||||
private NetworkInterface[] networkInterfaces;
|
||||
private IPAddress[] addressList = Dns.GetHostEntry(Dns.GetHostName()).AddressList;
|
||||
private AsyncCallback receiveCallback;
|
||||
private bool isCapturing = false;
|
||||
|
||||
public PacketCaptureInterface (IPAddress ip)
|
||||
{
|
||||
this.ipAddress = ip;
|
||||
this.networkInterfaces = NetworkInterface.GetAllNetworkInterfaces();
|
||||
this.packetBuffer = new byte[2000]; // default max mtu is 1500, allow for 500 bytes of extra
|
||||
this.receiveCallback = new AsyncCallback(OnReceiveCallback);
|
||||
}
|
||||
|
||||
public NetworkInterface[] NetworkInterfaces
|
||||
{
|
||||
get { return networkInterfaces; }
|
||||
}
|
||||
|
||||
public IPAddress[] AddressList
|
||||
{
|
||||
get { return addressList; }
|
||||
}
|
||||
|
||||
public void StartCapture()
|
||||
{
|
||||
if (isCapturing)
|
||||
return;
|
||||
|
||||
try
|
||||
{
|
||||
socket = new Socket(ipAddress.AddressFamily,
|
||||
SocketType.Raw, ProtocolType.IP);
|
||||
|
||||
socket.Bind(new IPEndPoint(ipAddress, 0));
|
||||
|
||||
socket.IOControl(IOControlCode.ReceiveAll,
|
||||
BitConverter.GetBytes(1), null);
|
||||
|
||||
isCapturing = true;
|
||||
|
||||
BeginReceive();
|
||||
}
|
||||
catch
|
||||
{
|
||||
socket.Close();
|
||||
}
|
||||
}
|
||||
|
||||
public void StopCapture()
|
||||
{
|
||||
if (isCapturing)
|
||||
{
|
||||
if (socket != null)
|
||||
socket.Close();
|
||||
isCapturing = false;
|
||||
}
|
||||
}
|
||||
|
||||
private void BeginReceive()
|
||||
{
|
||||
try
|
||||
{
|
||||
socket.BeginReceive(packetBuffer,
|
||||
0,
|
||||
packetBuffer.Length,
|
||||
SocketFlags.None,
|
||||
receiveCallback,
|
||||
null);
|
||||
}
|
||||
catch (ObjectDisposedException)
|
||||
{
|
||||
Console.WriteLine("BeginReceive: Socket has been closed.");
|
||||
}
|
||||
}
|
||||
|
||||
private void OnReceiveCallback(IAsyncResult ar)
|
||||
{
|
||||
try
|
||||
{
|
||||
int bytesReceived = socket.EndReceive(ar);
|
||||
|
||||
byte[] receivedBuffer = new byte[bytesReceived];
|
||||
|
||||
Array.Copy(packetBuffer, 0, receivedBuffer, 0, bytesReceived);
|
||||
|
||||
Console.WriteLine(bytesReceived);
|
||||
|
||||
if(OnPacketCaptured != null)
|
||||
OnPacketCaptured(this, new PacketCapturedEventArgs(receivedBuffer));
|
||||
|
||||
BeginReceive();
|
||||
}
|
||||
catch (ObjectDisposedException)
|
||||
{
|
||||
Console.WriteLine("OnReceiveCallback: Socket has been closed.");
|
||||
}
|
||||
}
|
||||
|
||||
#region IDisposable Members
|
||||
public void Dispose()
|
||||
{
|
||||
if (socket != null)
|
||||
socket.Close();
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Windows.Forms;
|
||||
using System.Net;
|
||||
|
||||
namespace ProjectCarbon
|
||||
{
|
||||
static class Program
|
||||
{
|
||||
/// <summary>
|
||||
/// The main entry point for the application.
|
||||
/// </summary>
|
||||
[STAThread]
|
||||
static void Main()
|
||||
{
|
||||
Application.EnableVisualStyles();
|
||||
Application.SetCompatibleTextRenderingDefault(false);
|
||||
Application.Run(new frmMain());
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,223 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>9.0.21022</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{AF67D418-BCEB-4318-8ED7-201466FAECB4}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>ProjectCarbon</RootNamespace>
|
||||
<AssemblyName>ProjectCarbon</AssemblyName>
|
||||
<ApplicationIcon>Internet Explorer.ico</ApplicationIcon>
|
||||
<SignAssembly>false</SignAssembly>
|
||||
<AssemblyOriginatorKeyFile>PublicPrivateKeyFile.snk</AssemblyOriginatorKeyFile>
|
||||
<DelaySign>false</DelaySign>
|
||||
<FileUpgradeFlags>
|
||||
</FileUpgradeFlags>
|
||||
<UpgradeBackupLocation>
|
||||
</UpgradeBackupLocation>
|
||||
<OldToolsVersion>3.5</OldToolsVersion>
|
||||
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||
<ManifestCertificateThumbprint>FCAFA7D01546AD80C88DBF8A74E793CA031DB9C6</ManifestCertificateThumbprint>
|
||||
<ManifestKeyFile>ProjectCarbon_TemporaryKey.pfx</ManifestKeyFile>
|
||||
<GenerateManifests>true</GenerateManifests>
|
||||
<SignManifests>true</SignManifests>
|
||||
<PublishUrl>publish\</PublishUrl>
|
||||
<Install>true</Install>
|
||||
<InstallFrom>Disk</InstallFrom>
|
||||
<UpdateEnabled>false</UpdateEnabled>
|
||||
<UpdateMode>Foreground</UpdateMode>
|
||||
<UpdateInterval>7</UpdateInterval>
|
||||
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
|
||||
<UpdatePeriodically>false</UpdatePeriodically>
|
||||
<UpdateRequired>false</UpdateRequired>
|
||||
<MapFileExtensions>true</MapFileExtensions>
|
||||
<ApplicationRevision>1</ApplicationRevision>
|
||||
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>false</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
</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>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
|
||||
<OutputPath>bin\x86\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
|
||||
<OutputPath>bin\x86\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<Optimize>true</Optimize>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Deployment" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="frmAboutDialog.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="frmAboutDialog.Designer.cs">
|
||||
<DependentUpon>frmAboutDialog.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="BinaryConverter.cs" />
|
||||
<Compile Include="frmCaptureFilters.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="frmCaptureFilters.Designer.cs">
|
||||
<DependentUpon>frmCaptureFilters.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="frmDnsLookup.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="frmDnsLookup.Designer.cs">
|
||||
<DependentUpon>frmDnsLookup.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="frmMain.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="frmMain.Designer.cs">
|
||||
<DependentUpon>frmMain.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="frmCaptureSettings.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="frmCaptureSettings.Designer.cs">
|
||||
<DependentUpon>frmCaptureSettings.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="frmSocketInformation.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="frmSocketInformation.Designer.cs">
|
||||
<DependentUpon>frmSocketInformation.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Functions.cs" />
|
||||
<Compile Include="Global.cs" />
|
||||
<Compile Include="PacketCapture.cs" />
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<EmbeddedResource Include="frmAboutDialog.resx">
|
||||
<SubType>Designer</SubType>
|
||||
<DependentUpon>frmAboutDialog.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="frmCaptureFilters.resx">
|
||||
<SubType>Designer</SubType>
|
||||
<DependentUpon>frmCaptureFilters.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="frmDnsLookup.resx">
|
||||
<SubType>Designer</SubType>
|
||||
<DependentUpon>frmDnsLookup.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="frmMain.resx">
|
||||
<SubType>Designer</SubType>
|
||||
<DependentUpon>frmMain.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="frmCaptureSettings.resx">
|
||||
<SubType>Designer</SubType>
|
||||
<DependentUpon>frmCaptureSettings.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="frmSocketInformation.resx">
|
||||
<SubType>Designer</SubType>
|
||||
<DependentUpon>frmSocketInformation.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>
|
||||
<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>
|
||||
<Compile Include="Protocols\GenericProtocol.cs" />
|
||||
<Compile Include="Protocols\IcmpProtocol.cs" />
|
||||
<Compile Include="Protocols\IpEnumerations.cs" />
|
||||
<Compile Include="Protocols\IpProtocol.cs" />
|
||||
<Compile Include="Protocols\IpSubProtocol.cs" />
|
||||
<Compile Include="Protocols\TcpProtocol.cs" />
|
||||
<Compile Include="Protocols\UdpProtocol.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="app.config" />
|
||||
<None Include="ProjectCarbon_TemporaryKey.pfx" />
|
||||
<None Include="PublicKeyFile.snk" />
|
||||
<None Include="PublicPrivateKeyFile.snk" />
|
||||
<None Include="Resources\search.gif" />
|
||||
<None Include="Resources\winsock.gif" />
|
||||
<None Include="Resources\text.gif" />
|
||||
<None Include="Resources\aboutlogo.png" />
|
||||
<Content Include="Internet Explorer.ico" />
|
||||
<Content Include="Search.ico" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.2.0">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 2.0 %28x86%29</ProductName>
|
||||
<Install>true</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.0">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.0 %28x86%29</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\SharpPcap\SharpPcap\SharpPcap-vs2005.csproj">
|
||||
<Project>{67DFA5F8-6D82-4F58-A23F-F56A6598ABA5}</Project>
|
||||
<Name>SharpPcap-vs2005</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\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>
|
|
@ -0,0 +1 @@
|
|||
<Configurations active="Default"><Configuration name="Default"><Command val="D:\Visual Studio 2005\Projects\ProjectCarbon\ProjectCarbon\bin\Debug\ProjectCarbon.exe"></Command><RunMode val="a host path through a shared folder"></RunMode><ShareFolders val=""></ShareFolders><RemoteDebugMonitor val="C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\Remote Debugger\x64\msvsmon.exe"></RemoteDebugMonitor><MonitorName val="VMDebug"></MonitorName><VirtualMachine val="C:\VMachines\WinXP\Windows XP Professional.vmx"></VirtualMachine><StartMode val="No"></StartMode><TerminationMode val="No operation"></TerminationMode><CopyFiles val=""></CopyFiles><PreCommandLine val=""></PreCommandLine><PostCommandLine val=""></PostCommandLine></Configuration></Configurations>
|
|
@ -0,0 +1,36 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Resources;
|
||||
using System.Security.Permissions;
|
||||
|
||||
// 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("Project Carbon")]
|
||||
[assembly: AssemblyDescription("A network analyzer and diagnostic tool for Windows NT4/2000, Windows XP/2003/Vista (x86 and x64), and Windows Server 2008 (x86 and x64).")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("Xeon Productions")]
|
||||
[assembly: AssemblyProduct("Project Carbon")]
|
||||
[assembly: AssemblyCopyright("Copyright (c) Xeon Productions 2008")]
|
||||
[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("37ed6208-3a61-4bbe-b98b-465dbb73d136")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
[assembly: NeutralResourcesLanguageAttribute("en-US")]
|
|
@ -0,0 +1,73 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.18034
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace ProjectCarbon.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("ProjectCarbon.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 aboutlogo1 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("aboutlogo1", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,124 @@
|
|||
<?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="aboutlogo1" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\aboutlogo.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
</root>
|
|
@ -0,0 +1,194 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.18034
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace ProjectCarbon.Properties {
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.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;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("False")]
|
||||
public bool StartUpWindows {
|
||||
get {
|
||||
return ((bool)(this["StartUpWindows"]));
|
||||
}
|
||||
set {
|
||||
this["StartUpWindows"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("False")]
|
||||
public bool StartUpMinimized {
|
||||
get {
|
||||
return ((bool)(this["StartUpMinimized"]));
|
||||
}
|
||||
set {
|
||||
this["StartUpMinimized"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("False")]
|
||||
public bool StartUpCapture {
|
||||
get {
|
||||
return ((bool)(this["StartUpCapture"]));
|
||||
}
|
||||
set {
|
||||
this["StartUpCapture"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("0")]
|
||||
public int ProtocolFilterType {
|
||||
get {
|
||||
return ((int)(this["ProtocolFilterType"]));
|
||||
}
|
||||
set {
|
||||
this["ProtocolFilterType"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("Window")]
|
||||
public global::System.Drawing.Color PacketListBackgroundColor {
|
||||
get {
|
||||
return ((global::System.Drawing.Color)(this["PacketListBackgroundColor"]));
|
||||
}
|
||||
set {
|
||||
this["PacketListBackgroundColor"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("WindowText")]
|
||||
public global::System.Drawing.Color PacketListTextColor {
|
||||
get {
|
||||
return ((global::System.Drawing.Color)(this["PacketListTextColor"]));
|
||||
}
|
||||
set {
|
||||
this["PacketListTextColor"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("WindowText")]
|
||||
public global::System.Drawing.Color PacketDisplayFontColor {
|
||||
get {
|
||||
return ((global::System.Drawing.Color)(this["PacketDisplayFontColor"]));
|
||||
}
|
||||
set {
|
||||
this["PacketDisplayFontColor"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("Window")]
|
||||
public global::System.Drawing.Color PacketDisplayBackgroundColor {
|
||||
get {
|
||||
return ((global::System.Drawing.Color)(this["PacketDisplayBackgroundColor"]));
|
||||
}
|
||||
set {
|
||||
this["PacketDisplayBackgroundColor"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("Courier New, 9.75pt, style=Bold")]
|
||||
public global::System.Drawing.Font PacketDisplayFontFace {
|
||||
get {
|
||||
return ((global::System.Drawing.Font)(this["PacketDisplayFontFace"]));
|
||||
}
|
||||
set {
|
||||
this["PacketDisplayFontFace"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("False")]
|
||||
public bool AutoScrollPacketList {
|
||||
get {
|
||||
return ((bool)(this["AutoScrollPacketList"]));
|
||||
}
|
||||
set {
|
||||
this["AutoScrollPacketList"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("True")]
|
||||
public bool ToolbarVisible {
|
||||
get {
|
||||
return ((bool)(this["ToolbarVisible"]));
|
||||
}
|
||||
set {
|
||||
this["ToolbarVisible"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("True")]
|
||||
public bool StatusBarVisible {
|
||||
get {
|
||||
return ((bool)(this["StatusBarVisible"]));
|
||||
}
|
||||
set {
|
||||
this["StatusBarVisible"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("True")]
|
||||
public bool PacketListVisible {
|
||||
get {
|
||||
return ((bool)(this["PacketListVisible"]));
|
||||
}
|
||||
set {
|
||||
this["PacketListVisible"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("True")]
|
||||
public bool PacketDisplayVisible {
|
||||
get {
|
||||
return ((bool)(this["PacketDisplayVisible"]));
|
||||
}
|
||||
set {
|
||||
this["PacketDisplayVisible"] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,48 @@
|
|||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="ProjectCarbon.Properties" GeneratedClassName="Settings">
|
||||
<Profiles />
|
||||
<Settings>
|
||||
<Setting Name="StartUpWindows" Type="System.Boolean" Scope="User">
|
||||
<Value Profile="(Default)">False</Value>
|
||||
</Setting>
|
||||
<Setting Name="StartUpMinimized" Type="System.Boolean" Scope="User">
|
||||
<Value Profile="(Default)">False</Value>
|
||||
</Setting>
|
||||
<Setting Name="StartUpCapture" Type="System.Boolean" Scope="User">
|
||||
<Value Profile="(Default)">False</Value>
|
||||
</Setting>
|
||||
<Setting Name="ProtocolFilterType" Type="System.Int32" Scope="User">
|
||||
<Value Profile="(Default)">0</Value>
|
||||
</Setting>
|
||||
<Setting Name="PacketListBackgroundColor" Type="System.Drawing.Color" Scope="User">
|
||||
<Value Profile="(Default)">Window</Value>
|
||||
</Setting>
|
||||
<Setting Name="PacketListTextColor" Type="System.Drawing.Color" Scope="User">
|
||||
<Value Profile="(Default)">WindowText</Value>
|
||||
</Setting>
|
||||
<Setting Name="PacketDisplayFontColor" Type="System.Drawing.Color" Scope="User">
|
||||
<Value Profile="(Default)">WindowText</Value>
|
||||
</Setting>
|
||||
<Setting Name="PacketDisplayBackgroundColor" Type="System.Drawing.Color" Scope="User">
|
||||
<Value Profile="(Default)">Window</Value>
|
||||
</Setting>
|
||||
<Setting Name="PacketDisplayFontFace" Type="System.Drawing.Font" Scope="User">
|
||||
<Value Profile="(Default)">Courier New, 9.75pt, style=Bold</Value>
|
||||
</Setting>
|
||||
<Setting Name="AutoScrollPacketList" Type="System.Boolean" Scope="User">
|
||||
<Value Profile="(Default)">False</Value>
|
||||
</Setting>
|
||||
<Setting Name="ToolbarVisible" Type="System.Boolean" Scope="User">
|
||||
<Value Profile="(Default)">True</Value>
|
||||
</Setting>
|
||||
<Setting Name="StatusBarVisible" Type="System.Boolean" Scope="User">
|
||||
<Value Profile="(Default)">True</Value>
|
||||
</Setting>
|
||||
<Setting Name="PacketListVisible" Type="System.Boolean" Scope="User">
|
||||
<Value Profile="(Default)">True</Value>
|
||||
</Setting>
|
||||
<Setting Name="PacketDisplayVisible" Type="System.Boolean" Scope="User">
|
||||
<Value Profile="(Default)">True</Value>
|
||||
</Setting>
|
||||
</Settings>
|
||||
</SettingsFile>
|
|
@ -0,0 +1,20 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace ProjectCarbon.Protocols
|
||||
{
|
||||
class GenericProtocol: IpSubProtocol
|
||||
{
|
||||
public GenericProtocol()
|
||||
: base(Protocol.None, "Generic", "This is not a real protocol!")
|
||||
{
|
||||
}
|
||||
|
||||
public override void ProcessData(byte[] bufferData)
|
||||
{
|
||||
m_protocolProperties.Add("Payload", bufferData);
|
||||
m_protocolProperties.Add("PacketPayload", bufferData);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,37 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace ProjectCarbon.Protocols
|
||||
{
|
||||
enum IcmpCode
|
||||
{
|
||||
NetUnreachable = 0,
|
||||
HostUnreachable = 1,
|
||||
ProtocolUnreachable = 2,
|
||||
PortUnreachable = 3,
|
||||
FragmentationNeeded = 4,
|
||||
SourceRouteFailed = 5
|
||||
}
|
||||
|
||||
class IcmpProtocol: IpSubProtocol
|
||||
{
|
||||
public IcmpProtocol()
|
||||
: base(Protocol.Icmp, "ICMP", "Internet Control Message Protocol")
|
||||
{
|
||||
}
|
||||
|
||||
public override void ProcessData(byte[] bufferData)
|
||||
{
|
||||
BigEndianConverter endianConverter = new BigEndianConverter();
|
||||
byte type = bufferData[0];
|
||||
byte code = bufferData[1];
|
||||
int checksum = endianConverter.ToUInt16(bufferData, 2);
|
||||
m_protocolProperties.Add("Type", type);
|
||||
m_protocolProperties.Add("Code", code);
|
||||
m_protocolProperties.Add("Checksum", checksum);
|
||||
|
||||
m_protocolProperties.Add("Payload", bufferData);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,62 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace ProjectCarbon
|
||||
{
|
||||
public enum Precedence
|
||||
{
|
||||
Routine = 0,
|
||||
Priority = 1,
|
||||
Immediate = 2,
|
||||
Flash = 3,
|
||||
FlashOverride = 4,
|
||||
CRITICECP = 5,
|
||||
InternetworkControl = 6,
|
||||
NetworkControl = 7
|
||||
}
|
||||
public enum Delay
|
||||
{
|
||||
NormalDelay = 0,
|
||||
LowDelay = 1
|
||||
}
|
||||
public enum Throughput
|
||||
{
|
||||
NormalThroughput = 0,
|
||||
HighThroughput = 1
|
||||
}
|
||||
public enum Reliability
|
||||
{
|
||||
NormalReliability = 0,
|
||||
HighReliability = 1
|
||||
}
|
||||
public enum Protocol
|
||||
{
|
||||
None = -1,
|
||||
Hopopt = 0,
|
||||
Icmp = 1,
|
||||
Igmp = 2,
|
||||
Ggp = 3,
|
||||
Ip = 4,
|
||||
St = 5,
|
||||
Tcp = 6,
|
||||
Cbt = 7,
|
||||
Egp = 8,
|
||||
Igp = 9,
|
||||
Bbnrrcmon = 10,
|
||||
Nvp2 = 11,
|
||||
Pup = 12,
|
||||
Udp = 17,
|
||||
Idp = 22,
|
||||
Nd = 77
|
||||
}
|
||||
public enum ControlBit
|
||||
{
|
||||
Urg = 0,
|
||||
Ack = 1,
|
||||
Psh = 2,
|
||||
Rst = 3,
|
||||
Syn = 4,
|
||||
Fin = 5
|
||||
}
|
||||
}
|
|
@ -0,0 +1,85 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace ProjectCarbon.Protocols
|
||||
{
|
||||
[Serializable]
|
||||
public class IpProtocol
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Provides a list of properties for this protocol.
|
||||
/// </summary>
|
||||
private Dictionary<string, object> m_protocolProperties =
|
||||
new Dictionary<string, object>();
|
||||
|
||||
public IpProtocol(byte[] packetBuffer)
|
||||
{
|
||||
BigEndianConverter endianConverter = new BigEndianConverter();
|
||||
|
||||
if (packetBuffer == null)
|
||||
throw new ArgumentException("Incoming Packet is null.");
|
||||
|
||||
if (packetBuffer.Length < 20)
|
||||
throw new ArgumentException("Incomplete IP Header");
|
||||
|
||||
int version = (packetBuffer[0] & 0xF0) >> 4;
|
||||
int headerLength = (packetBuffer[0] & 0x0F) * 4;
|
||||
|
||||
if ((packetBuffer[0] & 0x0F) < 5)
|
||||
throw new ArgumentException("Smaller then 5");
|
||||
|
||||
Precedence precedence = (Precedence)((packetBuffer[1] & 0xE0) >> 5);
|
||||
Delay delay = (Delay)((packetBuffer[1] & 0x10) >> 4);
|
||||
Throughput throughput = (Throughput)((packetBuffer[1] & 0x08) >> 3);
|
||||
Reliability reliability = (Reliability)((packetBuffer[1] & 0x04) >> 2);
|
||||
|
||||
int totalLength = (packetBuffer[2] * 256) + packetBuffer[3];
|
||||
int identification = (packetBuffer[4] * 256) + packetBuffer[5];
|
||||
int timeToLive = packetBuffer[8];
|
||||
|
||||
Protocol protocol = (Protocol)packetBuffer[9];
|
||||
|
||||
ushort checksum = endianConverter.ToUInt16(packetBuffer, 10);
|
||||
|
||||
string sourceAddress = String.Format("{0}.{1}.{2}.{3}",
|
||||
packetBuffer[12], packetBuffer[13], packetBuffer[14], packetBuffer[15]);
|
||||
string destinationAddress = String.Format("{0}.{1}.{2}.{3}",
|
||||
packetBuffer[16], packetBuffer[17], packetBuffer[18], packetBuffer[19]);
|
||||
|
||||
byte[] payload = new byte[packetBuffer.Length - headerLength];
|
||||
|
||||
Array.Copy(packetBuffer, headerLength, payload, 0, payload.Length);
|
||||
|
||||
DateTime packetTime = System.DateTime.Now;
|
||||
|
||||
// add all these to the properties
|
||||
m_protocolProperties.Add("Version", version);
|
||||
m_protocolProperties.Add("HeaderLength", headerLength);
|
||||
m_protocolProperties.Add("Precedence", precedence);
|
||||
m_protocolProperties.Add("Delay", delay);
|
||||
m_protocolProperties.Add("Throughput", throughput);
|
||||
m_protocolProperties.Add("Reliability", reliability);
|
||||
m_protocolProperties.Add("TotalLength", totalLength);
|
||||
m_protocolProperties.Add("Identification", identification);
|
||||
m_protocolProperties.Add("TimeToLive", timeToLive);
|
||||
m_protocolProperties.Add("Protocol", protocol);
|
||||
m_protocolProperties.Add("Checksum", checksum);
|
||||
m_protocolProperties.Add("SourceAddress", sourceAddress);
|
||||
m_protocolProperties.Add("DestinationAddress", destinationAddress);
|
||||
m_protocolProperties.Add("Payload", payload);
|
||||
|
||||
m_protocolProperties.Add("PacketTime", packetTime);
|
||||
m_protocolProperties.Add("PacketPayload", packetBuffer);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Allows you to access the properties of this protocol
|
||||
/// </summary>
|
||||
public Dictionary<string, object> Properties
|
||||
{
|
||||
get { return m_protocolProperties; }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,97 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace ProjectCarbon.Protocols
|
||||
{
|
||||
/// <summary>
|
||||
/// All protocols within the IP protocol should derive from this
|
||||
/// class.
|
||||
/// </summary>
|
||||
abstract class IpSubProtocol
|
||||
{
|
||||
/// <summary>
|
||||
/// Provides a list of properties for this protocol.
|
||||
/// </summary>
|
||||
protected Dictionary<string, object> m_protocolProperties =
|
||||
new Dictionary<string, object>();
|
||||
|
||||
/// <summary>
|
||||
/// Stores what protocol this handles.
|
||||
/// </summary>
|
||||
protected Protocol m_protocol;
|
||||
|
||||
/// <summary>
|
||||
/// This will get you the protocol name.
|
||||
/// </summary>
|
||||
protected string m_name = null;
|
||||
|
||||
/// <summary>
|
||||
/// You may optionally provide a protocol description
|
||||
/// </summary>
|
||||
protected string m_description = null;
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new protocol
|
||||
/// </summary>
|
||||
/// <param name="protocol">The protocol this class will handle.</param>
|
||||
public IpSubProtocol(Protocol protocol, string name, string description)
|
||||
{
|
||||
m_protocol = protocol;
|
||||
m_name = name;
|
||||
m_description = description;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Allows you to access the properties of this protocol
|
||||
/// </summary>
|
||||
public Dictionary<string, object> Properties
|
||||
{
|
||||
get { return m_protocolProperties; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the protocol name
|
||||
/// </summary>
|
||||
public string Name
|
||||
{
|
||||
get { return m_name; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a short description of this protocol
|
||||
/// </summary>
|
||||
public string Description
|
||||
{
|
||||
get { return m_description; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This must be implemented, it's the parsing routine for this protocol.
|
||||
/// </summary>
|
||||
/// <param name="bufferData">Incoming packet data</param>
|
||||
public abstract void ProcessData(byte[] bufferData);
|
||||
|
||||
/// <summary>
|
||||
/// Returns the correct processor for the protocol, but
|
||||
/// it might return null if it has no processor.
|
||||
/// </summary>
|
||||
/// <param name="protocol"></param>
|
||||
/// <returns>A new instance of the protocol</returns>
|
||||
public static IpSubProtocol GetProtocolInstance(Protocol protocol)
|
||||
{
|
||||
switch (protocol)
|
||||
{
|
||||
case Protocol.Tcp:
|
||||
return new TcpProtocol();
|
||||
case Protocol.Udp:
|
||||
return new UdpProtocol();
|
||||
case Protocol.Icmp:
|
||||
return new IcmpProtocol();
|
||||
default:
|
||||
return new GenericProtocol();
|
||||
}
|
||||
//return null;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace ProjectCarbon.Protocols
|
||||
{
|
||||
class TcpProtocol: IpSubProtocol
|
||||
{
|
||||
public TcpProtocol()
|
||||
: base(Protocol.Tcp, "TCP", "Transmission Control Protocol")
|
||||
{
|
||||
}
|
||||
|
||||
public override void ProcessData(byte[] bufferData)
|
||||
{
|
||||
BigEndianConverter endianConverter = new BigEndianConverter();
|
||||
|
||||
int sourcePort = endianConverter.ToUInt16(bufferData, 0);
|
||||
int destinationPort = endianConverter.ToUInt16(bufferData, 2);
|
||||
uint sequenceNumber = endianConverter.ToUInt32(bufferData, 4);
|
||||
uint packNumber = endianConverter.ToUInt32(bufferData, 8);
|
||||
int dataOffset = ((bufferData[12] & 0xF0) >> 4) * 4;
|
||||
byte[] payload = new byte[bufferData.Length - dataOffset];
|
||||
|
||||
Array.Copy(bufferData, dataOffset, payload, 0, payload.Length);
|
||||
|
||||
// These are all the properties for TCP.
|
||||
m_protocolProperties.Add("SourcePort", sourcePort);
|
||||
m_protocolProperties.Add("DestinationPort", destinationPort);
|
||||
m_protocolProperties.Add("SequenceNumber", sequenceNumber);
|
||||
m_protocolProperties.Add("AckNumber", packNumber);
|
||||
m_protocolProperties.Add("DataOffset", dataOffset);
|
||||
m_protocolProperties.Add("Payload", payload);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,37 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace ProjectCarbon.Protocols
|
||||
{
|
||||
class UdpProtocol : IpSubProtocol
|
||||
{
|
||||
public UdpProtocol()
|
||||
: base(Protocol.Udp, "UDP", "User Datagram Protocol")
|
||||
{
|
||||
}
|
||||
|
||||
public override void ProcessData(byte[] bufferData)
|
||||
{
|
||||
// The UDP protocol uses big-endian.
|
||||
BigEndianConverter endianConverter = new BigEndianConverter();
|
||||
|
||||
// Read the header information
|
||||
int sourcePort = endianConverter.ToUInt16(bufferData, 0);
|
||||
int destinationPort = endianConverter.ToUInt16(bufferData, 2);
|
||||
int length = endianConverter.ToUInt16(bufferData, 4);
|
||||
int checksum = endianConverter.ToUInt16(bufferData, 6);
|
||||
byte[] payload = new byte[length - 8];
|
||||
|
||||
// Copy the buffer
|
||||
Array.Copy(bufferData, 8, payload, 0, length - 8);
|
||||
|
||||
// Add the properties
|
||||
m_protocolProperties.Add("SourcePort", sourcePort);
|
||||
m_protocolProperties.Add("DestinationPort", destinationPort);
|
||||
m_protocolProperties.Add("Length", length);
|
||||
m_protocolProperties.Add("Checksum", checksum);
|
||||
m_protocolProperties.Add("Payload", payload);
|
||||
}
|
||||
}
|
||||
}
|
After Width: | Height: | Size: 4.8 KiB |
After Width: | Height: | Size: 921 B |
After Width: | Height: | Size: 893 B |
After Width: | Height: | Size: 939 B |
After Width: | Height: | Size: 922 B |
After Width: | Height: | Size: 940 B |
After Width: | Height: | Size: 916 B |
After Width: | Height: | Size: 976 B |
After Width: | Height: | Size: 905 B |
After Width: | Height: | Size: 948 B |
After Width: | Height: | Size: 916 B |
After Width: | Height: | Size: 894 B |
After Width: | Height: | Size: 4.1 KiB |
|
@ -0,0 +1,54 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<configSections>
|
||||
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
|
||||
<section name="ProjectCarbon.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
<userSettings>
|
||||
<ProjectCarbon.Properties.Settings>
|
||||
<setting name="StartUpWindows" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="StartUpMinimized" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="StartUpCapture" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="ProtocolFilterType" serializeAs="String">
|
||||
<value>0</value>
|
||||
</setting>
|
||||
<setting name="PacketListBackgroundColor" serializeAs="String">
|
||||
<value>Window</value>
|
||||
</setting>
|
||||
<setting name="PacketListTextColor" serializeAs="String">
|
||||
<value>WindowText</value>
|
||||
</setting>
|
||||
<setting name="PacketDisplayFontColor" serializeAs="String">
|
||||
<value>WindowText</value>
|
||||
</setting>
|
||||
<setting name="PacketDisplayBackgroundColor" serializeAs="String">
|
||||
<value>Window</value>
|
||||
</setting>
|
||||
<setting name="PacketDisplayFontFace" serializeAs="String">
|
||||
<value>Courier New, 9.75pt, style=Bold</value>
|
||||
</setting>
|
||||
<setting name="AutoScrollPacketList" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="ToolbarVisible" serializeAs="String">
|
||||
<value>True</value>
|
||||
</setting>
|
||||
<setting name="StatusBarVisible" serializeAs="String">
|
||||
<value>True</value>
|
||||
</setting>
|
||||
<setting name="PacketListVisible" serializeAs="String">
|
||||
<value>True</value>
|
||||
</setting>
|
||||
<setting name="PacketDisplayVisible" serializeAs="String">
|
||||
<value>True</value>
|
||||
</setting>
|
||||
</ProjectCarbon.Properties.Settings>
|
||||
</userSettings>
|
||||
</configuration>
|
|
@ -0,0 +1,176 @@
|
|||
namespace ProjectCarbon
|
||||
{
|
||||
partial class frmAboutDialog
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
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.labelProductName = new System.Windows.Forms.Label();
|
||||
this.labelVersion = new System.Windows.Forms.Label();
|
||||
this.labelCopyright = new System.Windows.Forms.Label();
|
||||
this.labelCompanyName = new System.Windows.Forms.Label();
|
||||
this.okButton = new System.Windows.Forms.Button();
|
||||
this.picLogo = new System.Windows.Forms.PictureBox();
|
||||
this.panel1 = new System.Windows.Forms.Panel();
|
||||
this.textBoxDescription = new System.Windows.Forms.TextBox();
|
||||
((System.ComponentModel.ISupportInitialize)(this.picLogo)).BeginInit();
|
||||
this.panel1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// labelProductName
|
||||
//
|
||||
this.labelProductName.AutoSize = true;
|
||||
this.labelProductName.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.labelProductName.Location = new System.Drawing.Point(72, 8);
|
||||
this.labelProductName.Margin = new System.Windows.Forms.Padding(6, 0, 3, 0);
|
||||
this.labelProductName.MaximumSize = new System.Drawing.Size(0, 17);
|
||||
this.labelProductName.Name = "labelProductName";
|
||||
this.labelProductName.Size = new System.Drawing.Size(86, 13);
|
||||
this.labelProductName.TabIndex = 26;
|
||||
this.labelProductName.Text = "Product Name";
|
||||
this.labelProductName.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
//
|
||||
// labelVersion
|
||||
//
|
||||
this.labelVersion.AutoSize = true;
|
||||
this.labelVersion.Location = new System.Drawing.Point(72, 24);
|
||||
this.labelVersion.Margin = new System.Windows.Forms.Padding(6, 0, 3, 0);
|
||||
this.labelVersion.MaximumSize = new System.Drawing.Size(0, 17);
|
||||
this.labelVersion.Name = "labelVersion";
|
||||
this.labelVersion.Size = new System.Drawing.Size(42, 13);
|
||||
this.labelVersion.TabIndex = 25;
|
||||
this.labelVersion.Text = "Version";
|
||||
this.labelVersion.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
//
|
||||
// labelCopyright
|
||||
//
|
||||
this.labelCopyright.AutoSize = true;
|
||||
this.labelCopyright.Location = new System.Drawing.Point(72, 40);
|
||||
this.labelCopyright.Margin = new System.Windows.Forms.Padding(6, 0, 3, 0);
|
||||
this.labelCopyright.MaximumSize = new System.Drawing.Size(0, 17);
|
||||
this.labelCopyright.Name = "labelCopyright";
|
||||
this.labelCopyright.Size = new System.Drawing.Size(54, 13);
|
||||
this.labelCopyright.TabIndex = 27;
|
||||
this.labelCopyright.Text = "Copyright";
|
||||
this.labelCopyright.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
//
|
||||
// labelCompanyName
|
||||
//
|
||||
this.labelCompanyName.AutoSize = true;
|
||||
this.labelCompanyName.Location = new System.Drawing.Point(72, 56);
|
||||
this.labelCompanyName.Margin = new System.Windows.Forms.Padding(6, 0, 3, 0);
|
||||
this.labelCompanyName.MaximumSize = new System.Drawing.Size(0, 17);
|
||||
this.labelCompanyName.Name = "labelCompanyName";
|
||||
this.labelCompanyName.Size = new System.Drawing.Size(82, 13);
|
||||
this.labelCompanyName.TabIndex = 28;
|
||||
this.labelCompanyName.Text = "Company Name";
|
||||
this.labelCompanyName.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
//
|
||||
// okButton
|
||||
//
|
||||
this.okButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.okButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
this.okButton.Location = new System.Drawing.Point(261, 183);
|
||||
this.okButton.Name = "okButton";
|
||||
this.okButton.Size = new System.Drawing.Size(75, 23);
|
||||
this.okButton.TabIndex = 30;
|
||||
this.okButton.Text = "&OK";
|
||||
this.okButton.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// picLogo
|
||||
//
|
||||
this.picLogo.Image = global::ProjectCarbon.Properties.Resources.aboutlogo1;
|
||||
this.picLogo.Location = new System.Drawing.Point(8, 8);
|
||||
this.picLogo.Name = "picLogo";
|
||||
this.picLogo.Size = new System.Drawing.Size(57, 54);
|
||||
this.picLogo.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
|
||||
this.picLogo.TabIndex = 31;
|
||||
this.picLogo.TabStop = false;
|
||||
//
|
||||
// panel1
|
||||
//
|
||||
this.panel1.BackColor = System.Drawing.Color.White;
|
||||
this.panel1.Controls.Add(this.textBoxDescription);
|
||||
this.panel1.Controls.Add(this.picLogo);
|
||||
this.panel1.Controls.Add(this.labelCompanyName);
|
||||
this.panel1.Controls.Add(this.labelProductName);
|
||||
this.panel1.Controls.Add(this.labelCopyright);
|
||||
this.panel1.Controls.Add(this.labelVersion);
|
||||
this.panel1.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.panel1.Location = new System.Drawing.Point(0, 0);
|
||||
this.panel1.Name = "panel1";
|
||||
this.panel1.Size = new System.Drawing.Size(344, 176);
|
||||
this.panel1.TabIndex = 32;
|
||||
//
|
||||
// textBoxDescription
|
||||
//
|
||||
this.textBoxDescription.Location = new System.Drawing.Point(8, 80);
|
||||
this.textBoxDescription.Margin = new System.Windows.Forms.Padding(6, 3, 3, 3);
|
||||
this.textBoxDescription.Multiline = true;
|
||||
this.textBoxDescription.Name = "textBoxDescription";
|
||||
this.textBoxDescription.ReadOnly = true;
|
||||
this.textBoxDescription.ScrollBars = System.Windows.Forms.ScrollBars.Both;
|
||||
this.textBoxDescription.Size = new System.Drawing.Size(328, 88);
|
||||
this.textBoxDescription.TabIndex = 32;
|
||||
this.textBoxDescription.TabStop = false;
|
||||
this.textBoxDescription.Text = "Description";
|
||||
//
|
||||
// frmAboutDialog
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.SystemColors.Control;
|
||||
this.ClientSize = new System.Drawing.Size(344, 213);
|
||||
this.Controls.Add(this.panel1);
|
||||
this.Controls.Add(this.okButton);
|
||||
this.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "frmAboutDialog";
|
||||
this.ShowIcon = false;
|
||||
this.ShowInTaskbar = false;
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "About Dialog...";
|
||||
this.Load += new System.EventHandler(this.frmAboutDialog_Load);
|
||||
((System.ComponentModel.ISupportInitialize)(this.picLogo)).EndInit();
|
||||
this.panel1.ResumeLayout(false);
|
||||
this.panel1.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Label labelProductName;
|
||||
private System.Windows.Forms.Label labelVersion;
|
||||
private System.Windows.Forms.Label labelCopyright;
|
||||
private System.Windows.Forms.Label labelCompanyName;
|
||||
private System.Windows.Forms.Button okButton;
|
||||
private System.Windows.Forms.PictureBox picLogo;
|
||||
private System.Windows.Forms.Panel panel1;
|
||||
private System.Windows.Forms.TextBox textBoxDescription;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,125 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
using System.Reflection;
|
||||
using System.Globalization;
|
||||
using Tamir.IPLib;
|
||||
|
||||
namespace ProjectCarbon
|
||||
{
|
||||
partial class frmAboutDialog : Form
|
||||
{
|
||||
public frmAboutDialog()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
// Initialize the AboutBox to display the product information from the assembly information.
|
||||
// Change assembly information settings for your application through either:
|
||||
// - Project->Properties->Application->Assembly Information
|
||||
// - AssemblyInfo.cs
|
||||
this.Text = String.Format(CultureInfo.CurrentCulture,
|
||||
"About {0}", AssemblyTitle);
|
||||
this.labelProductName.Text = AssemblyProduct;
|
||||
this.labelVersion.Text = String.Format(CultureInfo.CurrentCulture,
|
||||
"Version {0}", AssemblyVersion);
|
||||
this.labelCopyright.Text = AssemblyCopyright;
|
||||
this.labelCompanyName.Text = AssemblyCompany;
|
||||
this.textBoxDescription.Text = AssemblyDescription;
|
||||
this.textBoxDescription.Text += "\r\n\r\n" + SharpPcap.Version;
|
||||
}
|
||||
|
||||
#region Assembly Attribute Accessors
|
||||
|
||||
public static string AssemblyTitle
|
||||
{
|
||||
get
|
||||
{
|
||||
// Get all Title attributes on this assembly
|
||||
object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyTitleAttribute), false);
|
||||
// If there is at least one Title attribute
|
||||
if (attributes.Length > 0)
|
||||
{
|
||||
// Select the first one
|
||||
AssemblyTitleAttribute titleAttribute = (AssemblyTitleAttribute)attributes[0];
|
||||
// If it is not an empty string, return it
|
||||
if (titleAttribute.Title.Length != 0)
|
||||
return titleAttribute.Title;
|
||||
}
|
||||
// If there was no Title attribute, or if the Title attribute was the empty string, return the .exe name
|
||||
return System.IO.Path.GetFileNameWithoutExtension(Assembly.GetExecutingAssembly().CodeBase);
|
||||
}
|
||||
}
|
||||
|
||||
public static string AssemblyVersion
|
||||
{
|
||||
get
|
||||
{
|
||||
return Assembly.GetExecutingAssembly().GetName().Version.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
public static string AssemblyDescription
|
||||
{
|
||||
get
|
||||
{
|
||||
// Get all Description attributes on this assembly
|
||||
object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyDescriptionAttribute), false);
|
||||
// If there aren't any Description attributes, return an empty string
|
||||
if (attributes.Length == 0)
|
||||
return "";
|
||||
// If there is a Description attribute, return its value
|
||||
return ((AssemblyDescriptionAttribute)attributes[0]).Description;
|
||||
}
|
||||
}
|
||||
|
||||
public static string AssemblyProduct
|
||||
{
|
||||
get
|
||||
{
|
||||
// Get all Product attributes on this assembly
|
||||
object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyProductAttribute), false);
|
||||
// If there aren't any Product attributes, return an empty string
|
||||
if (attributes.Length == 0)
|
||||
return "";
|
||||
// If there is a Product attribute, return its value
|
||||
return ((AssemblyProductAttribute)attributes[0]).Product;
|
||||
}
|
||||
}
|
||||
|
||||
public static string AssemblyCopyright
|
||||
{
|
||||
get
|
||||
{
|
||||
// Get all Copyright attributes on this assembly
|
||||
object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyCopyrightAttribute), false);
|
||||
// If there aren't any Copyright attributes, return an empty string
|
||||
if (attributes.Length == 0)
|
||||
return "";
|
||||
// If there is a Copyright attribute, return its value
|
||||
return ((AssemblyCopyrightAttribute)attributes[0]).Copyright;
|
||||
}
|
||||
}
|
||||
|
||||
public static string AssemblyCompany
|
||||
{
|
||||
get
|
||||
{
|
||||
// Get all Company attributes on this assembly
|
||||
object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyCompanyAttribute), false);
|
||||
// If there aren't any Company attributes, return an empty string
|
||||
if (attributes.Length == 0)
|
||||
return "";
|
||||
// If there is a Company attribute, return its value
|
||||
return ((AssemblyCompanyAttribute)attributes[0]).Company;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
private void frmAboutDialog_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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>
|
|
@ -0,0 +1,416 @@
|
|||
namespace ProjectCarbon
|
||||
{
|
||||
partial class frmCaptureFilters
|
||||
{
|
||||
/// <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.tcCaptureFilters = new System.Windows.Forms.TabControl();
|
||||
this.tabPage1 = new System.Windows.Forms.TabPage();
|
||||
this.grpFilterType = new System.Windows.Forms.GroupBox();
|
||||
this.rbExclusiveProtocolFilter = new System.Windows.Forms.RadioButton();
|
||||
this.rbInclusiveProtocolFilter = new System.Windows.Forms.RadioButton();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.clbProtocolFilters = new System.Windows.Forms.CheckedListBox();
|
||||
this.tpPortFilters = new System.Windows.Forms.TabPage();
|
||||
this.grpAddCustomPort = new System.Windows.Forms.GroupBox();
|
||||
this.txtPort = new System.Windows.Forms.TextBox();
|
||||
this.lblPort = new System.Windows.Forms.Label();
|
||||
this.btnAddCustomPort = new System.Windows.Forms.Button();
|
||||
this.btnRemoveAll = new System.Windows.Forms.Button();
|
||||
this.groupBox1 = new System.Windows.Forms.GroupBox();
|
||||
this.rbExclusivePortFilter = new System.Windows.Forms.RadioButton();
|
||||
this.rbInclusivePortFilter = new System.Windows.Forms.RadioButton();
|
||||
this.btnRemovePort = new System.Windows.Forms.Button();
|
||||
this.btnAddPort = new System.Windows.Forms.Button();
|
||||
this.lblCommonPorts = new System.Windows.Forms.Label();
|
||||
this.lstCommonPorts = new System.Windows.Forms.ListBox();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.lblFilteredPorts = new System.Windows.Forms.Label();
|
||||
this.lstFilteredPorts = new System.Windows.Forms.ListBox();
|
||||
this.cmdCancel = new System.Windows.Forms.Button();
|
||||
this.cmdApply = new System.Windows.Forms.Button();
|
||||
this.tcCaptureFilters.SuspendLayout();
|
||||
this.tabPage1.SuspendLayout();
|
||||
this.grpFilterType.SuspendLayout();
|
||||
this.tpPortFilters.SuspendLayout();
|
||||
this.grpAddCustomPort.SuspendLayout();
|
||||
this.groupBox1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// tcCaptureFilters
|
||||
//
|
||||
this.tcCaptureFilters.Controls.Add(this.tabPage1);
|
||||
this.tcCaptureFilters.Controls.Add(this.tpPortFilters);
|
||||
this.tcCaptureFilters.Location = new System.Drawing.Point(8, 8);
|
||||
this.tcCaptureFilters.Name = "tcCaptureFilters";
|
||||
this.tcCaptureFilters.SelectedIndex = 0;
|
||||
this.tcCaptureFilters.Size = new System.Drawing.Size(400, 296);
|
||||
this.tcCaptureFilters.TabIndex = 0;
|
||||
//
|
||||
// tabPage1
|
||||
//
|
||||
this.tabPage1.Controls.Add(this.grpFilterType);
|
||||
this.tabPage1.Controls.Add(this.label1);
|
||||
this.tabPage1.Controls.Add(this.clbProtocolFilters);
|
||||
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(392, 270);
|
||||
this.tabPage1.TabIndex = 0;
|
||||
this.tabPage1.Text = "Protocol";
|
||||
this.tabPage1.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// grpFilterType
|
||||
//
|
||||
this.grpFilterType.Controls.Add(this.rbExclusiveProtocolFilter);
|
||||
this.grpFilterType.Controls.Add(this.rbInclusiveProtocolFilter);
|
||||
this.grpFilterType.Location = new System.Drawing.Point(120, 8);
|
||||
this.grpFilterType.Name = "grpFilterType";
|
||||
this.grpFilterType.Size = new System.Drawing.Size(264, 64);
|
||||
this.grpFilterType.TabIndex = 4;
|
||||
this.grpFilterType.TabStop = false;
|
||||
this.grpFilterType.Text = "Filter Type";
|
||||
//
|
||||
// rbExclusiveProtocolFilter
|
||||
//
|
||||
this.rbExclusiveProtocolFilter.AutoSize = true;
|
||||
this.rbExclusiveProtocolFilter.Location = new System.Drawing.Point(8, 40);
|
||||
this.rbExclusiveProtocolFilter.Name = "rbExclusiveProtocolFilter";
|
||||
this.rbExclusiveProtocolFilter.Size = new System.Drawing.Size(69, 17);
|
||||
this.rbExclusiveProtocolFilter.TabIndex = 4;
|
||||
this.rbExclusiveProtocolFilter.Text = "Exclusive";
|
||||
this.rbExclusiveProtocolFilter.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// rbInclusiveProtocolFilter
|
||||
//
|
||||
this.rbInclusiveProtocolFilter.AutoSize = true;
|
||||
this.rbInclusiveProtocolFilter.Checked = true;
|
||||
this.rbInclusiveProtocolFilter.Location = new System.Drawing.Point(8, 16);
|
||||
this.rbInclusiveProtocolFilter.Name = "rbInclusiveProtocolFilter";
|
||||
this.rbInclusiveProtocolFilter.Size = new System.Drawing.Size(67, 17);
|
||||
this.rbInclusiveProtocolFilter.TabIndex = 3;
|
||||
this.rbInclusiveProtocolFilter.TabStop = true;
|
||||
this.rbInclusiveProtocolFilter.Text = "Inclusive";
|
||||
this.rbInclusiveProtocolFilter.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.Location = new System.Drawing.Point(8, 224);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(368, 32);
|
||||
this.label1.TabIndex = 3;
|
||||
this.label1.Text = "Each IP header contains a protocol id, this will let you filter out or in packets" +
|
||||
" using this identifier.";
|
||||
//
|
||||
// clbProtocolFilters
|
||||
//
|
||||
this.clbProtocolFilters.FormattingEnabled = true;
|
||||
this.clbProtocolFilters.IntegralHeight = false;
|
||||
this.clbProtocolFilters.Items.AddRange(new object[] {
|
||||
"ICMP",
|
||||
"IGMP",
|
||||
"GGP",
|
||||
"IP",
|
||||
"ST",
|
||||
"TCP",
|
||||
"CBT",
|
||||
"EGP",
|
||||
"IGP",
|
||||
"PUP",
|
||||
"UDP",
|
||||
"IDP",
|
||||
"ND"});
|
||||
this.clbProtocolFilters.Location = new System.Drawing.Point(8, 8);
|
||||
this.clbProtocolFilters.Name = "clbProtocolFilters";
|
||||
this.clbProtocolFilters.Size = new System.Drawing.Size(104, 208);
|
||||
this.clbProtocolFilters.TabIndex = 0;
|
||||
//
|
||||
// tpPortFilters
|
||||
//
|
||||
this.tpPortFilters.Controls.Add(this.grpAddCustomPort);
|
||||
this.tpPortFilters.Controls.Add(this.btnRemoveAll);
|
||||
this.tpPortFilters.Controls.Add(this.groupBox1);
|
||||
this.tpPortFilters.Controls.Add(this.btnRemovePort);
|
||||
this.tpPortFilters.Controls.Add(this.btnAddPort);
|
||||
this.tpPortFilters.Controls.Add(this.lblCommonPorts);
|
||||
this.tpPortFilters.Controls.Add(this.lstCommonPorts);
|
||||
this.tpPortFilters.Controls.Add(this.label3);
|
||||
this.tpPortFilters.Controls.Add(this.lblFilteredPorts);
|
||||
this.tpPortFilters.Controls.Add(this.lstFilteredPorts);
|
||||
this.tpPortFilters.Location = new System.Drawing.Point(4, 22);
|
||||
this.tpPortFilters.Name = "tpPortFilters";
|
||||
this.tpPortFilters.Size = new System.Drawing.Size(392, 270);
|
||||
this.tpPortFilters.TabIndex = 2;
|
||||
this.tpPortFilters.Text = "Ports";
|
||||
this.tpPortFilters.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// grpAddCustomPort
|
||||
//
|
||||
this.grpAddCustomPort.Controls.Add(this.txtPort);
|
||||
this.grpAddCustomPort.Controls.Add(this.lblPort);
|
||||
this.grpAddCustomPort.Controls.Add(this.btnAddCustomPort);
|
||||
this.grpAddCustomPort.Location = new System.Drawing.Point(128, 120);
|
||||
this.grpAddCustomPort.Name = "grpAddCustomPort";
|
||||
this.grpAddCustomPort.Size = new System.Drawing.Size(112, 96);
|
||||
this.grpAddCustomPort.TabIndex = 14;
|
||||
this.grpAddCustomPort.TabStop = false;
|
||||
this.grpAddCustomPort.Text = "Custom Port";
|
||||
//
|
||||
// txtPort
|
||||
//
|
||||
this.txtPort.Location = new System.Drawing.Point(8, 64);
|
||||
this.txtPort.Name = "txtPort";
|
||||
this.txtPort.Size = new System.Drawing.Size(96, 21);
|
||||
this.txtPort.TabIndex = 17;
|
||||
//
|
||||
// lblPort
|
||||
//
|
||||
this.lblPort.AutoSize = true;
|
||||
this.lblPort.Location = new System.Drawing.Point(8, 48);
|
||||
this.lblPort.Name = "lblPort";
|
||||
this.lblPort.Size = new System.Drawing.Size(31, 13);
|
||||
this.lblPort.TabIndex = 16;
|
||||
this.lblPort.Text = "Port:";
|
||||
//
|
||||
// btnAddCustomPort
|
||||
//
|
||||
this.btnAddCustomPort.Location = new System.Drawing.Point(8, 16);
|
||||
this.btnAddCustomPort.Name = "btnAddCustomPort";
|
||||
this.btnAddCustomPort.Size = new System.Drawing.Size(96, 23);
|
||||
this.btnAddCustomPort.TabIndex = 15;
|
||||
this.btnAddCustomPort.Text = "<< Add Custom";
|
||||
this.btnAddCustomPort.UseVisualStyleBackColor = true;
|
||||
this.btnAddCustomPort.Click += new System.EventHandler(this.btnAddCustomPort_Click);
|
||||
//
|
||||
// btnRemoveAll
|
||||
//
|
||||
this.btnRemoveAll.Location = new System.Drawing.Point(128, 88);
|
||||
this.btnRemoveAll.Name = "btnRemoveAll";
|
||||
this.btnRemoveAll.Size = new System.Drawing.Size(112, 24);
|
||||
this.btnRemoveAll.TabIndex = 13;
|
||||
this.btnRemoveAll.Text = "Remove All >>";
|
||||
this.btnRemoveAll.UseVisualStyleBackColor = true;
|
||||
this.btnRemoveAll.Click += new System.EventHandler(this.btnRemoveAll_Click);
|
||||
//
|
||||
// groupBox1
|
||||
//
|
||||
this.groupBox1.Controls.Add(this.rbExclusivePortFilter);
|
||||
this.groupBox1.Controls.Add(this.rbInclusivePortFilter);
|
||||
this.groupBox1.Location = new System.Drawing.Point(8, 224);
|
||||
this.groupBox1.Name = "groupBox1";
|
||||
this.groupBox1.Size = new System.Drawing.Size(160, 40);
|
||||
this.groupBox1.TabIndex = 12;
|
||||
this.groupBox1.TabStop = false;
|
||||
this.groupBox1.Text = "Filter Type";
|
||||
//
|
||||
// rbExclusivePortFilter
|
||||
//
|
||||
this.rbExclusivePortFilter.AutoSize = true;
|
||||
this.rbExclusivePortFilter.Location = new System.Drawing.Point(80, 16);
|
||||
this.rbExclusivePortFilter.Name = "rbExclusivePortFilter";
|
||||
this.rbExclusivePortFilter.Size = new System.Drawing.Size(69, 17);
|
||||
this.rbExclusivePortFilter.TabIndex = 4;
|
||||
this.rbExclusivePortFilter.Text = "Exclusive";
|
||||
this.rbExclusivePortFilter.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// rbInclusivePortFilter
|
||||
//
|
||||
this.rbInclusivePortFilter.AutoSize = true;
|
||||
this.rbInclusivePortFilter.Checked = true;
|
||||
this.rbInclusivePortFilter.Location = new System.Drawing.Point(8, 16);
|
||||
this.rbInclusivePortFilter.Name = "rbInclusivePortFilter";
|
||||
this.rbInclusivePortFilter.Size = new System.Drawing.Size(67, 17);
|
||||
this.rbInclusivePortFilter.TabIndex = 3;
|
||||
this.rbInclusivePortFilter.TabStop = true;
|
||||
this.rbInclusivePortFilter.Text = "Inclusive";
|
||||
this.rbInclusivePortFilter.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// btnRemovePort
|
||||
//
|
||||
this.btnRemovePort.Location = new System.Drawing.Point(128, 56);
|
||||
this.btnRemovePort.Name = "btnRemovePort";
|
||||
this.btnRemovePort.Size = new System.Drawing.Size(112, 23);
|
||||
this.btnRemovePort.TabIndex = 8;
|
||||
this.btnRemovePort.Text = "Remove >>";
|
||||
this.btnRemovePort.UseVisualStyleBackColor = true;
|
||||
this.btnRemovePort.Click += new System.EventHandler(this.btnRemovePort_Click);
|
||||
//
|
||||
// btnAddPort
|
||||
//
|
||||
this.btnAddPort.Location = new System.Drawing.Point(128, 24);
|
||||
this.btnAddPort.Name = "btnAddPort";
|
||||
this.btnAddPort.Size = new System.Drawing.Size(112, 23);
|
||||
this.btnAddPort.TabIndex = 7;
|
||||
this.btnAddPort.Text = "<< Add";
|
||||
this.btnAddPort.UseVisualStyleBackColor = true;
|
||||
this.btnAddPort.Click += new System.EventHandler(this.btnAddPort_Click);
|
||||
//
|
||||
// lblCommonPorts
|
||||
//
|
||||
this.lblCommonPorts.AutoSize = true;
|
||||
this.lblCommonPorts.Location = new System.Drawing.Point(248, 8);
|
||||
this.lblCommonPorts.Name = "lblCommonPorts";
|
||||
this.lblCommonPorts.Size = new System.Drawing.Size(80, 13);
|
||||
this.lblCommonPorts.TabIndex = 6;
|
||||
this.lblCommonPorts.Text = "Common Ports:";
|
||||
//
|
||||
// lstCommonPorts
|
||||
//
|
||||
this.lstCommonPorts.FormattingEnabled = true;
|
||||
this.lstCommonPorts.IntegralHeight = false;
|
||||
this.lstCommonPorts.Items.AddRange(new object[] {
|
||||
"80",
|
||||
"21",
|
||||
"23",
|
||||
"25",
|
||||
"53",
|
||||
"109",
|
||||
"110",
|
||||
"113",
|
||||
"143",
|
||||
"194",
|
||||
"443",
|
||||
"540",
|
||||
"758",
|
||||
"774",
|
||||
"2004",
|
||||
"4000",
|
||||
"5050",
|
||||
"5180",
|
||||
"5190",
|
||||
"6000",
|
||||
"6667"});
|
||||
this.lstCommonPorts.Location = new System.Drawing.Point(248, 24);
|
||||
this.lstCommonPorts.Name = "lstCommonPorts";
|
||||
this.lstCommonPorts.Size = new System.Drawing.Size(136, 192);
|
||||
this.lstCommonPorts.TabIndex = 5;
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.Location = new System.Drawing.Point(176, 224);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(208, 40);
|
||||
this.label3.TabIndex = 4;
|
||||
this.label3.Text = "Note: Filtered ports apply to packet source port OR destination port.";
|
||||
//
|
||||
// lblFilteredPorts
|
||||
//
|
||||
this.lblFilteredPorts.AutoSize = true;
|
||||
this.lblFilteredPorts.Location = new System.Drawing.Point(8, 8);
|
||||
this.lblFilteredPorts.Name = "lblFilteredPorts";
|
||||
this.lblFilteredPorts.Size = new System.Drawing.Size(75, 13);
|
||||
this.lblFilteredPorts.TabIndex = 1;
|
||||
this.lblFilteredPorts.Text = "Filtered Ports:";
|
||||
//
|
||||
// lstFilteredPorts
|
||||
//
|
||||
this.lstFilteredPorts.FormattingEnabled = true;
|
||||
this.lstFilteredPorts.IntegralHeight = false;
|
||||
this.lstFilteredPorts.Location = new System.Drawing.Point(8, 24);
|
||||
this.lstFilteredPorts.Name = "lstFilteredPorts";
|
||||
this.lstFilteredPorts.Size = new System.Drawing.Size(112, 192);
|
||||
this.lstFilteredPorts.TabIndex = 0;
|
||||
//
|
||||
// cmdCancel
|
||||
//
|
||||
this.cmdCancel.Location = new System.Drawing.Point(240, 312);
|
||||
this.cmdCancel.Name = "cmdCancel";
|
||||
this.cmdCancel.Size = new System.Drawing.Size(80, 23);
|
||||
this.cmdCancel.TabIndex = 4;
|
||||
this.cmdCancel.Text = "Cancel";
|
||||
this.cmdCancel.UseVisualStyleBackColor = true;
|
||||
this.cmdCancel.Click += new System.EventHandler(this.cmdCancel_Click);
|
||||
//
|
||||
// cmdApply
|
||||
//
|
||||
this.cmdApply.Location = new System.Drawing.Point(328, 312);
|
||||
this.cmdApply.Name = "cmdApply";
|
||||
this.cmdApply.Size = new System.Drawing.Size(80, 23);
|
||||
this.cmdApply.TabIndex = 3;
|
||||
this.cmdApply.Text = "Apply";
|
||||
this.cmdApply.UseVisualStyleBackColor = true;
|
||||
this.cmdApply.Click += new System.EventHandler(this.cmdApply_Click);
|
||||
//
|
||||
// frmCaptureFilters
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(416, 344);
|
||||
this.Controls.Add(this.cmdCancel);
|
||||
this.Controls.Add(this.cmdApply);
|
||||
this.Controls.Add(this.tcCaptureFilters);
|
||||
this.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "frmCaptureFilters";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "Capture Filters";
|
||||
this.Load += new System.EventHandler(this.CaptureFilters_Load);
|
||||
this.tcCaptureFilters.ResumeLayout(false);
|
||||
this.tabPage1.ResumeLayout(false);
|
||||
this.grpFilterType.ResumeLayout(false);
|
||||
this.grpFilterType.PerformLayout();
|
||||
this.tpPortFilters.ResumeLayout(false);
|
||||
this.tpPortFilters.PerformLayout();
|
||||
this.grpAddCustomPort.ResumeLayout(false);
|
||||
this.grpAddCustomPort.PerformLayout();
|
||||
this.groupBox1.ResumeLayout(false);
|
||||
this.groupBox1.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.TabControl tcCaptureFilters;
|
||||
private System.Windows.Forms.TabPage tabPage1;
|
||||
private System.Windows.Forms.TabPage tpPortFilters;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.CheckedListBox clbProtocolFilters;
|
||||
private System.Windows.Forms.Button cmdCancel;
|
||||
private System.Windows.Forms.Button cmdApply;
|
||||
private System.Windows.Forms.Label lblCommonPorts;
|
||||
private System.Windows.Forms.ListBox lstCommonPorts;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.Label lblFilteredPorts;
|
||||
private System.Windows.Forms.ListBox lstFilteredPorts;
|
||||
private System.Windows.Forms.Button btnRemovePort;
|
||||
private System.Windows.Forms.Button btnAddPort;
|
||||
private System.Windows.Forms.GroupBox grpFilterType;
|
||||
private System.Windows.Forms.RadioButton rbExclusiveProtocolFilter;
|
||||
private System.Windows.Forms.RadioButton rbInclusiveProtocolFilter;
|
||||
private System.Windows.Forms.GroupBox groupBox1;
|
||||
private System.Windows.Forms.RadioButton rbExclusivePortFilter;
|
||||
private System.Windows.Forms.RadioButton rbInclusivePortFilter;
|
||||
private System.Windows.Forms.Button btnRemoveAll;
|
||||
private System.Windows.Forms.GroupBox grpAddCustomPort;
|
||||
private System.Windows.Forms.TextBox txtPort;
|
||||
private System.Windows.Forms.Label lblPort;
|
||||
private System.Windows.Forms.Button btnAddCustomPort;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,100 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using ProjectCarbon.Properties;
|
||||
|
||||
namespace ProjectCarbon
|
||||
{
|
||||
public partial class frmCaptureFilters : Form
|
||||
{
|
||||
public frmCaptureFilters()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void cmdApply_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.FilteredProtocolList.Clear();
|
||||
for (int i = 0; i < clbProtocolFilters.CheckedIndices.Count; i++)
|
||||
{
|
||||
Global.FilteredProtocolList.Add((string)clbProtocolFilters.Items[clbProtocolFilters.CheckedIndices[i]]);
|
||||
}
|
||||
Global.ProtocolFilterInclusive = rbInclusiveProtocolFilter.Checked;
|
||||
|
||||
Global.FilteredPortList.Clear();
|
||||
for (int i = 0; i < lstFilteredPorts.Items.Count; i++)
|
||||
Global.FilteredPortList.Add((int)lstFilteredPorts.Items[i]);
|
||||
Global.PortFilterInclusive = rbInclusivePortFilter.Checked;
|
||||
|
||||
this.Close();
|
||||
}
|
||||
|
||||
private void CaptureFilters_Load(object sender, EventArgs e)
|
||||
{
|
||||
for (int i = 0; i < Global.FilteredProtocolList.Count; i++)
|
||||
{
|
||||
int itemIndex = clbProtocolFilters.FindString(Global.FilteredProtocolList[i]);
|
||||
clbProtocolFilters.SetItemChecked(itemIndex, true);
|
||||
}
|
||||
|
||||
if (Global.ProtocolFilterInclusive)
|
||||
rbInclusiveProtocolFilter.Checked = true;
|
||||
else
|
||||
rbExclusiveProtocolFilter.Checked = true;
|
||||
|
||||
if (Global.PortFilterInclusive)
|
||||
rbInclusivePortFilter.Checked = true;
|
||||
else
|
||||
rbExclusivePortFilter.Checked = true;
|
||||
|
||||
for (int i = 0; i < Global.FilteredPortList.Count; i++)
|
||||
lstFilteredPorts.Items.Add((int)(Global.FilteredPortList[i]));
|
||||
}
|
||||
|
||||
private void btnAddCustomPort_Click(object sender, EventArgs e)
|
||||
{
|
||||
int i = 0;
|
||||
if (txtPort.Text.Length > 0)
|
||||
{
|
||||
try
|
||||
{
|
||||
i = int.Parse(txtPort.Text);
|
||||
if (i > 0)
|
||||
lstFilteredPorts.Items.Add((int)i);
|
||||
}
|
||||
catch (FormatException)
|
||||
{
|
||||
MessageBox.Show("There was a problem with the port you attempted to add.",
|
||||
"Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void btnAddPort_Click(object sender, EventArgs e)
|
||||
{
|
||||
if(lstCommonPorts.SelectedItem != null)
|
||||
lstFilteredPorts.Items.Add(int.Parse((string)lstCommonPorts.SelectedItem));
|
||||
}
|
||||
|
||||
private void btnRemovePort_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (lstFilteredPorts.SelectedItem != null)
|
||||
lstFilteredPorts.Items.RemoveAt(lstFilteredPorts.SelectedIndex);
|
||||
}
|
||||
|
||||
private void cmdCancel_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.Close();
|
||||
}
|
||||
|
||||
private void btnRemoveAll_Click(object sender, EventArgs e)
|
||||
{
|
||||
lstFilteredPorts.Items.Clear();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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>
|
|
@ -0,0 +1,425 @@
|
|||
namespace ProjectCarbon
|
||||
{
|
||||
partial class frmCaptureSettings
|
||||
{
|
||||
/// <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.btnApply = new System.Windows.Forms.Button();
|
||||
this.btnCancel = new System.Windows.Forms.Button();
|
||||
this.tabControl1 = new System.Windows.Forms.TabControl();
|
||||
this.tabCaptureSettings = new System.Windows.Forms.TabPage();
|
||||
this.grpStartupOptions = new System.Windows.Forms.GroupBox();
|
||||
this.chkStartCaptureAtStartup = new System.Windows.Forms.CheckBox();
|
||||
this.chkStartMinimized = new System.Windows.Forms.CheckBox();
|
||||
this.chkStartWithWindows = new System.Windows.Forms.CheckBox();
|
||||
this.tabUISettings = new System.Windows.Forms.TabPage();
|
||||
this.grpOther = new System.Windows.Forms.GroupBox();
|
||||
this.chkAutoScrollPacketList = new System.Windows.Forms.CheckBox();
|
||||
this.grpVisibleInterfaceElements = new System.Windows.Forms.GroupBox();
|
||||
this.chkHeaderInfoVisible = new System.Windows.Forms.CheckBox();
|
||||
this.chkPacketListVisible = new System.Windows.Forms.CheckBox();
|
||||
this.chkPacketDisplayVisible = new System.Windows.Forms.CheckBox();
|
||||
this.chkStatusBarVisible = new System.Windows.Forms.CheckBox();
|
||||
this.chkToolbarVisible = new System.Windows.Forms.CheckBox();
|
||||
this.grpInterfaceAppearance = new System.Windows.Forms.GroupBox();
|
||||
this.btnPacketListFont = new System.Windows.Forms.Button();
|
||||
this.picPacketDisplayBackground = new System.Windows.Forms.PictureBox();
|
||||
this.label4 = new System.Windows.Forms.Label();
|
||||
this.picPacketDisplayFontColor = new System.Windows.Forms.PictureBox();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.picPacketListTextColor = new System.Windows.Forms.PictureBox();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.picPacketListBackgroundColor = new System.Windows.Forms.PictureBox();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.tabControl1.SuspendLayout();
|
||||
this.tabCaptureSettings.SuspendLayout();
|
||||
this.grpStartupOptions.SuspendLayout();
|
||||
this.tabUISettings.SuspendLayout();
|
||||
this.grpOther.SuspendLayout();
|
||||
this.grpVisibleInterfaceElements.SuspendLayout();
|
||||
this.grpInterfaceAppearance.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.picPacketDisplayBackground)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.picPacketDisplayFontColor)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.picPacketListTextColor)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.picPacketListBackgroundColor)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// btnApply
|
||||
//
|
||||
this.btnApply.Location = new System.Drawing.Point(336, 280);
|
||||
this.btnApply.Name = "btnApply";
|
||||
this.btnApply.Size = new System.Drawing.Size(80, 24);
|
||||
this.btnApply.TabIndex = 1;
|
||||
this.btnApply.Text = "Apply";
|
||||
this.btnApply.UseVisualStyleBackColor = true;
|
||||
this.btnApply.Click += new System.EventHandler(this.btnApply_Click);
|
||||
//
|
||||
// btnCancel
|
||||
//
|
||||
this.btnCancel.Location = new System.Drawing.Point(248, 280);
|
||||
this.btnCancel.Name = "btnCancel";
|
||||
this.btnCancel.Size = new System.Drawing.Size(80, 24);
|
||||
this.btnCancel.TabIndex = 2;
|
||||
this.btnCancel.Text = "Cancel";
|
||||
this.btnCancel.UseVisualStyleBackColor = true;
|
||||
this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
|
||||
//
|
||||
// tabControl1
|
||||
//
|
||||
this.tabControl1.Controls.Add(this.tabCaptureSettings);
|
||||
this.tabControl1.Controls.Add(this.tabUISettings);
|
||||
this.tabControl1.Location = new System.Drawing.Point(8, 8);
|
||||
this.tabControl1.Name = "tabControl1";
|
||||
this.tabControl1.SelectedIndex = 0;
|
||||
this.tabControl1.Size = new System.Drawing.Size(408, 264);
|
||||
this.tabControl1.TabIndex = 5;
|
||||
//
|
||||
// tabCaptureSettings
|
||||
//
|
||||
this.tabCaptureSettings.Controls.Add(this.grpStartupOptions);
|
||||
this.tabCaptureSettings.Location = new System.Drawing.Point(4, 22);
|
||||
this.tabCaptureSettings.Name = "tabCaptureSettings";
|
||||
this.tabCaptureSettings.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.tabCaptureSettings.Size = new System.Drawing.Size(400, 238);
|
||||
this.tabCaptureSettings.TabIndex = 0;
|
||||
this.tabCaptureSettings.Text = "Capture Settings";
|
||||
this.tabCaptureSettings.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// grpStartupOptions
|
||||
//
|
||||
this.grpStartupOptions.Controls.Add(this.chkStartCaptureAtStartup);
|
||||
this.grpStartupOptions.Controls.Add(this.chkStartMinimized);
|
||||
this.grpStartupOptions.Controls.Add(this.chkStartWithWindows);
|
||||
this.grpStartupOptions.Location = new System.Drawing.Point(8, 8);
|
||||
this.grpStartupOptions.Name = "grpStartupOptions";
|
||||
this.grpStartupOptions.Size = new System.Drawing.Size(384, 72);
|
||||
this.grpStartupOptions.TabIndex = 5;
|
||||
this.grpStartupOptions.TabStop = false;
|
||||
this.grpStartupOptions.Text = "Startup Options";
|
||||
//
|
||||
// chkStartCaptureAtStartup
|
||||
//
|
||||
this.chkStartCaptureAtStartup.AutoSize = true;
|
||||
this.chkStartCaptureAtStartup.Location = new System.Drawing.Point(8, 48);
|
||||
this.chkStartCaptureAtStartup.Name = "chkStartCaptureAtStartup";
|
||||
this.chkStartCaptureAtStartup.Size = new System.Drawing.Size(196, 17);
|
||||
this.chkStartCaptureAtStartup.TabIndex = 2;
|
||||
this.chkStartCaptureAtStartup.Text = "Start capturing packets at start up.";
|
||||
this.chkStartCaptureAtStartup.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// chkStartMinimized
|
||||
//
|
||||
this.chkStartMinimized.AutoSize = true;
|
||||
this.chkStartMinimized.Location = new System.Drawing.Point(8, 32);
|
||||
this.chkStartMinimized.Name = "chkStartMinimized";
|
||||
this.chkStartMinimized.Size = new System.Drawing.Size(168, 17);
|
||||
this.chkStartMinimized.TabIndex = 1;
|
||||
this.chkStartMinimized.Text = "Start up minimized to the tray";
|
||||
this.chkStartMinimized.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// chkStartWithWindows
|
||||
//
|
||||
this.chkStartWithWindows.AutoSize = true;
|
||||
this.chkStartWithWindows.Location = new System.Drawing.Point(8, 16);
|
||||
this.chkStartWithWindows.Name = "chkStartWithWindows";
|
||||
this.chkStartWithWindows.Size = new System.Drawing.Size(121, 17);
|
||||
this.chkStartWithWindows.TabIndex = 0;
|
||||
this.chkStartWithWindows.Text = "Start With Windows";
|
||||
this.chkStartWithWindows.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// tabUISettings
|
||||
//
|
||||
this.tabUISettings.Controls.Add(this.grpOther);
|
||||
this.tabUISettings.Controls.Add(this.grpVisibleInterfaceElements);
|
||||
this.tabUISettings.Controls.Add(this.grpInterfaceAppearance);
|
||||
this.tabUISettings.Location = new System.Drawing.Point(4, 22);
|
||||
this.tabUISettings.Name = "tabUISettings";
|
||||
this.tabUISettings.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.tabUISettings.Size = new System.Drawing.Size(400, 238);
|
||||
this.tabUISettings.TabIndex = 1;
|
||||
this.tabUISettings.Text = "UI Settings";
|
||||
this.tabUISettings.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// grpOther
|
||||
//
|
||||
this.grpOther.Controls.Add(this.chkAutoScrollPacketList);
|
||||
this.grpOther.Location = new System.Drawing.Point(8, 184);
|
||||
this.grpOther.Name = "grpOther";
|
||||
this.grpOther.Size = new System.Drawing.Size(384, 40);
|
||||
this.grpOther.TabIndex = 16;
|
||||
this.grpOther.TabStop = false;
|
||||
this.grpOther.Text = "Other";
|
||||
//
|
||||
// chkAutoScrollPacketList
|
||||
//
|
||||
this.chkAutoScrollPacketList.AutoSize = true;
|
||||
this.chkAutoScrollPacketList.Location = new System.Drawing.Point(8, 17);
|
||||
this.chkAutoScrollPacketList.Name = "chkAutoScrollPacketList";
|
||||
this.chkAutoScrollPacketList.Size = new System.Drawing.Size(131, 17);
|
||||
this.chkAutoScrollPacketList.TabIndex = 0;
|
||||
this.chkAutoScrollPacketList.Text = "Auto-scroll Packet List";
|
||||
this.chkAutoScrollPacketList.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// grpVisibleInterfaceElements
|
||||
//
|
||||
this.grpVisibleInterfaceElements.Controls.Add(this.chkHeaderInfoVisible);
|
||||
this.grpVisibleInterfaceElements.Controls.Add(this.chkPacketListVisible);
|
||||
this.grpVisibleInterfaceElements.Controls.Add(this.chkPacketDisplayVisible);
|
||||
this.grpVisibleInterfaceElements.Controls.Add(this.chkStatusBarVisible);
|
||||
this.grpVisibleInterfaceElements.Controls.Add(this.chkToolbarVisible);
|
||||
this.grpVisibleInterfaceElements.Location = new System.Drawing.Point(8, 8);
|
||||
this.grpVisibleInterfaceElements.Name = "grpVisibleInterfaceElements";
|
||||
this.grpVisibleInterfaceElements.Size = new System.Drawing.Size(120, 168);
|
||||
this.grpVisibleInterfaceElements.TabIndex = 15;
|
||||
this.grpVisibleInterfaceElements.TabStop = false;
|
||||
this.grpVisibleInterfaceElements.Text = "Visible Elements";
|
||||
//
|
||||
// chkHeaderInfoVisible
|
||||
//
|
||||
this.chkHeaderInfoVisible.AutoSize = true;
|
||||
this.chkHeaderInfoVisible.Location = new System.Drawing.Point(16, 120);
|
||||
this.chkHeaderInfoVisible.Name = "chkHeaderInfoVisible";
|
||||
this.chkHeaderInfoVisible.Size = new System.Drawing.Size(84, 17);
|
||||
this.chkHeaderInfoVisible.TabIndex = 9;
|
||||
this.chkHeaderInfoVisible.Text = "Header Info";
|
||||
this.chkHeaderInfoVisible.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// chkPacketListVisible
|
||||
//
|
||||
this.chkPacketListVisible.AutoSize = true;
|
||||
this.chkPacketListVisible.Location = new System.Drawing.Point(16, 72);
|
||||
this.chkPacketListVisible.Name = "chkPacketListVisible";
|
||||
this.chkPacketListVisible.Size = new System.Drawing.Size(77, 17);
|
||||
this.chkPacketListVisible.TabIndex = 8;
|
||||
this.chkPacketListVisible.Text = "Packet List";
|
||||
this.chkPacketListVisible.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// chkPacketDisplayVisible
|
||||
//
|
||||
this.chkPacketDisplayVisible.AutoSize = true;
|
||||
this.chkPacketDisplayVisible.Location = new System.Drawing.Point(16, 96);
|
||||
this.chkPacketDisplayVisible.Name = "chkPacketDisplayVisible";
|
||||
this.chkPacketDisplayVisible.Size = new System.Drawing.Size(95, 17);
|
||||
this.chkPacketDisplayVisible.TabIndex = 7;
|
||||
this.chkPacketDisplayVisible.Text = "Packet Display";
|
||||
this.chkPacketDisplayVisible.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// chkStatusBarVisible
|
||||
//
|
||||
this.chkStatusBarVisible.AutoSize = true;
|
||||
this.chkStatusBarVisible.Location = new System.Drawing.Point(16, 48);
|
||||
this.chkStatusBarVisible.Name = "chkStatusBarVisible";
|
||||
this.chkStatusBarVisible.Size = new System.Drawing.Size(76, 17);
|
||||
this.chkStatusBarVisible.TabIndex = 6;
|
||||
this.chkStatusBarVisible.Text = "Status Bar";
|
||||
this.chkStatusBarVisible.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// chkToolbarVisible
|
||||
//
|
||||
this.chkToolbarVisible.AutoSize = true;
|
||||
this.chkToolbarVisible.Location = new System.Drawing.Point(16, 24);
|
||||
this.chkToolbarVisible.Name = "chkToolbarVisible";
|
||||
this.chkToolbarVisible.Size = new System.Drawing.Size(62, 17);
|
||||
this.chkToolbarVisible.TabIndex = 5;
|
||||
this.chkToolbarVisible.Text = "Toolbar";
|
||||
this.chkToolbarVisible.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// grpInterfaceAppearance
|
||||
//
|
||||
this.grpInterfaceAppearance.Controls.Add(this.btnPacketListFont);
|
||||
this.grpInterfaceAppearance.Controls.Add(this.picPacketDisplayBackground);
|
||||
this.grpInterfaceAppearance.Controls.Add(this.label4);
|
||||
this.grpInterfaceAppearance.Controls.Add(this.picPacketDisplayFontColor);
|
||||
this.grpInterfaceAppearance.Controls.Add(this.label3);
|
||||
this.grpInterfaceAppearance.Controls.Add(this.picPacketListTextColor);
|
||||
this.grpInterfaceAppearance.Controls.Add(this.label2);
|
||||
this.grpInterfaceAppearance.Controls.Add(this.picPacketListBackgroundColor);
|
||||
this.grpInterfaceAppearance.Controls.Add(this.label1);
|
||||
this.grpInterfaceAppearance.Location = new System.Drawing.Point(136, 8);
|
||||
this.grpInterfaceAppearance.Name = "grpInterfaceAppearance";
|
||||
this.grpInterfaceAppearance.Size = new System.Drawing.Size(256, 168);
|
||||
this.grpInterfaceAppearance.TabIndex = 14;
|
||||
this.grpInterfaceAppearance.TabStop = false;
|
||||
this.grpInterfaceAppearance.Text = "Interface Appearance";
|
||||
//
|
||||
// btnPacketListFont
|
||||
//
|
||||
this.btnPacketListFont.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.btnPacketListFont.Location = new System.Drawing.Point(16, 96);
|
||||
this.btnPacketListFont.Name = "btnPacketListFont";
|
||||
this.btnPacketListFont.Size = new System.Drawing.Size(224, 32);
|
||||
this.btnPacketListFont.TabIndex = 22;
|
||||
this.btnPacketListFont.Text = "Packet Display Font";
|
||||
this.btnPacketListFont.UseVisualStyleBackColor = true;
|
||||
this.btnPacketListFont.Click += new System.EventHandler(this.btnPacketListFont_Click);
|
||||
//
|
||||
// picPacketDisplayBackground
|
||||
//
|
||||
this.picPacketDisplayBackground.BackColor = System.Drawing.Color.Red;
|
||||
this.picPacketDisplayBackground.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
|
||||
this.picPacketDisplayBackground.Location = new System.Drawing.Point(16, 136);
|
||||
this.picPacketDisplayBackground.Name = "picPacketDisplayBackground";
|
||||
this.picPacketDisplayBackground.Size = new System.Drawing.Size(24, 16);
|
||||
this.picPacketDisplayBackground.TabIndex = 21;
|
||||
this.picPacketDisplayBackground.TabStop = false;
|
||||
this.picPacketDisplayBackground.Click += new System.EventHandler(this.picPacketDisplayBackground_Click);
|
||||
//
|
||||
// label4
|
||||
//
|
||||
this.label4.AutoSize = true;
|
||||
this.label4.Location = new System.Drawing.Point(40, 136);
|
||||
this.label4.Name = "label4";
|
||||
this.label4.Size = new System.Drawing.Size(135, 13);
|
||||
this.label4.TabIndex = 20;
|
||||
this.label4.Text = "Packet Display Background";
|
||||
//
|
||||
// picPacketDisplayFontColor
|
||||
//
|
||||
this.picPacketDisplayFontColor.BackColor = System.Drawing.Color.Red;
|
||||
this.picPacketDisplayFontColor.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
|
||||
this.picPacketDisplayFontColor.Location = new System.Drawing.Point(16, 72);
|
||||
this.picPacketDisplayFontColor.Name = "picPacketDisplayFontColor";
|
||||
this.picPacketDisplayFontColor.Size = new System.Drawing.Size(24, 16);
|
||||
this.picPacketDisplayFontColor.TabIndex = 19;
|
||||
this.picPacketDisplayFontColor.TabStop = false;
|
||||
this.picPacketDisplayFontColor.Click += new System.EventHandler(this.picPacketDisplayFontColor_Click);
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.Location = new System.Drawing.Point(40, 72);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(129, 13);
|
||||
this.label3.TabIndex = 18;
|
||||
this.label3.Text = "Packet Display Font Color";
|
||||
//
|
||||
// picPacketListTextColor
|
||||
//
|
||||
this.picPacketListTextColor.BackColor = System.Drawing.Color.Red;
|
||||
this.picPacketListTextColor.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
|
||||
this.picPacketListTextColor.Location = new System.Drawing.Point(16, 48);
|
||||
this.picPacketListTextColor.Name = "picPacketListTextColor";
|
||||
this.picPacketListTextColor.Size = new System.Drawing.Size(24, 16);
|
||||
this.picPacketListTextColor.TabIndex = 17;
|
||||
this.picPacketListTextColor.TabStop = false;
|
||||
this.picPacketListTextColor.Click += new System.EventHandler(this.picPacketListTextColor_Click);
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(40, 48);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(111, 13);
|
||||
this.label2.TabIndex = 16;
|
||||
this.label2.Text = "Packet List Text Color";
|
||||
//
|
||||
// picPacketListBackgroundColor
|
||||
//
|
||||
this.picPacketListBackgroundColor.BackColor = System.Drawing.Color.Red;
|
||||
this.picPacketListBackgroundColor.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
|
||||
this.picPacketListBackgroundColor.Location = new System.Drawing.Point(16, 24);
|
||||
this.picPacketListBackgroundColor.Name = "picPacketListBackgroundColor";
|
||||
this.picPacketListBackgroundColor.Size = new System.Drawing.Size(24, 16);
|
||||
this.picPacketListBackgroundColor.TabIndex = 15;
|
||||
this.picPacketListBackgroundColor.TabStop = false;
|
||||
this.picPacketListBackgroundColor.Click += new System.EventHandler(this.picPacketListBackgroundColor_Click);
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(40, 24);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(145, 13);
|
||||
this.label1.TabIndex = 14;
|
||||
this.label1.Text = "Packet List Background Color";
|
||||
//
|
||||
// frmCaptureSettings
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(422, 311);
|
||||
this.Controls.Add(this.tabControl1);
|
||||
this.Controls.Add(this.btnCancel);
|
||||
this.Controls.Add(this.btnApply);
|
||||
this.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "frmCaptureSettings";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "Capture Settings";
|
||||
this.Load += new System.EventHandler(this.CaptureSettings_Load);
|
||||
this.tabControl1.ResumeLayout(false);
|
||||
this.tabCaptureSettings.ResumeLayout(false);
|
||||
this.grpStartupOptions.ResumeLayout(false);
|
||||
this.grpStartupOptions.PerformLayout();
|
||||
this.tabUISettings.ResumeLayout(false);
|
||||
this.grpOther.ResumeLayout(false);
|
||||
this.grpOther.PerformLayout();
|
||||
this.grpVisibleInterfaceElements.ResumeLayout(false);
|
||||
this.grpVisibleInterfaceElements.PerformLayout();
|
||||
this.grpInterfaceAppearance.ResumeLayout(false);
|
||||
this.grpInterfaceAppearance.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.picPacketDisplayBackground)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.picPacketDisplayFontColor)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.picPacketListTextColor)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.picPacketListBackgroundColor)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Button btnApply;
|
||||
private System.Windows.Forms.Button btnCancel;
|
||||
private System.Windows.Forms.TabControl tabControl1;
|
||||
private System.Windows.Forms.TabPage tabCaptureSettings;
|
||||
private System.Windows.Forms.GroupBox grpStartupOptions;
|
||||
private System.Windows.Forms.CheckBox chkStartCaptureAtStartup;
|
||||
private System.Windows.Forms.CheckBox chkStartMinimized;
|
||||
private System.Windows.Forms.CheckBox chkStartWithWindows;
|
||||
private System.Windows.Forms.TabPage tabUISettings;
|
||||
private System.Windows.Forms.GroupBox grpOther;
|
||||
private System.Windows.Forms.CheckBox chkAutoScrollPacketList;
|
||||
private System.Windows.Forms.GroupBox grpVisibleInterfaceElements;
|
||||
private System.Windows.Forms.CheckBox chkPacketListVisible;
|
||||
private System.Windows.Forms.CheckBox chkPacketDisplayVisible;
|
||||
private System.Windows.Forms.CheckBox chkStatusBarVisible;
|
||||
private System.Windows.Forms.CheckBox chkToolbarVisible;
|
||||
private System.Windows.Forms.GroupBox grpInterfaceAppearance;
|
||||
private System.Windows.Forms.Button btnPacketListFont;
|
||||
private System.Windows.Forms.PictureBox picPacketDisplayBackground;
|
||||
private System.Windows.Forms.Label label4;
|
||||
private System.Windows.Forms.PictureBox picPacketDisplayFontColor;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.PictureBox picPacketListTextColor;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.PictureBox picPacketListBackgroundColor;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.CheckBox chkHeaderInfoVisible;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,128 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace ProjectCarbon
|
||||
{
|
||||
public partial class frmCaptureSettings : Form
|
||||
{
|
||||
public frmCaptureSettings()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void CaptureSettings_Load(object sender, EventArgs e)
|
||||
{
|
||||
chkStartCaptureAtStartup.Checked =
|
||||
ProjectCarbon.Properties.Settings.Default.StartUpCapture;
|
||||
|
||||
chkStartMinimized.Checked =
|
||||
ProjectCarbon.Properties.Settings.Default.StartUpMinimized;
|
||||
|
||||
chkStartWithWindows.Checked =
|
||||
ProjectCarbon.Properties.Settings.Default.StartUpWindows;
|
||||
|
||||
picPacketDisplayBackground.BackColor =
|
||||
ProjectCarbon.Properties.Settings.Default.PacketDisplayBackgroundColor;
|
||||
|
||||
picPacketDisplayFontColor.BackColor =
|
||||
ProjectCarbon.Properties.Settings.Default.PacketDisplayFontColor;
|
||||
|
||||
picPacketListBackgroundColor.BackColor =
|
||||
ProjectCarbon.Properties.Settings.Default.PacketListBackgroundColor;
|
||||
|
||||
picPacketListTextColor.BackColor =
|
||||
ProjectCarbon.Properties.Settings.Default.PacketListTextColor;
|
||||
|
||||
btnPacketListFont.Font =
|
||||
ProjectCarbon.Properties.Settings.Default.PacketDisplayFontFace;
|
||||
|
||||
chkAutoScrollPacketList.Checked =
|
||||
ProjectCarbon.Properties.Settings.Default.AutoScrollPacketList;
|
||||
|
||||
}
|
||||
|
||||
private void btnApply_Click(object sender, EventArgs e)
|
||||
{
|
||||
ProjectCarbon.Properties.Settings.Default.StartUpCapture =
|
||||
chkStartCaptureAtStartup.Checked;
|
||||
|
||||
ProjectCarbon.Properties.Settings.Default.StartUpMinimized =
|
||||
chkStartMinimized.Checked;
|
||||
|
||||
ProjectCarbon.Properties.Settings.Default.StartUpWindows =
|
||||
chkStartWithWindows.Checked;
|
||||
|
||||
ProjectCarbon.Properties.Settings.Default.PacketDisplayBackgroundColor =
|
||||
picPacketDisplayBackground.BackColor;
|
||||
|
||||
ProjectCarbon.Properties.Settings.Default.PacketDisplayFontColor =
|
||||
picPacketDisplayFontColor.BackColor;
|
||||
|
||||
ProjectCarbon.Properties.Settings.Default.PacketDisplayFontFace =
|
||||
btnPacketListFont.Font;
|
||||
|
||||
ProjectCarbon.Properties.Settings.Default.PacketListBackgroundColor =
|
||||
picPacketListBackgroundColor.BackColor;
|
||||
|
||||
ProjectCarbon.Properties.Settings.Default.PacketListTextColor =
|
||||
picPacketListTextColor.BackColor;
|
||||
|
||||
ProjectCarbon.Properties.Settings.Default.AutoScrollPacketList =
|
||||
chkAutoScrollPacketList.Checked;
|
||||
|
||||
ProjectCarbon.Properties.Settings.Default.Save();
|
||||
|
||||
this.Close();
|
||||
}
|
||||
|
||||
private void picPacketListBackgroundColor_Click(object sender, EventArgs e)
|
||||
{
|
||||
ColorDialog colorDlg = new ColorDialog();
|
||||
if (colorDlg.ShowDialog() != DialogResult.Cancel)
|
||||
picPacketListBackgroundColor.BackColor = colorDlg.Color;
|
||||
}
|
||||
|
||||
private void picPacketListTextColor_Click(object sender, EventArgs e)
|
||||
{
|
||||
ColorDialog colorDlg = new ColorDialog();
|
||||
if (colorDlg.ShowDialog() != DialogResult.Cancel)
|
||||
picPacketListTextColor.BackColor = colorDlg.Color;
|
||||
}
|
||||
|
||||
private void picPacketDisplayFontColor_Click(object sender, EventArgs e)
|
||||
{
|
||||
ColorDialog colorDlg = new ColorDialog();
|
||||
if (colorDlg.ShowDialog() != DialogResult.Cancel)
|
||||
picPacketDisplayFontColor.BackColor = colorDlg.Color;
|
||||
}
|
||||
|
||||
private void picPacketDisplayBackground_Click(object sender, EventArgs e)
|
||||
{
|
||||
ColorDialog colorDlg = new ColorDialog();
|
||||
if (colorDlg.ShowDialog() != DialogResult.Cancel)
|
||||
picPacketDisplayBackground.BackColor = colorDlg.Color;
|
||||
}
|
||||
|
||||
private void btnPacketListFont_Click(object sender, EventArgs e)
|
||||
{
|
||||
FontDialog fontDialog = new FontDialog();
|
||||
fontDialog.Font = btnPacketListFont.Font;
|
||||
fontDialog.AllowVectorFonts = false;
|
||||
fontDialog.FontMustExist = true;
|
||||
fontDialog.ShowEffects = true;
|
||||
fontDialog.AllowVerticalFonts = false;
|
||||
if (fontDialog.ShowDialog() != DialogResult.Cancel)
|
||||
btnPacketListFont.Font = fontDialog.Font;
|
||||
}
|
||||
|
||||
private void btnCancel_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.Close();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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>
|
|
@ -0,0 +1,109 @@
|
|||
namespace ProjectCarbon
|
||||
{
|
||||
partial class frmDnsLookup
|
||||
{
|
||||
/// <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.lblHostname = new System.Windows.Forms.Label();
|
||||
this.txtHostname = new System.Windows.Forms.TextBox();
|
||||
this.btnLookup = new System.Windows.Forms.Button();
|
||||
this.lstResults = new System.Windows.Forms.ListBox();
|
||||
this.lblResults = new System.Windows.Forms.Label();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// lblHostname
|
||||
//
|
||||
this.lblHostname.AutoSize = true;
|
||||
this.lblHostname.Location = new System.Drawing.Point(8, 8);
|
||||
this.lblHostname.Name = "lblHostname";
|
||||
this.lblHostname.Size = new System.Drawing.Size(58, 13);
|
||||
this.lblHostname.TabIndex = 0;
|
||||
this.lblHostname.Text = "Hostname:";
|
||||
//
|
||||
// txtHostname
|
||||
//
|
||||
this.txtHostname.Location = new System.Drawing.Point(8, 24);
|
||||
this.txtHostname.Name = "txtHostname";
|
||||
this.txtHostname.Size = new System.Drawing.Size(304, 20);
|
||||
this.txtHostname.TabIndex = 1;
|
||||
//
|
||||
// btnLookup
|
||||
//
|
||||
this.btnLookup.Location = new System.Drawing.Point(240, 56);
|
||||
this.btnLookup.Name = "btnLookup";
|
||||
this.btnLookup.Size = new System.Drawing.Size(72, 24);
|
||||
this.btnLookup.TabIndex = 2;
|
||||
this.btnLookup.Text = "Lookup";
|
||||
this.btnLookup.UseVisualStyleBackColor = true;
|
||||
this.btnLookup.Click += new System.EventHandler(this.btnLookup_Click);
|
||||
//
|
||||
// lstResults
|
||||
//
|
||||
this.lstResults.FormattingEnabled = true;
|
||||
this.lstResults.Location = new System.Drawing.Point(8, 88);
|
||||
this.lstResults.Name = "lstResults";
|
||||
this.lstResults.Size = new System.Drawing.Size(304, 160);
|
||||
this.lstResults.TabIndex = 3;
|
||||
//
|
||||
// lblResults
|
||||
//
|
||||
this.lblResults.AutoSize = true;
|
||||
this.lblResults.Location = new System.Drawing.Point(8, 72);
|
||||
this.lblResults.Name = "lblResults";
|
||||
this.lblResults.Size = new System.Drawing.Size(45, 13);
|
||||
this.lblResults.TabIndex = 4;
|
||||
this.lblResults.Text = "Results:";
|
||||
//
|
||||
// frmDnsLookup
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(322, 256);
|
||||
this.Controls.Add(this.lblResults);
|
||||
this.Controls.Add(this.lstResults);
|
||||
this.Controls.Add(this.btnLookup);
|
||||
this.Controls.Add(this.txtHostname);
|
||||
this.Controls.Add(this.lblHostname);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "frmDnsLookup";
|
||||
this.Text = "DNS Lookup";
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Label lblHostname;
|
||||
private System.Windows.Forms.TextBox txtHostname;
|
||||
private System.Windows.Forms.Button btnLookup;
|
||||
private System.Windows.Forms.ListBox lstResults;
|
||||
private System.Windows.Forms.Label lblResults;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,46 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using System.Net;
|
||||
|
||||
namespace ProjectCarbon
|
||||
{
|
||||
public partial class frmDnsLookup : Form
|
||||
{
|
||||
public frmDnsLookup()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void btnLookup_Click(object sender, EventArgs e)
|
||||
{
|
||||
char[] alpha = "aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ-".ToCharArray();
|
||||
try
|
||||
{
|
||||
IPHostEntry ipHostEntry = Dns.GetHostEntry(txtHostname.Text);
|
||||
lstResults.Items.Clear();
|
||||
if (txtHostname.Text.IndexOfAny(alpha) != -1)
|
||||
{
|
||||
foreach (IPAddress ip in ipHostEntry.AddressList)
|
||||
lstResults.Items.Add(ip.ToString());
|
||||
}
|
||||
else
|
||||
{
|
||||
lstResults.Items.Add(ipHostEntry.HostName);
|
||||
}
|
||||
}
|
||||
catch (System.Net.Sockets.SocketException se)
|
||||
{
|
||||
MessageBox.Show(se.Message);
|
||||
}
|
||||
catch (ArgumentException ae)
|
||||
{
|
||||
MessageBox.Show(ae.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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>
|
|
@ -0,0 +1,823 @@
|
|||
namespace ProjectCarbon
|
||||
{
|
||||
partial class frmMain
|
||||
{
|
||||
/// <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(frmMain));
|
||||
this.menuStrip1 = new System.Windows.Forms.MenuStrip();
|
||||
this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.mnuOpenCaptureFile = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.mnuOpenAndAppend = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripMenuItem2 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.mnuSaveCaptureFile = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.savePacketDumpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.mnuExit = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.mnuCapture = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.mnuStartCapture = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.mnuStopCapture = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.mnuClearCapturedPackets = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripMenuItem3 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.mnuSettings = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.mnuFilters = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.mnuTools = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.mnuDisplayWinsockInfo = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.mnuDnsLookup = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.helpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.mnuVisitWebsite = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripMenuItem4 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.mnuAbout = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.tsMainToolbar = new System.Windows.Forms.ToolStrip();
|
||||
this.btnLoadCaptureFile = new System.Windows.Forms.ToolStripButton();
|
||||
this.btnSaveCaptureFile = new System.Windows.Forms.ToolStripButton();
|
||||
this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.tslInterface = new System.Windows.Forms.ToolStripLabel();
|
||||
this.tscbInterface = new System.Windows.Forms.ToolStripComboBox();
|
||||
this.btnStartCapture = new System.Windows.Forms.ToolStripButton();
|
||||
this.btnStopCapture = new System.Windows.Forms.ToolStripButton();
|
||||
this.btnClearCaptureLog = new System.Windows.Forms.ToolStripButton();
|
||||
this.btnCaptureSettings = new System.Windows.Forms.ToolStripButton();
|
||||
this.btnCaptureFilters = new System.Windows.Forms.ToolStripButton();
|
||||
this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.btnShowHelp = new System.Windows.Forms.ToolStripButton();
|
||||
this.statusStrip1 = new System.Windows.Forms.StatusStrip();
|
||||
this.spynetStatusPanel = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
this.packetsInBufferStatus = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
|
||||
this.packetCaptureList = new System.Windows.Forms.ListView();
|
||||
this.columnHeader1 = new System.Windows.Forms.ColumnHeader();
|
||||
this.columnHeader2 = new System.Windows.Forms.ColumnHeader();
|
||||
this.columnHeader3 = new System.Windows.Forms.ColumnHeader();
|
||||
this.columnHeader4 = new System.Windows.Forms.ColumnHeader();
|
||||
this.columnHeader5 = new System.Windows.Forms.ColumnHeader();
|
||||
this.columnHeader6 = new System.Windows.Forms.ColumnHeader();
|
||||
this.columnHeader7 = new System.Windows.Forms.ColumnHeader();
|
||||
this.columnHeader8 = new System.Windows.Forms.ColumnHeader();
|
||||
this.columnHeader9 = new System.Windows.Forms.ColumnHeader();
|
||||
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
|
||||
this.tvwPacketHeaderInfo = new System.Windows.Forms.TreeView();
|
||||
this.rtbDisplay = new System.Windows.Forms.RichTextBox();
|
||||
this.panel1 = new System.Windows.Forms.Panel();
|
||||
this.lblDisplayMode = new System.Windows.Forms.Label();
|
||||
this.chkStripHeaders = new System.Windows.Forms.CheckBox();
|
||||
this.cboDisplayMode = new System.Windows.Forms.ComboBox();
|
||||
this.niTrayIcon = new System.Windows.Forms.NotifyIcon(this.components);
|
||||
this.cmsTrayMenu = new System.Windows.Forms.ContextMenuStrip(this.components);
|
||||
this.mnuTrayStartCapture = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.mnuTrayStopCapture = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripMenuItem8 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.mnuTraySettings = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.mnuTrayFilters = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripMenuItem5 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.lblPacketSize = new System.Windows.Forms.Label();
|
||||
this.menuStrip1.SuspendLayout();
|
||||
this.tsMainToolbar.SuspendLayout();
|
||||
this.statusStrip1.SuspendLayout();
|
||||
this.splitContainer1.Panel1.SuspendLayout();
|
||||
this.splitContainer1.Panel2.SuspendLayout();
|
||||
this.splitContainer1.SuspendLayout();
|
||||
this.splitContainer2.Panel1.SuspendLayout();
|
||||
this.splitContainer2.Panel2.SuspendLayout();
|
||||
this.splitContainer2.SuspendLayout();
|
||||
this.panel1.SuspendLayout();
|
||||
this.cmsTrayMenu.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// menuStrip1
|
||||
//
|
||||
this.menuStrip1.BackColor = System.Drawing.SystemColors.ButtonHighlight;
|
||||
this.menuStrip1.GripMargin = new System.Windows.Forms.Padding(0);
|
||||
this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.fileToolStripMenuItem,
|
||||
this.mnuCapture,
|
||||
this.mnuTools,
|
||||
this.helpToolStripMenuItem});
|
||||
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
|
||||
this.menuStrip1.Name = "menuStrip1";
|
||||
this.menuStrip1.Padding = new System.Windows.Forms.Padding(0);
|
||||
this.menuStrip1.Size = new System.Drawing.Size(929, 24);
|
||||
this.menuStrip1.TabIndex = 9;
|
||||
this.menuStrip1.Text = "menuStrip1";
|
||||
//
|
||||
// fileToolStripMenuItem
|
||||
//
|
||||
this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.mnuOpenCaptureFile,
|
||||
this.mnuOpenAndAppend,
|
||||
this.toolStripMenuItem2,
|
||||
this.mnuSaveCaptureFile,
|
||||
this.savePacketDumpToolStripMenuItem,
|
||||
this.toolStripMenuItem1,
|
||||
this.mnuExit});
|
||||
this.fileToolStripMenuItem.Name = "fileToolStripMenuItem";
|
||||
this.fileToolStripMenuItem.Size = new System.Drawing.Size(35, 24);
|
||||
this.fileToolStripMenuItem.Text = "File";
|
||||
//
|
||||
// mnuOpenCaptureFile
|
||||
//
|
||||
this.mnuOpenCaptureFile.Image = ((System.Drawing.Image)(resources.GetObject("mnuOpenCaptureFile.Image")));
|
||||
this.mnuOpenCaptureFile.Name = "mnuOpenCaptureFile";
|
||||
this.mnuOpenCaptureFile.Size = new System.Drawing.Size(186, 22);
|
||||
this.mnuOpenCaptureFile.Text = "Open";
|
||||
this.mnuOpenCaptureFile.Click += new System.EventHandler(this.mnuOpenCaptureFile_Click);
|
||||
//
|
||||
// mnuOpenAndAppend
|
||||
//
|
||||
this.mnuOpenAndAppend.Name = "mnuOpenAndAppend";
|
||||
this.mnuOpenAndAppend.Size = new System.Drawing.Size(186, 22);
|
||||
this.mnuOpenAndAppend.Text = "Open && Append...";
|
||||
this.mnuOpenAndAppend.Click += new System.EventHandler(this.mnuOpenAndAppend_Click);
|
||||
//
|
||||
// toolStripMenuItem2
|
||||
//
|
||||
this.toolStripMenuItem2.Name = "toolStripMenuItem2";
|
||||
this.toolStripMenuItem2.Size = new System.Drawing.Size(183, 6);
|
||||
//
|
||||
// mnuSaveCaptureFile
|
||||
//
|
||||
this.mnuSaveCaptureFile.Image = ((System.Drawing.Image)(resources.GetObject("mnuSaveCaptureFile.Image")));
|
||||
this.mnuSaveCaptureFile.Name = "mnuSaveCaptureFile";
|
||||
this.mnuSaveCaptureFile.Size = new System.Drawing.Size(186, 22);
|
||||
this.mnuSaveCaptureFile.Text = "Save";
|
||||
this.mnuSaveCaptureFile.Click += new System.EventHandler(this.mnuSaveCaptureFile_Click);
|
||||
//
|
||||
// savePacketDumpToolStripMenuItem
|
||||
//
|
||||
this.savePacketDumpToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("savePacketDumpToolStripMenuItem.Image")));
|
||||
this.savePacketDumpToolStripMenuItem.ImageTransparentColor = System.Drawing.Color.Fuchsia;
|
||||
this.savePacketDumpToolStripMenuItem.Name = "savePacketDumpToolStripMenuItem";
|
||||
this.savePacketDumpToolStripMenuItem.Size = new System.Drawing.Size(186, 22);
|
||||
this.savePacketDumpToolStripMenuItem.Text = "Save Packet Dump...";
|
||||
this.savePacketDumpToolStripMenuItem.Click += new System.EventHandler(this.savePacketDumpToolStripMenuItem_Click);
|
||||
//
|
||||
// toolStripMenuItem1
|
||||
//
|
||||
this.toolStripMenuItem1.Name = "toolStripMenuItem1";
|
||||
this.toolStripMenuItem1.Size = new System.Drawing.Size(183, 6);
|
||||
//
|
||||
// mnuExit
|
||||
//
|
||||
this.mnuExit.Name = "mnuExit";
|
||||
this.mnuExit.Size = new System.Drawing.Size(186, 22);
|
||||
this.mnuExit.Text = "Exit";
|
||||
this.mnuExit.Click += new System.EventHandler(this.mnuExit_Click);
|
||||
//
|
||||
// mnuCapture
|
||||
//
|
||||
this.mnuCapture.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.mnuStartCapture,
|
||||
this.mnuStopCapture,
|
||||
this.mnuClearCapturedPackets,
|
||||
this.toolStripMenuItem3,
|
||||
this.mnuSettings,
|
||||
this.mnuFilters});
|
||||
this.mnuCapture.Name = "mnuCapture";
|
||||
this.mnuCapture.Size = new System.Drawing.Size(58, 24);
|
||||
this.mnuCapture.Text = "Capture";
|
||||
//
|
||||
// mnuStartCapture
|
||||
//
|
||||
this.mnuStartCapture.Image = ((System.Drawing.Image)(resources.GetObject("mnuStartCapture.Image")));
|
||||
this.mnuStartCapture.Name = "mnuStartCapture";
|
||||
this.mnuStartCapture.Size = new System.Drawing.Size(198, 22);
|
||||
this.mnuStartCapture.Text = "Start Capture";
|
||||
this.mnuStartCapture.Click += new System.EventHandler(this.mnuStartCapture_Click);
|
||||
//
|
||||
// mnuStopCapture
|
||||
//
|
||||
this.mnuStopCapture.Image = ((System.Drawing.Image)(resources.GetObject("mnuStopCapture.Image")));
|
||||
this.mnuStopCapture.Name = "mnuStopCapture";
|
||||
this.mnuStopCapture.Size = new System.Drawing.Size(198, 22);
|
||||
this.mnuStopCapture.Text = "Stop Capture";
|
||||
this.mnuStopCapture.Click += new System.EventHandler(this.mnuStopCapture_Click);
|
||||
//
|
||||
// mnuClearCapturedPackets
|
||||
//
|
||||
this.mnuClearCapturedPackets.Image = ((System.Drawing.Image)(resources.GetObject("mnuClearCapturedPackets.Image")));
|
||||
this.mnuClearCapturedPackets.Name = "mnuClearCapturedPackets";
|
||||
this.mnuClearCapturedPackets.Size = new System.Drawing.Size(198, 22);
|
||||
this.mnuClearCapturedPackets.Text = "Clear Captured Packets";
|
||||
this.mnuClearCapturedPackets.Click += new System.EventHandler(this.mnuClearCapturedPackets_Click);
|
||||
//
|
||||
// toolStripMenuItem3
|
||||
//
|
||||
this.toolStripMenuItem3.Name = "toolStripMenuItem3";
|
||||
this.toolStripMenuItem3.Size = new System.Drawing.Size(195, 6);
|
||||
//
|
||||
// mnuSettings
|
||||
//
|
||||
this.mnuSettings.Image = ((System.Drawing.Image)(resources.GetObject("mnuSettings.Image")));
|
||||
this.mnuSettings.Name = "mnuSettings";
|
||||
this.mnuSettings.Size = new System.Drawing.Size(198, 22);
|
||||
this.mnuSettings.Text = "Settings...";
|
||||
this.mnuSettings.Click += new System.EventHandler(this.mnuSettings_Click);
|
||||
//
|
||||
// mnuFilters
|
||||
//
|
||||
this.mnuFilters.Image = ((System.Drawing.Image)(resources.GetObject("mnuFilters.Image")));
|
||||
this.mnuFilters.Name = "mnuFilters";
|
||||
this.mnuFilters.Size = new System.Drawing.Size(198, 22);
|
||||
this.mnuFilters.Text = "Filters...";
|
||||
this.mnuFilters.Click += new System.EventHandler(this.mnuFilters_Click);
|
||||
//
|
||||
// mnuTools
|
||||
//
|
||||
this.mnuTools.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.mnuDisplayWinsockInfo,
|
||||
this.mnuDnsLookup});
|
||||
this.mnuTools.Name = "mnuTools";
|
||||
this.mnuTools.Size = new System.Drawing.Size(44, 24);
|
||||
this.mnuTools.Text = "Tools";
|
||||
//
|
||||
// mnuDisplayWinsockInfo
|
||||
//
|
||||
this.mnuDisplayWinsockInfo.Name = "mnuDisplayWinsockInfo";
|
||||
this.mnuDisplayWinsockInfo.Size = new System.Drawing.Size(232, 22);
|
||||
this.mnuDisplayWinsockInfo.Text = "Display Winsock Information...";
|
||||
this.mnuDisplayWinsockInfo.Click += new System.EventHandler(this.mnuDisplayWinsockInfo_Click);
|
||||
//
|
||||
// mnuDnsLookup
|
||||
//
|
||||
this.mnuDnsLookup.Name = "mnuDnsLookup";
|
||||
this.mnuDnsLookup.Size = new System.Drawing.Size(232, 22);
|
||||
this.mnuDnsLookup.Text = "DNS Lookup...";
|
||||
this.mnuDnsLookup.Click += new System.EventHandler(this.mnuDnsLookup_Click);
|
||||
//
|
||||
// helpToolStripMenuItem
|
||||
//
|
||||
this.helpToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.mnuVisitWebsite,
|
||||
this.toolStripMenuItem4,
|
||||
this.mnuAbout});
|
||||
this.helpToolStripMenuItem.Name = "helpToolStripMenuItem";
|
||||
this.helpToolStripMenuItem.Size = new System.Drawing.Size(40, 24);
|
||||
this.helpToolStripMenuItem.Text = "Help";
|
||||
//
|
||||
// mnuVisitWebsite
|
||||
//
|
||||
this.mnuVisitWebsite.Name = "mnuVisitWebsite";
|
||||
this.mnuVisitWebsite.Size = new System.Drawing.Size(202, 22);
|
||||
this.mnuVisitWebsite.Text = "Visit Xeon Productions...";
|
||||
this.mnuVisitWebsite.Click += new System.EventHandler(this.mnuVisitWebsite_Click);
|
||||
//
|
||||
// toolStripMenuItem4
|
||||
//
|
||||
this.toolStripMenuItem4.Name = "toolStripMenuItem4";
|
||||
this.toolStripMenuItem4.Size = new System.Drawing.Size(199, 6);
|
||||
//
|
||||
// mnuAbout
|
||||
//
|
||||
this.mnuAbout.Name = "mnuAbout";
|
||||
this.mnuAbout.Size = new System.Drawing.Size(202, 22);
|
||||
this.mnuAbout.Text = "About...";
|
||||
this.mnuAbout.Click += new System.EventHandler(this.mnuAbout_Click);
|
||||
//
|
||||
// tsMainToolbar
|
||||
//
|
||||
this.tsMainToolbar.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.btnLoadCaptureFile,
|
||||
this.btnSaveCaptureFile,
|
||||
this.toolStripSeparator2,
|
||||
this.tslInterface,
|
||||
this.tscbInterface,
|
||||
this.btnStartCapture,
|
||||
this.btnStopCapture,
|
||||
this.btnClearCaptureLog,
|
||||
this.btnCaptureSettings,
|
||||
this.btnCaptureFilters,
|
||||
this.toolStripSeparator4,
|
||||
this.btnShowHelp});
|
||||
this.tsMainToolbar.Location = new System.Drawing.Point(0, 24);
|
||||
this.tsMainToolbar.Name = "tsMainToolbar";
|
||||
this.tsMainToolbar.Size = new System.Drawing.Size(929, 25);
|
||||
this.tsMainToolbar.TabIndex = 10;
|
||||
//
|
||||
// btnLoadCaptureFile
|
||||
//
|
||||
this.btnLoadCaptureFile.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||||
this.btnLoadCaptureFile.Image = ((System.Drawing.Image)(resources.GetObject("btnLoadCaptureFile.Image")));
|
||||
this.btnLoadCaptureFile.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||
this.btnLoadCaptureFile.Name = "btnLoadCaptureFile";
|
||||
this.btnLoadCaptureFile.Size = new System.Drawing.Size(23, 22);
|
||||
this.btnLoadCaptureFile.Text = "Open";
|
||||
this.btnLoadCaptureFile.Click += new System.EventHandler(this.btnLoadCaptureFile_Click);
|
||||
//
|
||||
// btnSaveCaptureFile
|
||||
//
|
||||
this.btnSaveCaptureFile.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||||
this.btnSaveCaptureFile.Image = ((System.Drawing.Image)(resources.GetObject("btnSaveCaptureFile.Image")));
|
||||
this.btnSaveCaptureFile.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||
this.btnSaveCaptureFile.Name = "btnSaveCaptureFile";
|
||||
this.btnSaveCaptureFile.Size = new System.Drawing.Size(23, 22);
|
||||
this.btnSaveCaptureFile.Text = "Save";
|
||||
this.btnSaveCaptureFile.Click += new System.EventHandler(this.btnSaveCaptureFile_Click);
|
||||
//
|
||||
// toolStripSeparator2
|
||||
//
|
||||
this.toolStripSeparator2.Name = "toolStripSeparator2";
|
||||
this.toolStripSeparator2.Size = new System.Drawing.Size(6, 25);
|
||||
//
|
||||
// tslInterface
|
||||
//
|
||||
this.tslInterface.Name = "tslInterface";
|
||||
this.tslInterface.Size = new System.Drawing.Size(56, 22);
|
||||
this.tslInterface.Text = "Interface:";
|
||||
//
|
||||
// tscbInterface
|
||||
//
|
||||
this.tscbInterface.CausesValidation = false;
|
||||
this.tscbInterface.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.tscbInterface.Name = "tscbInterface";
|
||||
this.tscbInterface.Size = new System.Drawing.Size(200, 25);
|
||||
//
|
||||
// btnStartCapture
|
||||
//
|
||||
this.btnStartCapture.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||||
this.btnStartCapture.Image = ((System.Drawing.Image)(resources.GetObject("btnStartCapture.Image")));
|
||||
this.btnStartCapture.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||
this.btnStartCapture.Name = "btnStartCapture";
|
||||
this.btnStartCapture.Size = new System.Drawing.Size(23, 22);
|
||||
this.btnStartCapture.Text = "Start Capture";
|
||||
this.btnStartCapture.Click += new System.EventHandler(this.btnStartCapture_Click);
|
||||
//
|
||||
// btnStopCapture
|
||||
//
|
||||
this.btnStopCapture.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||||
this.btnStopCapture.Image = ((System.Drawing.Image)(resources.GetObject("btnStopCapture.Image")));
|
||||
this.btnStopCapture.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||
this.btnStopCapture.Name = "btnStopCapture";
|
||||
this.btnStopCapture.Size = new System.Drawing.Size(23, 22);
|
||||
this.btnStopCapture.Text = "Stop Capture";
|
||||
this.btnStopCapture.Click += new System.EventHandler(this.btnStopCapture_Click);
|
||||
//
|
||||
// btnClearCaptureLog
|
||||
//
|
||||
this.btnClearCaptureLog.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||||
this.btnClearCaptureLog.Image = ((System.Drawing.Image)(resources.GetObject("btnClearCaptureLog.Image")));
|
||||
this.btnClearCaptureLog.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||
this.btnClearCaptureLog.Name = "btnClearCaptureLog";
|
||||
this.btnClearCaptureLog.Size = new System.Drawing.Size(23, 22);
|
||||
this.btnClearCaptureLog.Text = "Clear Captured Packets";
|
||||
this.btnClearCaptureLog.Click += new System.EventHandler(this.btnClearCaptureLog_Click);
|
||||
//
|
||||
// btnCaptureSettings
|
||||
//
|
||||
this.btnCaptureSettings.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||||
this.btnCaptureSettings.Image = ((System.Drawing.Image)(resources.GetObject("btnCaptureSettings.Image")));
|
||||
this.btnCaptureSettings.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||
this.btnCaptureSettings.Name = "btnCaptureSettings";
|
||||
this.btnCaptureSettings.Size = new System.Drawing.Size(23, 22);
|
||||
this.btnCaptureSettings.Text = "Capture Settings";
|
||||
this.btnCaptureSettings.Click += new System.EventHandler(this.btnCaptureSettings_Click);
|
||||
//
|
||||
// btnCaptureFilters
|
||||
//
|
||||
this.btnCaptureFilters.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||||
this.btnCaptureFilters.Image = ((System.Drawing.Image)(resources.GetObject("btnCaptureFilters.Image")));
|
||||
this.btnCaptureFilters.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||
this.btnCaptureFilters.Name = "btnCaptureFilters";
|
||||
this.btnCaptureFilters.Size = new System.Drawing.Size(23, 22);
|
||||
this.btnCaptureFilters.Text = "Capture Filters";
|
||||
this.btnCaptureFilters.Click += new System.EventHandler(this.btnCaptureFilters_Click);
|
||||
//
|
||||
// toolStripSeparator4
|
||||
//
|
||||
this.toolStripSeparator4.Name = "toolStripSeparator4";
|
||||
this.toolStripSeparator4.Size = new System.Drawing.Size(6, 25);
|
||||
//
|
||||
// btnShowHelp
|
||||
//
|
||||
this.btnShowHelp.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||||
this.btnShowHelp.Image = ((System.Drawing.Image)(resources.GetObject("btnShowHelp.Image")));
|
||||
this.btnShowHelp.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||
this.btnShowHelp.Name = "btnShowHelp";
|
||||
this.btnShowHelp.Size = new System.Drawing.Size(23, 22);
|
||||
this.btnShowHelp.Text = "Help";
|
||||
//
|
||||
// statusStrip1
|
||||
//
|
||||
this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.spynetStatusPanel,
|
||||
this.packetsInBufferStatus});
|
||||
this.statusStrip1.Location = new System.Drawing.Point(0, 516);
|
||||
this.statusStrip1.Name = "statusStrip1";
|
||||
this.statusStrip1.RenderMode = System.Windows.Forms.ToolStripRenderMode.ManagerRenderMode;
|
||||
this.statusStrip1.Size = new System.Drawing.Size(929, 22);
|
||||
this.statusStrip1.TabIndex = 11;
|
||||
this.statusStrip1.Text = "statusStrip1";
|
||||
//
|
||||
// spynetStatusPanel
|
||||
//
|
||||
this.spynetStatusPanel.Image = ((System.Drawing.Image)(resources.GetObject("spynetStatusPanel.Image")));
|
||||
this.spynetStatusPanel.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
this.spynetStatusPanel.Name = "spynetStatusPanel";
|
||||
this.spynetStatusPanel.Size = new System.Drawing.Size(809, 17);
|
||||
this.spynetStatusPanel.Spring = true;
|
||||
this.spynetStatusPanel.Text = "Network Adapter Placeholder";
|
||||
this.spynetStatusPanel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
//
|
||||
// packetsInBufferStatus
|
||||
//
|
||||
this.packetsInBufferStatus.Name = "packetsInBufferStatus";
|
||||
this.packetsInBufferStatus.Size = new System.Drawing.Size(105, 17);
|
||||
this.packetsInBufferStatus.Text = "Captured Packets: 0";
|
||||
//
|
||||
// splitContainer1
|
||||
//
|
||||
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.splitContainer1.Location = new System.Drawing.Point(0, 49);
|
||||
this.splitContainer1.Name = "splitContainer1";
|
||||
this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal;
|
||||
//
|
||||
// splitContainer1.Panel1
|
||||
//
|
||||
this.splitContainer1.Panel1.Controls.Add(this.packetCaptureList);
|
||||
//
|
||||
// splitContainer1.Panel2
|
||||
//
|
||||
this.splitContainer1.Panel2.Controls.Add(this.splitContainer2);
|
||||
this.splitContainer1.Size = new System.Drawing.Size(929, 467);
|
||||
this.splitContainer1.SplitterDistance = 221;
|
||||
this.splitContainer1.TabIndex = 12;
|
||||
//
|
||||
// packetCaptureList
|
||||
//
|
||||
this.packetCaptureList.Activation = System.Windows.Forms.ItemActivation.OneClick;
|
||||
this.packetCaptureList.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
|
||||
this.columnHeader1,
|
||||
this.columnHeader2,
|
||||
this.columnHeader3,
|
||||
this.columnHeader4,
|
||||
this.columnHeader5,
|
||||
this.columnHeader6,
|
||||
this.columnHeader7,
|
||||
this.columnHeader8,
|
||||
this.columnHeader9});
|
||||
this.packetCaptureList.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.packetCaptureList.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.packetCaptureList.FullRowSelect = true;
|
||||
this.packetCaptureList.HideSelection = false;
|
||||
this.packetCaptureList.Location = new System.Drawing.Point(0, 0);
|
||||
this.packetCaptureList.MultiSelect = false;
|
||||
this.packetCaptureList.Name = "packetCaptureList";
|
||||
this.packetCaptureList.Size = new System.Drawing.Size(929, 221);
|
||||
this.packetCaptureList.TabIndex = 1;
|
||||
this.packetCaptureList.UseCompatibleStateImageBehavior = false;
|
||||
this.packetCaptureList.View = System.Windows.Forms.View.Details;
|
||||
this.packetCaptureList.SelectedIndexChanged += new System.EventHandler(this.packetCaptureList_SelectedIndexChanged);
|
||||
this.packetCaptureList.ItemSelectionChanged += new System.Windows.Forms.ListViewItemSelectionChangedEventHandler(this.packetCaptureList_ItemSelectionChanged);
|
||||
//
|
||||
// columnHeader1
|
||||
//
|
||||
this.columnHeader1.Text = "No";
|
||||
this.columnHeader1.Width = 52;
|
||||
//
|
||||
// columnHeader2
|
||||
//
|
||||
this.columnHeader2.Text = "Time";
|
||||
this.columnHeader2.Width = 100;
|
||||
//
|
||||
// columnHeader3
|
||||
//
|
||||
this.columnHeader3.Text = "Source MAC";
|
||||
this.columnHeader3.Width = 110;
|
||||
//
|
||||
// columnHeader4
|
||||
//
|
||||
this.columnHeader4.Text = "Dest MAC";
|
||||
this.columnHeader4.Width = 110;
|
||||
//
|
||||
// columnHeader5
|
||||
//
|
||||
this.columnHeader5.Text = "Protocol";
|
||||
//
|
||||
// columnHeader6
|
||||
//
|
||||
this.columnHeader6.Text = "Source IP";
|
||||
this.columnHeader6.Width = 105;
|
||||
//
|
||||
// columnHeader7
|
||||
//
|
||||
this.columnHeader7.Text = "Destination IP";
|
||||
this.columnHeader7.Width = 105;
|
||||
//
|
||||
// columnHeader8
|
||||
//
|
||||
this.columnHeader8.Text = "Port Source";
|
||||
this.columnHeader8.Width = 70;
|
||||
//
|
||||
// columnHeader9
|
||||
//
|
||||
this.columnHeader9.Text = "Port Dest";
|
||||
this.columnHeader9.Width = 70;
|
||||
//
|
||||
// splitContainer2
|
||||
//
|
||||
this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.splitContainer2.Location = new System.Drawing.Point(0, 0);
|
||||
this.splitContainer2.Name = "splitContainer2";
|
||||
//
|
||||
// splitContainer2.Panel1
|
||||
//
|
||||
this.splitContainer2.Panel1.Controls.Add(this.tvwPacketHeaderInfo);
|
||||
this.splitContainer2.Panel1Collapsed = true;
|
||||
//
|
||||
// splitContainer2.Panel2
|
||||
//
|
||||
this.splitContainer2.Panel2.Controls.Add(this.rtbDisplay);
|
||||
this.splitContainer2.Panel2.Controls.Add(this.panel1);
|
||||
this.splitContainer2.Size = new System.Drawing.Size(929, 242);
|
||||
this.splitContainer2.SplitterDistance = 217;
|
||||
this.splitContainer2.TabIndex = 2;
|
||||
//
|
||||
// tvwPacketHeaderInfo
|
||||
//
|
||||
this.tvwPacketHeaderInfo.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.tvwPacketHeaderInfo.Font = new System.Drawing.Font("Tahoma", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.tvwPacketHeaderInfo.Location = new System.Drawing.Point(0, 0);
|
||||
this.tvwPacketHeaderInfo.Name = "tvwPacketHeaderInfo";
|
||||
this.tvwPacketHeaderInfo.ShowRootLines = false;
|
||||
this.tvwPacketHeaderInfo.Size = new System.Drawing.Size(217, 242);
|
||||
this.tvwPacketHeaderInfo.TabIndex = 2;
|
||||
//
|
||||
// rtbDisplay
|
||||
//
|
||||
this.rtbDisplay.BackColor = System.Drawing.Color.White;
|
||||
this.rtbDisplay.DetectUrls = false;
|
||||
this.rtbDisplay.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.rtbDisplay.Font = new System.Drawing.Font("Courier New", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.rtbDisplay.Location = new System.Drawing.Point(0, 24);
|
||||
this.rtbDisplay.Name = "rtbDisplay";
|
||||
this.rtbDisplay.ReadOnly = true;
|
||||
this.rtbDisplay.ScrollBars = System.Windows.Forms.RichTextBoxScrollBars.ForcedBoth;
|
||||
this.rtbDisplay.ShowSelectionMargin = true;
|
||||
this.rtbDisplay.Size = new System.Drawing.Size(929, 218);
|
||||
this.rtbDisplay.TabIndex = 1;
|
||||
this.rtbDisplay.Text = "";
|
||||
this.rtbDisplay.WordWrap = false;
|
||||
//
|
||||
// panel1
|
||||
//
|
||||
this.panel1.Controls.Add(this.lblPacketSize);
|
||||
this.panel1.Controls.Add(this.lblDisplayMode);
|
||||
this.panel1.Controls.Add(this.chkStripHeaders);
|
||||
this.panel1.Controls.Add(this.cboDisplayMode);
|
||||
this.panel1.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.panel1.Location = new System.Drawing.Point(0, 0);
|
||||
this.panel1.Name = "panel1";
|
||||
this.panel1.Size = new System.Drawing.Size(929, 24);
|
||||
this.panel1.TabIndex = 2;
|
||||
//
|
||||
// lblDisplayMode
|
||||
//
|
||||
this.lblDisplayMode.AutoSize = true;
|
||||
this.lblDisplayMode.Location = new System.Drawing.Point(8, 4);
|
||||
this.lblDisplayMode.Name = "lblDisplayMode";
|
||||
this.lblDisplayMode.Size = new System.Drawing.Size(74, 13);
|
||||
this.lblDisplayMode.TabIndex = 1;
|
||||
this.lblDisplayMode.Text = "Display Mode:";
|
||||
//
|
||||
// chkStripHeaders
|
||||
//
|
||||
this.chkStripHeaders.AutoSize = true;
|
||||
this.chkStripHeaders.Location = new System.Drawing.Point(232, 2);
|
||||
this.chkStripHeaders.Name = "chkStripHeaders";
|
||||
this.chkStripHeaders.Size = new System.Drawing.Size(91, 17);
|
||||
this.chkStripHeaders.TabIndex = 14;
|
||||
this.chkStripHeaders.Text = "Strip Headers";
|
||||
this.chkStripHeaders.UseVisualStyleBackColor = true;
|
||||
this.chkStripHeaders.CheckStateChanged += new System.EventHandler(this.chkStripTCPIPHeaders_CheckStateChanged);
|
||||
this.chkStripHeaders.CheckedChanged += new System.EventHandler(this.chkStripTCPIPHeaders_CheckedChanged);
|
||||
//
|
||||
// cboDisplayMode
|
||||
//
|
||||
this.cboDisplayMode.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.cboDisplayMode.FormattingEnabled = true;
|
||||
this.cboDisplayMode.Items.AddRange(new object[] {
|
||||
"Hex + Text",
|
||||
"Hex only",
|
||||
"Decimal + Text",
|
||||
"Decimal Only",
|
||||
"Text Mode"});
|
||||
this.cboDisplayMode.Location = new System.Drawing.Point(88, 0);
|
||||
this.cboDisplayMode.Name = "cboDisplayMode";
|
||||
this.cboDisplayMode.Size = new System.Drawing.Size(136, 21);
|
||||
this.cboDisplayMode.TabIndex = 0;
|
||||
this.cboDisplayMode.SelectedIndexChanged += new System.EventHandler(this.cboDisplayModes_SelectedIndexChanged);
|
||||
//
|
||||
// niTrayIcon
|
||||
//
|
||||
this.niTrayIcon.ContextMenuStrip = this.cmsTrayMenu;
|
||||
this.niTrayIcon.Icon = ((System.Drawing.Icon)(resources.GetObject("niTrayIcon.Icon")));
|
||||
this.niTrayIcon.Text = "Project Carbon";
|
||||
this.niTrayIcon.Visible = true;
|
||||
this.niTrayIcon.DoubleClick += new System.EventHandler(this.niTrayIcon_DoubleClick);
|
||||
//
|
||||
// cmsTrayMenu
|
||||
//
|
||||
this.cmsTrayMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.mnuTrayStartCapture,
|
||||
this.mnuTrayStopCapture,
|
||||
this.toolStripMenuItem8,
|
||||
this.mnuTraySettings,
|
||||
this.mnuTrayFilters,
|
||||
this.toolStripMenuItem5,
|
||||
this.exitToolStripMenuItem});
|
||||
this.cmsTrayMenu.Name = "cmsTrayMenu";
|
||||
this.cmsTrayMenu.Size = new System.Drawing.Size(152, 126);
|
||||
//
|
||||
// mnuTrayStartCapture
|
||||
//
|
||||
this.mnuTrayStartCapture.Name = "mnuTrayStartCapture";
|
||||
this.mnuTrayStartCapture.Size = new System.Drawing.Size(151, 22);
|
||||
this.mnuTrayStartCapture.Text = "Start Capture";
|
||||
this.mnuTrayStartCapture.Click += new System.EventHandler(this.mnuTrayStartCapture_Click);
|
||||
//
|
||||
// mnuTrayStopCapture
|
||||
//
|
||||
this.mnuTrayStopCapture.Name = "mnuTrayStopCapture";
|
||||
this.mnuTrayStopCapture.Size = new System.Drawing.Size(151, 22);
|
||||
this.mnuTrayStopCapture.Text = "Stop Capture";
|
||||
this.mnuTrayStopCapture.Click += new System.EventHandler(this.mnuTrayStopCapture_Click);
|
||||
//
|
||||
// toolStripMenuItem8
|
||||
//
|
||||
this.toolStripMenuItem8.Name = "toolStripMenuItem8";
|
||||
this.toolStripMenuItem8.Size = new System.Drawing.Size(148, 6);
|
||||
//
|
||||
// mnuTraySettings
|
||||
//
|
||||
this.mnuTraySettings.Name = "mnuTraySettings";
|
||||
this.mnuTraySettings.Size = new System.Drawing.Size(151, 22);
|
||||
this.mnuTraySettings.Text = "Settings...";
|
||||
this.mnuTraySettings.Click += new System.EventHandler(this.mnuTraySettings_Click);
|
||||
//
|
||||
// mnuTrayFilters
|
||||
//
|
||||
this.mnuTrayFilters.Name = "mnuTrayFilters";
|
||||
this.mnuTrayFilters.Size = new System.Drawing.Size(151, 22);
|
||||
this.mnuTrayFilters.Text = "Filters...";
|
||||
this.mnuTrayFilters.Click += new System.EventHandler(this.mnuTrayFilters_Click);
|
||||
//
|
||||
// toolStripMenuItem5
|
||||
//
|
||||
this.toolStripMenuItem5.Name = "toolStripMenuItem5";
|
||||
this.toolStripMenuItem5.Size = new System.Drawing.Size(148, 6);
|
||||
//
|
||||
// exitToolStripMenuItem
|
||||
//
|
||||
this.exitToolStripMenuItem.Name = "exitToolStripMenuItem";
|
||||
this.exitToolStripMenuItem.Size = new System.Drawing.Size(151, 22);
|
||||
this.exitToolStripMenuItem.Text = "Exit";
|
||||
this.exitToolStripMenuItem.Click += new System.EventHandler(this.exitToolStripMenuItem_Click);
|
||||
//
|
||||
// lblPacketSize
|
||||
//
|
||||
this.lblPacketSize.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.lblPacketSize.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
|
||||
this.lblPacketSize.Location = new System.Drawing.Point(744, 0);
|
||||
this.lblPacketSize.Name = "lblPacketSize";
|
||||
this.lblPacketSize.Size = new System.Drawing.Size(184, 21);
|
||||
this.lblPacketSize.TabIndex = 15;
|
||||
this.lblPacketSize.Text = "Packet Size: 0";
|
||||
this.lblPacketSize.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// frmMain
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(929, 538);
|
||||
this.Controls.Add(this.splitContainer1);
|
||||
this.Controls.Add(this.statusStrip1);
|
||||
this.Controls.Add(this.tsMainToolbar);
|
||||
this.Controls.Add(this.menuStrip1);
|
||||
this.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.Name = "frmMain";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "Project Carbon (Beta 5)";
|
||||
this.Load += new System.EventHandler(this.frmMain_Load);
|
||||
this.Shown += new System.EventHandler(this.frmMain_Shown);
|
||||
this.Resize += new System.EventHandler(this.frmMain_Resize);
|
||||
this.menuStrip1.ResumeLayout(false);
|
||||
this.menuStrip1.PerformLayout();
|
||||
this.tsMainToolbar.ResumeLayout(false);
|
||||
this.tsMainToolbar.PerformLayout();
|
||||
this.statusStrip1.ResumeLayout(false);
|
||||
this.statusStrip1.PerformLayout();
|
||||
this.splitContainer1.Panel1.ResumeLayout(false);
|
||||
this.splitContainer1.Panel2.ResumeLayout(false);
|
||||
this.splitContainer1.ResumeLayout(false);
|
||||
this.splitContainer2.Panel1.ResumeLayout(false);
|
||||
this.splitContainer2.Panel2.ResumeLayout(false);
|
||||
this.splitContainer2.ResumeLayout(false);
|
||||
this.panel1.ResumeLayout(false);
|
||||
this.panel1.PerformLayout();
|
||||
this.cmsTrayMenu.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.MenuStrip menuStrip1;
|
||||
private System.Windows.Forms.ToolStripMenuItem fileToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem mnuOpenCaptureFile;
|
||||
private System.Windows.Forms.ToolStripMenuItem mnuOpenAndAppend;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripMenuItem2;
|
||||
private System.Windows.Forms.ToolStripMenuItem mnuSaveCaptureFile;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripMenuItem1;
|
||||
private System.Windows.Forms.ToolStripMenuItem mnuExit;
|
||||
private System.Windows.Forms.ToolStripMenuItem mnuCapture;
|
||||
private System.Windows.Forms.ToolStripMenuItem mnuStartCapture;
|
||||
private System.Windows.Forms.ToolStripMenuItem mnuStopCapture;
|
||||
private System.Windows.Forms.ToolStripMenuItem mnuSettings;
|
||||
private System.Windows.Forms.ToolStripMenuItem mnuTools;
|
||||
private System.Windows.Forms.ToolStripMenuItem mnuDisplayWinsockInfo;
|
||||
private System.Windows.Forms.ToolStripMenuItem helpToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStrip tsMainToolbar;
|
||||
private System.Windows.Forms.ToolStripButton btnStartCapture;
|
||||
private System.Windows.Forms.ToolStripButton btnStopCapture;
|
||||
private System.Windows.Forms.ToolStripButton btnCaptureFilters;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator4;
|
||||
private System.Windows.Forms.ToolStripButton btnLoadCaptureFile;
|
||||
private System.Windows.Forms.ToolStripButton btnSaveCaptureFile;
|
||||
private System.Windows.Forms.ToolStripButton btnClearCaptureLog;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator2;
|
||||
private System.Windows.Forms.ToolStripButton btnCaptureSettings;
|
||||
private System.Windows.Forms.ToolStripButton btnShowHelp;
|
||||
private System.Windows.Forms.StatusStrip statusStrip1;
|
||||
private System.Windows.Forms.ToolStripStatusLabel spynetStatusPanel;
|
||||
private System.Windows.Forms.SplitContainer splitContainer1;
|
||||
private System.Windows.Forms.ListView packetCaptureList;
|
||||
private System.Windows.Forms.ColumnHeader columnHeader1;
|
||||
private System.Windows.Forms.ColumnHeader columnHeader2;
|
||||
private System.Windows.Forms.ColumnHeader columnHeader5;
|
||||
private System.Windows.Forms.ColumnHeader columnHeader6;
|
||||
private System.Windows.Forms.ColumnHeader columnHeader7;
|
||||
private System.Windows.Forms.ColumnHeader columnHeader8;
|
||||
private System.Windows.Forms.ColumnHeader columnHeader9;
|
||||
private System.Windows.Forms.ToolStripMenuItem mnuFilters;
|
||||
private System.Windows.Forms.ToolStripMenuItem mnuVisitWebsite;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripMenuItem4;
|
||||
private System.Windows.Forms.ToolStripMenuItem mnuAbout;
|
||||
private System.Windows.Forms.ToolStripMenuItem mnuClearCapturedPackets;
|
||||
private System.Windows.Forms.CheckBox chkStripHeaders;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripMenuItem3;
|
||||
private System.Windows.Forms.SplitContainer splitContainer2;
|
||||
private System.Windows.Forms.TreeView tvwPacketHeaderInfo;
|
||||
private System.Windows.Forms.RichTextBox rtbDisplay;
|
||||
private System.Windows.Forms.NotifyIcon niTrayIcon;
|
||||
private System.Windows.Forms.ContextMenuStrip cmsTrayMenu;
|
||||
private System.Windows.Forms.ToolStripMenuItem mnuTrayStartCapture;
|
||||
private System.Windows.Forms.ToolStripMenuItem mnuTrayStopCapture;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripMenuItem8;
|
||||
private System.Windows.Forms.ToolStripMenuItem mnuTraySettings;
|
||||
private System.Windows.Forms.ToolStripMenuItem mnuTrayFilters;
|
||||
private System.Windows.Forms.ToolStripMenuItem savePacketDumpToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem mnuDnsLookup;
|
||||
private System.Windows.Forms.Panel panel1;
|
||||
private System.Windows.Forms.Label lblDisplayMode;
|
||||
private System.Windows.Forms.ComboBox cboDisplayMode;
|
||||
private System.Windows.Forms.ToolStripStatusLabel packetsInBufferStatus;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripMenuItem5;
|
||||
private System.Windows.Forms.ToolStripMenuItem exitToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripLabel tslInterface;
|
||||
private System.Windows.Forms.ToolStripComboBox tscbInterface;
|
||||
private System.Windows.Forms.ColumnHeader columnHeader3;
|
||||
private System.Windows.Forms.ColumnHeader columnHeader4;
|
||||
private System.Windows.Forms.Label lblPacketSize;
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,508 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using System.Net;
|
||||
using System.Collections;
|
||||
using System.IO;
|
||||
using System.Globalization;
|
||||
using System.Threading;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Runtime.Serialization.Formatters;
|
||||
using System.Runtime.Serialization.Formatters.Binary;
|
||||
|
||||
using ProjectCarbon.Properties;
|
||||
using ProjectCarbon.Protocols;
|
||||
|
||||
using Tamir.IPLib;
|
||||
using Tamir.IPLib.Packets;
|
||||
|
||||
namespace ProjectCarbon
|
||||
{
|
||||
public partial class frmMain : Form
|
||||
{
|
||||
public frmMain()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void frmMain_Load(object sender, EventArgs e)
|
||||
{
|
||||
foreach (PcapDevice dev in Global.DeviceList)
|
||||
{
|
||||
tscbInterface.Items.Add(dev.PcapDescription);
|
||||
}
|
||||
tscbInterface.SelectedIndex = 0;
|
||||
|
||||
spynetStatusPanel.Text = "Status: Idle...";
|
||||
cboDisplayMode.SelectedIndex = 0;
|
||||
|
||||
ApplySettings();
|
||||
|
||||
// This event is fired when the properties are saving
|
||||
Settings.Default.SettingsSaving +=
|
||||
new System.Configuration.SettingsSavingEventHandler(Default_SettingsSaving);
|
||||
}
|
||||
|
||||
|
||||
void Default_SettingsSaving(object sender, CancelEventArgs e)
|
||||
{
|
||||
ApplySettings();
|
||||
if (Settings.Default.StartUpWindows)
|
||||
Functions.SetStartup();
|
||||
else
|
||||
Functions.RemoveStartup();
|
||||
|
||||
}
|
||||
|
||||
private void ApplySettings()
|
||||
{
|
||||
// Let's load the options
|
||||
rtbDisplay.BackColor =
|
||||
Settings.Default.PacketDisplayBackgroundColor;
|
||||
rtbDisplay.ForeColor =
|
||||
Settings.Default.PacketDisplayFontColor;
|
||||
rtbDisplay.Font =
|
||||
Settings.Default.PacketDisplayFontFace;
|
||||
packetCaptureList.BackColor =
|
||||
Settings.Default.PacketListBackgroundColor;
|
||||
packetCaptureList.ForeColor =
|
||||
Settings.Default.PacketListTextColor;
|
||||
}
|
||||
|
||||
private void device_PcapOnPacketArrival(object sender, Packet packet)
|
||||
{
|
||||
try
|
||||
{
|
||||
Global.PacketCapturedEvent packetCapturedEvent
|
||||
= new Global.PacketCapturedEvent(OnPacketCaptured);
|
||||
|
||||
this.BeginInvoke(packetCapturedEvent, new object[] { packet });
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Console.WriteLine(e.Message);
|
||||
}
|
||||
}
|
||||
|
||||
private void OnPacketCaptured(Packet packet)
|
||||
{
|
||||
ListViewItem listViewItem =
|
||||
packetCaptureList.Items.Add(packetCaptureList.Items.Count.ToString());
|
||||
|
||||
listViewItem.SubItems.Add(packet.Timeval.Date.ToString());
|
||||
listViewItem.SubItems.Add(((EthernetPacket)packet).SourceHwAddress.ToUpper());
|
||||
listViewItem.SubItems.Add(((EthernetPacket)packet).DestinationHwAddress.ToUpper());
|
||||
|
||||
if (packet is IPPacket)
|
||||
{
|
||||
listViewItem.SubItems.Add(((IPPacket)packet).IPProtocol.ToString());
|
||||
listViewItem.SubItems.Add(((IPPacket)packet).SourceAddress.ToString());
|
||||
listViewItem.SubItems.Add(((IPPacket)packet).DestinationAddress.ToString());
|
||||
}
|
||||
else
|
||||
{
|
||||
listViewItem.SubItems.Add("--");
|
||||
listViewItem.SubItems.Add("--");
|
||||
listViewItem.SubItems.Add("--");
|
||||
}
|
||||
|
||||
if (packet is TCPPacket)
|
||||
{
|
||||
listViewItem.SubItems.Add(((TCPPacket)packet).SourcePort.ToString());
|
||||
listViewItem.SubItems.Add(((TCPPacket)packet).DestinationPort.ToString());
|
||||
}
|
||||
else if (packet is UDPPacket)
|
||||
{
|
||||
listViewItem.SubItems.Add(((UDPPacket)packet).SourcePort.ToString());
|
||||
listViewItem.SubItems.Add(((UDPPacket)packet).DestinationPort.ToString());
|
||||
}
|
||||
else
|
||||
{
|
||||
listViewItem.SubItems.Add("--");
|
||||
listViewItem.SubItems.Add("--");
|
||||
}
|
||||
|
||||
|
||||
// Add this captured packet to the list.
|
||||
Global.CapturedPackets.Add(packet);
|
||||
|
||||
// Update the packet list.
|
||||
packetsInBufferStatus.Text = "Captured Packets: " + Global.CapturedPackets.Count;
|
||||
|
||||
// Scroll if autoscroll is enabled.
|
||||
if (Settings.Default.AutoScrollPacketList == true)
|
||||
{
|
||||
//lvi.Selected = true;
|
||||
listViewItem.EnsureVisible();
|
||||
}
|
||||
}
|
||||
|
||||
private void DisplayCapture(byte[] buffer)
|
||||
{
|
||||
rtbDisplay.Clear();
|
||||
switch (cboDisplayMode.SelectedIndex)
|
||||
{
|
||||
case 0:
|
||||
rtbDisplay.AppendText(Functions.GetHexBlock(buffer));
|
||||
break;
|
||||
case 1:
|
||||
rtbDisplay.AppendText(Functions.GetHexOnly(buffer));
|
||||
break;
|
||||
case 2:
|
||||
rtbDisplay.AppendText(Functions.GetDecBlock(buffer));
|
||||
break;
|
||||
case 3:
|
||||
rtbDisplay.AppendText(Functions.GetDecOnly(buffer));
|
||||
break;
|
||||
case 4:
|
||||
rtbDisplay.AppendText(Functions.GetSafeString(buffer));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
#region Form Events
|
||||
private void btnStartCapture_Click(object sender, EventArgs e)
|
||||
{
|
||||
StartCapture();
|
||||
}
|
||||
|
||||
private void packetCaptureList_ItemSelectionChanged(object sender, ListViewItemSelectionChangedEventArgs e)
|
||||
{
|
||||
Packet packet = Global.CapturedPackets[e.ItemIndex];
|
||||
lblPacketSize.Text = "Packet Size: " + ((EthernetPacket)packet).Bytes.Length.ToString();
|
||||
if (chkStripHeaders.Checked == true)
|
||||
DisplayCapture(packet.Data);
|
||||
else
|
||||
DisplayCapture(((EthernetPacket)packet).Bytes);
|
||||
|
||||
}
|
||||
|
||||
private void btnStopCapture_Click(object sender, EventArgs e)
|
||||
{
|
||||
StopCapture();
|
||||
}
|
||||
|
||||
private void mnuAbout_Click(object sender, EventArgs e)
|
||||
{
|
||||
frmAboutDialog aboutDialog = new frmAboutDialog();
|
||||
aboutDialog.ShowDialog();
|
||||
}
|
||||
|
||||
private void btnClearCaptureLog_Click(object sender, EventArgs e)
|
||||
{
|
||||
ClearCaptureLog();
|
||||
}
|
||||
|
||||
private void btnSaveCaptureFile_Click(object sender, EventArgs e)
|
||||
{
|
||||
SaveCaptureFile();
|
||||
}
|
||||
|
||||
private void btnLoadCaptureFile_Click(object sender, EventArgs e)
|
||||
{
|
||||
LoadCaptureFile(false);
|
||||
}
|
||||
|
||||
private void btnCaptureFilters_Click(object sender, EventArgs e)
|
||||
{
|
||||
ShowCaptureFiltersDialog();
|
||||
}
|
||||
|
||||
private void chkStripTCPIPHeaders_CheckStateChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (packetCaptureList.SelectedItems.Count > 0)
|
||||
packetCaptureList_ItemSelectionChanged(packetCaptureList, new ListViewItemSelectionChangedEventArgs(packetCaptureList.SelectedItems[0], packetCaptureList.SelectedItems[0].Index, true));
|
||||
}
|
||||
|
||||
private void mnuOpenCaptureFile_Click(object sender, EventArgs e)
|
||||
{
|
||||
LoadCaptureFile(false);
|
||||
}
|
||||
|
||||
private void mnuOpenAndAppend_Click(object sender, EventArgs e)
|
||||
{
|
||||
LoadCaptureFile(true);
|
||||
}
|
||||
|
||||
private void mnuStartCapture_Click(object sender, EventArgs e)
|
||||
{
|
||||
StartCapture();
|
||||
}
|
||||
|
||||
private void mnuStopCapture_Click(object sender, EventArgs e)
|
||||
{
|
||||
StopCapture();
|
||||
}
|
||||
|
||||
private void mnuClearCapturedPackets_Click(object sender, EventArgs e)
|
||||
{
|
||||
ClearCaptureLog();
|
||||
}
|
||||
|
||||
private void mnuSettings_Click(object sender, EventArgs e)
|
||||
{
|
||||
ShowCaptureSettings();
|
||||
}
|
||||
|
||||
private void mnuFilters_Click(object sender, EventArgs e)
|
||||
{
|
||||
ShowCaptureFiltersDialog();
|
||||
}
|
||||
|
||||
private void mnuSaveCaptureFile_Click(object sender, EventArgs e)
|
||||
{
|
||||
SaveCaptureFile();
|
||||
}
|
||||
|
||||
private void btnCaptureSettings_Click(object sender, EventArgs e)
|
||||
{
|
||||
ShowCaptureSettings();
|
||||
}
|
||||
|
||||
|
||||
private void mnuDisplayWinsockInfo_Click(object sender, EventArgs e)
|
||||
{
|
||||
frmSocketInformation socketInformation = new frmSocketInformation();
|
||||
socketInformation.ShowDialog();
|
||||
}
|
||||
|
||||
private void mnuAdapterPerformance_Click(object sender, EventArgs e)
|
||||
{
|
||||
}
|
||||
|
||||
private void mnuVisitWebsite_Click(object sender, EventArgs e)
|
||||
{
|
||||
Help.ShowHelp(this, "http://www.xeons.net/");
|
||||
}
|
||||
|
||||
private void frmMain_Resize(object sender, EventArgs e)
|
||||
{
|
||||
if (FormWindowState.Minimized == WindowState)
|
||||
Hide();
|
||||
}
|
||||
|
||||
private void niTrayIcon_DoubleClick(object sender, EventArgs e)
|
||||
{
|
||||
Show();
|
||||
WindowState = FormWindowState.Normal;
|
||||
}
|
||||
|
||||
private void frmMain_Shown(object sender, EventArgs e)
|
||||
{
|
||||
// Start capturing at startup
|
||||
if (Settings.Default.StartUpCapture)
|
||||
StartCapture();
|
||||
|
||||
// Startup Minimized to tray
|
||||
if (Settings.Default.StartUpMinimized)
|
||||
WindowState = FormWindowState.Minimized;
|
||||
}
|
||||
|
||||
private void savePacketDumpToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
SavePacketDump();
|
||||
}
|
||||
|
||||
private void mnuTrayStartCapture_Click(object sender, EventArgs e)
|
||||
{
|
||||
StartCapture();
|
||||
}
|
||||
|
||||
private void mnuTrayStopCapture_Click(object sender, EventArgs e)
|
||||
{
|
||||
StopCapture();
|
||||
}
|
||||
|
||||
private void mnuTraySettings_Click(object sender, EventArgs e)
|
||||
{
|
||||
ShowCaptureSettings();
|
||||
}
|
||||
|
||||
private void mnuTrayFilters_Click(object sender, EventArgs e)
|
||||
{
|
||||
ShowCaptureFiltersDialog();
|
||||
}
|
||||
|
||||
private void mnuExit_Click(object sender, EventArgs e)
|
||||
{
|
||||
Application.Exit();
|
||||
}
|
||||
|
||||
private void mnuDnsLookup_Click(object sender, EventArgs e)
|
||||
{
|
||||
frmDnsLookup dnsLookup = new frmDnsLookup();
|
||||
dnsLookup.ShowDialog();
|
||||
}
|
||||
|
||||
private void chkStripTCPIPHeaders_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void cboDisplayModes_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (packetCaptureList.SelectedItems.Count > 0)
|
||||
packetCaptureList_ItemSelectionChanged(packetCaptureList, new ListViewItemSelectionChangedEventArgs(packetCaptureList.SelectedItems[0], packetCaptureList.SelectedItems[0].Index, true));
|
||||
}
|
||||
|
||||
private void exitToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
Application.Exit();
|
||||
}
|
||||
|
||||
private void packetCaptureList_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
private void StartCapture()
|
||||
{
|
||||
Global.DeviceList[tscbInterface.SelectedIndex].PcapOnPacketArrival +=
|
||||
new SharpPcap.PacketArrivalEvent(device_PcapOnPacketArrival);
|
||||
|
||||
Global.DeviceList[tscbInterface.SelectedIndex].PcapOpen(true, 1000);
|
||||
|
||||
Global.DeviceList[tscbInterface.SelectedIndex].PcapStartCapture();
|
||||
|
||||
tscbInterface.Enabled = false;
|
||||
btnStartCapture.Enabled = false;
|
||||
mnuStartCapture.Enabled = false;
|
||||
|
||||
spynetStatusPanel.Text = "Status: Capturing Packets...";
|
||||
}
|
||||
|
||||
private void StopCapture()
|
||||
{
|
||||
Global.DeviceList[tscbInterface.SelectedIndex].PcapStopCapture();
|
||||
|
||||
Global.DeviceList[tscbInterface.SelectedIndex].PcapClose();
|
||||
|
||||
tscbInterface.Enabled = true;
|
||||
btnStartCapture.Enabled = true;
|
||||
mnuStartCapture.Enabled = true;
|
||||
|
||||
spynetStatusPanel.Text = "Status: Capture Stopped.";
|
||||
}
|
||||
|
||||
private void ClearCaptureLog()
|
||||
{
|
||||
if (MessageBox.Show("Are you sure you want to clear the captured packets list?",
|
||||
"Project Carbon", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
|
||||
{
|
||||
packetCaptureList.Items.Clear();
|
||||
Global.CapturedPackets.Clear();
|
||||
packetsInBufferStatus.Text = "Captured Packets: " + Global.CapturedPackets.Count;
|
||||
}
|
||||
}
|
||||
|
||||
private void LoadCaptureFile(bool append)
|
||||
{
|
||||
OpenFileDialog openFileDialog = new OpenFileDialog();
|
||||
|
||||
openFileDialog.CheckFileExists = true;
|
||||
openFileDialog.CheckPathExists = true;
|
||||
openFileDialog.Title = "Load Capture";
|
||||
openFileDialog.Filter = "ProjectCarbon Capture File (*.cap2)|*.cap2|CaptureNet Files (*.cap)|*.cap|All Files (*.*)|*.*";
|
||||
|
||||
if (openFileDialog.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
BinaryFormatter bf = new BinaryFormatter();
|
||||
// Let's open the capture file and start reading it.
|
||||
using (FileStream fs = new FileStream(openFileDialog.FileName,
|
||||
FileMode.Open))
|
||||
{
|
||||
BinaryReader br = new BinaryReader(fs);
|
||||
|
||||
byte nameLength = br.ReadByte();
|
||||
byte[] fileIdentifier = new byte[5];
|
||||
|
||||
if (nameLength > 1 && nameLength < 20)
|
||||
fileIdentifier = br.ReadBytes(nameLength);
|
||||
|
||||
if (Encoding.ASCII.GetString(fileIdentifier).IndexOf("SpyNet") != -1)
|
||||
{
|
||||
do
|
||||
{
|
||||
ushort packetLength = br.ReadUInt16();
|
||||
byte[] preData = br.ReadBytes(28);
|
||||
byte[] packetData = br.ReadBytes(packetLength - 14);
|
||||
if (packetData.Length > 0)
|
||||
{
|
||||
//PacketCaptured();
|
||||
// TODO: Fix
|
||||
}
|
||||
}
|
||||
while (br.BaseStream.Position < br.BaseStream.Length);
|
||||
return;
|
||||
}
|
||||
|
||||
fs.Position = 0;
|
||||
|
||||
try
|
||||
{
|
||||
if (!append)
|
||||
{
|
||||
packetCaptureList.Items.Clear();
|
||||
Global.CapturedPackets.Clear();
|
||||
}
|
||||
|
||||
//List<IpProtocol> capturedPacketsLoaded = (List<IpProtocol>)bf.Deserialize(fs);
|
||||
//foreach (IpProtocol ipp in capturedPacketsLoaded.ToArray())
|
||||
//{
|
||||
// PacketCaptured(ipp);
|
||||
//}
|
||||
}
|
||||
catch (FileLoadException)
|
||||
{
|
||||
}
|
||||
catch (SerializationException)
|
||||
{
|
||||
MessageBox.Show("There was an error while attempting to load this capture file. It may have become corrupted or obsolete.",
|
||||
"Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static void SaveCaptureFile()
|
||||
{
|
||||
SaveFileDialog saveFileDialog = new SaveFileDialog();
|
||||
|
||||
saveFileDialog.CheckFileExists = false;
|
||||
saveFileDialog.CheckPathExists = true;
|
||||
saveFileDialog.Title = "Save Capture";
|
||||
saveFileDialog.Filter = "ProjectCarbon Capture File (*.cap2)|*.cap2|All Files|*.*";
|
||||
|
||||
if (saveFileDialog.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
BinaryFormatter bf = new BinaryFormatter();
|
||||
using (FileStream fs = new FileStream(saveFileDialog.FileName,
|
||||
FileMode.OpenOrCreate))
|
||||
{
|
||||
bf.Serialize(fs, Global.CapturedPackets);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static void SavePacketDump()
|
||||
{
|
||||
}
|
||||
|
||||
private static void ShowCaptureFiltersDialog()
|
||||
{
|
||||
frmCaptureFilters captureFilters = new frmCaptureFilters();
|
||||
captureFilters.ShowDialog();
|
||||
}
|
||||
|
||||
private static void ShowCaptureSettings()
|
||||
{
|
||||
frmCaptureSettings captureSettings = new frmCaptureSettings();
|
||||
captureSettings.ShowDialog();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,81 @@
|
|||
namespace ProjectCarbon
|
||||
{
|
||||
partial class frmSocketInformation
|
||||
{
|
||||
/// <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.btnClose = new System.Windows.Forms.Button();
|
||||
this.lstSocketInformation = new System.Windows.Forms.ListBox();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// btnClose
|
||||
//
|
||||
this.btnClose.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btnClose.DialogResult = System.Windows.Forms.DialogResult.OK;
|
||||
this.btnClose.Location = new System.Drawing.Point(440, 336);
|
||||
this.btnClose.Name = "btnClose";
|
||||
this.btnClose.Size = new System.Drawing.Size(80, 24);
|
||||
this.btnClose.TabIndex = 1;
|
||||
this.btnClose.Text = "OK";
|
||||
this.btnClose.UseVisualStyleBackColor = true;
|
||||
this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
|
||||
//
|
||||
// lstSocketInformation
|
||||
//
|
||||
this.lstSocketInformation.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.lstSocketInformation.Font = new System.Drawing.Font("Courier New", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lstSocketInformation.FormattingEnabled = true;
|
||||
this.lstSocketInformation.IntegralHeight = false;
|
||||
this.lstSocketInformation.ItemHeight = 15;
|
||||
this.lstSocketInformation.Location = new System.Drawing.Point(8, 8);
|
||||
this.lstSocketInformation.Name = "lstSocketInformation";
|
||||
this.lstSocketInformation.Size = new System.Drawing.Size(512, 319);
|
||||
this.lstSocketInformation.TabIndex = 2;
|
||||
//
|
||||
// frmSocketInformation
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(532, 373);
|
||||
this.Controls.Add(this.lstSocketInformation);
|
||||
this.Controls.Add(this.btnClose);
|
||||
this.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.Name = "frmSocketInformation";
|
||||
this.Text = "Socket Information";
|
||||
this.Load += new System.EventHandler(this.frmSocketInformation_Load);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Button btnClose;
|
||||
private System.Windows.Forms.ListBox lstSocketInformation;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,198 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using System.Net;
|
||||
using System.Net.Sockets;
|
||||
using System.Net.NetworkInformation;
|
||||
|
||||
namespace ProjectCarbon
|
||||
{
|
||||
public partial class frmSocketInformation : Form
|
||||
{
|
||||
public frmSocketInformation()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void frmSocketInformation_Load(object sender, EventArgs e)
|
||||
{
|
||||
PopulateSocketInformation();
|
||||
}
|
||||
|
||||
private void btnClose_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.Close();
|
||||
}
|
||||
|
||||
private void PopulateSocketInformation()
|
||||
{
|
||||
IPGlobalProperties computerProperties = IPGlobalProperties.GetIPGlobalProperties();
|
||||
NetworkInterface[] nics = NetworkInterface.GetAllNetworkInterfaces();
|
||||
|
||||
lstSocketInformation.Items.Clear();
|
||||
lstSocketInformation.Items.Add(String.Format("Interface information for {0}.{1}",
|
||||
computerProperties.HostName, computerProperties.DomainName));
|
||||
|
||||
if (nics == null || nics.Length < 1)
|
||||
{
|
||||
lstSocketInformation.Items.Add(" No network interfaces found.");
|
||||
return;
|
||||
}
|
||||
|
||||
lstSocketInformation.Items.Add(String.Format(" Number of interfaces .................... : {0}", nics.Length));
|
||||
foreach (NetworkInterface adapter in nics)
|
||||
{
|
||||
IPInterfaceProperties properties = adapter.GetIPProperties();
|
||||
lstSocketInformation.Items.Add("");
|
||||
lstSocketInformation.Items.Add(adapter.Description);
|
||||
lstSocketInformation.Items.Add(String.Empty.PadLeft(adapter.Description.Length, '='));
|
||||
lstSocketInformation.Items.Add(String.Format(" Interface type .......................... : {0}", adapter.NetworkInterfaceType));
|
||||
lstSocketInformation.Items.Add(String.Format(" Physical Address ........................ : {0}",
|
||||
adapter.GetPhysicalAddress().ToString()));
|
||||
lstSocketInformation.Items.Add(String.Format(" Operational status ...................... : {0}",
|
||||
adapter.OperationalStatus));
|
||||
string versions = "";
|
||||
|
||||
// Create a display string for the supported IP versions.
|
||||
if (adapter.Supports(NetworkInterfaceComponent.IPv4))
|
||||
{
|
||||
versions = "IPv4";
|
||||
}
|
||||
if (adapter.Supports(NetworkInterfaceComponent.IPv6))
|
||||
{
|
||||
if (versions.Length > 0)
|
||||
{
|
||||
versions += " ";
|
||||
}
|
||||
versions += "IPv6";
|
||||
}
|
||||
lstSocketInformation.Items.Add(String.Format(" IP version .............................. : {0}", versions));
|
||||
PopulateIPAddresses(properties);
|
||||
|
||||
// The following information is not useful for loopback adapters.
|
||||
if (adapter.NetworkInterfaceType == NetworkInterfaceType.Loopback)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
lstSocketInformation.Items.Add(String.Format(" DNS suffix .............................. : {0}",
|
||||
properties.DnsSuffix));
|
||||
|
||||
if (adapter.Supports(NetworkInterfaceComponent.IPv4))
|
||||
{
|
||||
IPv4InterfaceProperties ipv4 = properties.GetIPv4Properties();
|
||||
lstSocketInformation.Items.Add(String.Format(" MTU...................................... : {0}", ipv4.Mtu));
|
||||
if (ipv4.UsesWins)
|
||||
{
|
||||
|
||||
IPAddressCollection winsServers = properties.WinsServersAddresses;
|
||||
if (winsServers.Count > 0)
|
||||
{
|
||||
//label = " WINS Servers ............................ :";
|
||||
foreach (IPAddress wins in winsServers)
|
||||
{
|
||||
lstSocketInformation.Items.Add(String.Format(" WINS Servers ............................ : {0}",
|
||||
wins.ToString()
|
||||
));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
lstSocketInformation.Items.Add(String.Format(" DNS enabled ............................. : {0}",
|
||||
properties.IsDnsEnabled));
|
||||
lstSocketInformation.Items.Add(String.Format(" Dynamically configured DNS .............. : {0}",
|
||||
properties.IsDynamicDnsEnabled));
|
||||
lstSocketInformation.Items.Add(String.Format(" Receive Only ............................ : {0}",
|
||||
adapter.IsReceiveOnly));
|
||||
lstSocketInformation.Items.Add(String.Format(" Multicast ............................... : {0}",
|
||||
adapter.SupportsMulticast));
|
||||
|
||||
//adapter.
|
||||
//ShowInterfaceStatistics(adapter);
|
||||
}
|
||||
}
|
||||
|
||||
public void PopulateIPAddresses(IPInterfaceProperties adapterProperties)
|
||||
{
|
||||
IPAddressCollection dnsServers = adapterProperties.DnsAddresses;
|
||||
if (dnsServers != null)
|
||||
{
|
||||
foreach (IPAddress dns in dnsServers)
|
||||
{
|
||||
lstSocketInformation.Items.Add(String.Format(" DNS Servers ............................. : {0}",
|
||||
dns.ToString()
|
||||
));
|
||||
}
|
||||
}
|
||||
IPAddressInformationCollection anyCast = adapterProperties.AnycastAddresses;
|
||||
if (anyCast != null)
|
||||
{
|
||||
foreach (IPAddressInformation any in anyCast)
|
||||
{
|
||||
lstSocketInformation.Items.Add(String.Format(" Anycast Address .......................... : {0} {1} {2}",
|
||||
any.Address,
|
||||
any.IsTransient ? "Transient" : "",
|
||||
any.IsDnsEligible ? "DNS Eligible" : ""
|
||||
));
|
||||
}
|
||||
lstSocketInformation.Items.Add("");
|
||||
}
|
||||
|
||||
MulticastIPAddressInformationCollection multiCast = adapterProperties.MulticastAddresses;
|
||||
if (multiCast != null)
|
||||
{
|
||||
foreach (IPAddressInformation multi in multiCast)
|
||||
{
|
||||
lstSocketInformation.Items.Add(String.Format(" Multicast Address ....................... : {0} {1} {2}",
|
||||
multi.Address,
|
||||
multi.IsTransient ? "Transient" : "",
|
||||
multi.IsDnsEligible ? "DNS Eligible" : ""
|
||||
));
|
||||
}
|
||||
lstSocketInformation.Items.Add("");
|
||||
}
|
||||
UnicastIPAddressInformationCollection uniCast = adapterProperties.UnicastAddresses;
|
||||
if (uniCast != null)
|
||||
{
|
||||
string lifeTimeFormat = "dddd, MMMM dd, yyyy hh:mm:ss tt";
|
||||
foreach (UnicastIPAddressInformation uni in uniCast)
|
||||
{
|
||||
DateTime when;
|
||||
|
||||
lstSocketInformation.Items.Add(String.Format(" Unicast Address ......................... : {0}", uni.Address));
|
||||
lstSocketInformation.Items.Add(String.Format(" Prefix Origin ........................ : {0}", uni.PrefixOrigin));
|
||||
lstSocketInformation.Items.Add(String.Format(" Suffix Origin ........................ : {0}", uni.SuffixOrigin));
|
||||
lstSocketInformation.Items.Add(String.Format(" Duplicate Address Detection .......... : {0}",
|
||||
uni.DuplicateAddressDetectionState));
|
||||
|
||||
// Format the lifetimes as Sunday, February 16, 2003 11:33:44 PM
|
||||
// if en-us is the current culture.
|
||||
|
||||
// Calculate the date and time at the end of the lifetimes.
|
||||
when = DateTime.UtcNow + TimeSpan.FromSeconds(uni.AddressValidLifetime);
|
||||
when = when.ToLocalTime();
|
||||
lstSocketInformation.Items.Add(String.Format(" Valid Life Time ...................... : {0}",
|
||||
when.ToString(lifeTimeFormat, System.Globalization.CultureInfo.CurrentCulture)
|
||||
));
|
||||
when = DateTime.UtcNow + TimeSpan.FromSeconds(uni.AddressPreferredLifetime);
|
||||
when = when.ToLocalTime();
|
||||
lstSocketInformation.Items.Add(String.Format(" Preferred life time .................. : {0}",
|
||||
when.ToString(lifeTimeFormat, System.Globalization.CultureInfo.CurrentCulture)
|
||||
));
|
||||
|
||||
when = DateTime.UtcNow + TimeSpan.FromSeconds(uni.DhcpLeaseLifetime);
|
||||
when = when.ToLocalTime();
|
||||
lstSocketInformation.Items.Add(String.Format(" DHCP Leased Life Time ................ : {0}",
|
||||
when.ToString(lifeTimeFormat, System.Globalization.CultureInfo.CurrentCulture)
|
||||
));
|
||||
}
|
||||
lstSocketInformation.Items.Add("");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -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>
|
After Width: | Height: | Size: 894 B |