PortScanner class Null safety

Scans open port for a target Address or domain.

Constructors

PortScanner()

Properties

hashCode int
The hash code for this object.
read-onlyinherited
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

connectToPort({required String address, required int port, required Duration timeout, required StreamController<ActiveHost> activeHostsController, int recursionCount = 0}) Future<ActiveHost?>
customDiscover(String target, {List<int> portList = commonPorts, ProgressCallback? progressCallback, Duration timeout = const Duration(milliseconds: 2000), bool resultsInAddressAscendingOrder = true}) Stream<ActiveHost>
Scans ports only listed in portList for a target. Progress can be retrieved by progressCallback Tries connecting ports before until timeout reached. resultsInAddressAscendingOrder = false will return results faster but not in ascending order and without progressCallback.
isOpen(String target, int port, {Duration timeout = const Duration(milliseconds: 2000)}) Future<ActiveHost?>
Checks if the single port is open or not for the target.
scanPortsForSingleDevice(String target, {int startPort = defaultStartPort, int endPort = defaultEndPort, ProgressCallback? progressCallback, Duration timeout = const Duration(milliseconds: 2000), bool resultsInAddressAscendingOrder = true}) Stream<ActiveHost>
Scans port from startPort to endPort of target. Progress can be retrieved by progressCallback Tries connecting ports before until timeout reached.

Constants

commonPorts → const List<int>
[20, 21, 22, 23, 25, 50, 51, 53, 67, 68, 69, 80, 110, 119, 123, 135, 139, 143, 161, 162, 389, 443, 989, 990, 3389]
defaultEndPort → const int
1024
defaultStartPort → const int
1