Atc.Network is a C# library providing robust and flexible tools for network communication and scanning.
-
TcpClient/TcpServer: Establish and manage TCP network connections.
-
UdpClient/UdpServer: Establish and manage UDP network connections.
-
- IPScanner: A flexible tool to scan a range of IP addresses or a single IP address. It comes with various configuration options such as:
- ICMP Pinging
- Host Name Resolution
- MAC Address Resolution
- Vendor Identification from MAC Address
- Port Number Testing (None, Well-Known, Well-Known and Common, All)
A sample reference implementation can be found here
A sample reference implementation can be found here
The IPScanner can scan a range of IPAddresses or just a single IPAddress as specified in the IPScannerConfig.
- If
IcmpPing
is enabled the result for given IPAddress will contain a PingResult with network quality information. - If
ResolveHostName
is enabled the result for given IPAddress will contain the hostname if possible to resolve. - If
ResolveMacAddress
is enabled the result for given IPAddress will contain the mac-address if possible to resolve. - If
ResolveVendorFromMacAddress
is enabled the result for given IPAddress will contain the vendor name from the mac-address if possible to resolve. TreatOpenPortsAsWebServices
defines what kind of port numbers should be tested, the options are:None
,WellKnown
,WellKnownAndCommon
,All
var ipScannerConfig = new IPScannerConfig
{
IcmpPing = true,
ResolveHostName = true,
ResolveMacAddress = true,
ResolveVendorFromMacAddress = true,
TreatOpenPortsAsWebServices = IPServicePortExaminationLevel.WellKnown,
};
var ipScanner = new IPScanner(ipScannerConfig);
ipScanner.ProgressReporting += IpScannerOnProgressReporting;
var ipScanResults = await ipScanner.ScanRange(
IPAddress.Parse("192.168.0.1"),
IPAddress.Parse("192.168.0.254"),
CancellationToken.None);
var ipScannerConfig = new IPScannerConfig
{
IcmpPing = true,
ResolveHostName = true,
ResolveMacAddress = true,
ResolveVendorFromMacAddress = true,
TreatOpenPortsAsWebServices = IPServicePortExaminationLevel.None,
};
ipScannerConfig.PortNumbers = new List<ushort> { 21, 80, 8080 };
var ipScanner = new IPScanner(ipScannerConfig);
ipScanner.ProgressReporting += IpScannerOnProgressReporting;
var ipScanResults = await ipScanner.ScanRange(
IPAddress.Parse("192.168.0.1"),
IPAddress.Parse("192.168.0.254"),
CancellationToken.None);
var ipPortScan = new IPPortScan(IPAddress.Parse("192.168.0.27"));
var ipPortScanResult = await ipPortScan.CanConnectWithTcp(
80,
CancellationToken.None);
var ipPortScan = new IPPortScan(IPAddress.Parse("192.168.0.27"));
var ipPortScanResult = await ipPortScan.CanConnectWithHttp(
80,
CancellationToken.None);