PortScannerService class abstract

Scans open port for a target Address or domain.

Constructors

PortScannerService()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

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, bool async = false}) 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.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
scanPortsForSingleDevice(String target, {int startPort = defaultStartPort, int endPort = defaultEndPort, ProgressCallback? progressCallback, Duration timeout = const Duration(milliseconds: 2000), bool resultsInAddressAscendingOrder = true, bool async = false}) Stream<ActiveHost>
Scans port from startPort to endPort of target. Progress can be retrieved by progressCallback Tries connecting ports before until timeout reached.
toString() String
A string representation of this object.
inherited

Operators

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

Static Properties

instance PortScannerService
no setter

Constants

commonPorts → const List<int>
defaultEndPort → const int
defaultStartPort → const int