Repository navigation
Expand file tree
/
Copy pathPortScannerOptions.cs
More file actions
65 lines (54 loc) · 2.36 KB
/
Copy pathPortScannerOptions.cs
File metadata and controls
65 lines (54 loc) · 2.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
namespace NETworkManager.Models.Network;
/// <summary>
/// Class contains the options for the port scanner.
/// </summary>
public record PortScannerOptions
{
/// <summary>
/// Adjust the number of hosts and ports scanned at the same time to the scan (see
/// <see cref="PortScanner" />) instead of using <see cref="MaxHostThreads" /> and <see cref="MaxPortThreads" />.
/// </summary>
public required bool AutoAdjustThreads { get; init; }
/// <summary>
/// Max concurrent threads for the host scan (if the threads are not adjusted automatically).
/// </summary>
public required int MaxHostThreads { get; init; }
/// <summary>
/// Max concurrent threads for the port scan of each host (if the threads are not adjusted automatically).
/// </summary>
public required int MaxPortThreads { get; init; }
/// <summary>
/// Timeout in ms after which the port is considered closed.
/// </summary>
public required int Timeout { get; init; }
/// <summary>
/// Number of attempts to connect to a port if there was no answer (timed out).
/// </summary>
public required int Attempts { get; init; }
/// <summary>
/// Ping every host before its ports are scanned (with <see cref="ICMPAttempts" />, <see cref="ICMPTimeout" /> and
/// <see cref="ICMPBuffer" />), a host that doesn't answer is not scanned.
/// </summary>
public required bool PingHostsBeforeScan { get; init; }
/// <summary>
/// Number of pings before the scan if there was no answer (see <see cref="PingHostsBeforeScan" />).
/// </summary>
public required int ICMPAttempts { get; init; }
/// <summary>
/// Timeout in milliseconds after which a ping before the scan is considered lost (see
/// <see cref="PingHostsBeforeScan" />).
/// </summary>
public required int ICMPTimeout { get; init; }
/// <summary>
/// Data sent with the ping before the scan (see <see cref="PingHostsBeforeScan" />).
/// </summary>
public required byte[] ICMPBuffer { get; init; }
/// <summary>
/// Resolve the hostname for an IP address.
/// </summary>
public required bool ResolveHostname { get; init; }
/// <summary>
/// Include closed ports in the result.
/// </summary>
public required bool ShowAllResults { get; init; }
}