1
- from typing import Any , Callable , Iterable , Iterator , Text , TypeVar
1
+ from collections .abc import Callable , Iterable , Iterator
2
+ from typing import Any , TypeVar
2
3
from typing_extensions import TypeAlias , TypedDict
3
4
4
5
_T = TypeVar ("_T" )
@@ -49,13 +50,13 @@ class _ResultHostPort(TypedDict):
49
50
50
51
__last_modification__ : str
51
52
52
- class PortScanner ( object ) :
53
+ class PortScanner :
53
54
def __init__ (self , nmap_search_path : Iterable [str ] = ...) -> None : ...
54
- def get_nmap_last_output (self ) -> Text : ...
55
+ def get_nmap_last_output (self ) -> str : ...
55
56
def nmap_version (self ) -> tuple [int , int ]: ...
56
57
def listscan (self , hosts : str = ...) -> list [str ]: ...
57
58
def scan (
58
- self , hosts : Text = ..., ports : Text | None = ..., arguments : Text = ..., sudo : bool = ..., timeout : int = ...
59
+ self , hosts : str = ..., ports : str | None = ..., arguments : str = ..., sudo : bool = ..., timeout : int = ...
59
60
) -> _Result : ...
60
61
def analyse_nmap_xml_scan (
61
62
self ,
@@ -64,7 +65,7 @@ class PortScanner(object):
64
65
nmap_err_keep_trace : str = ...,
65
66
nmap_warn_keep_trace : str = ...,
66
67
) -> _Result : ...
67
- def __getitem__ (self , host : Text ) -> PortScannerHostDict : ...
68
+ def __getitem__ (self , host : str ) -> PortScannerHostDict : ...
68
69
def all_hosts (self ) -> list [str ]: ...
69
70
def command_line (self ) -> str : ...
70
71
def scaninfo (self ) -> _ResultNmapInfo : ...
@@ -73,17 +74,17 @@ class PortScanner(object):
73
74
def csv (self ) -> str : ...
74
75
75
76
def __scan_progressive__ (
76
- self : object , hosts : Text , ports : Text , arguments : Text , callback : _Callback | None , sudo : bool , timeout : int
77
+ self : object , hosts : str , ports : str , arguments : str , callback : _Callback | None , sudo : bool , timeout : int
77
78
) -> None : ...
78
79
79
- class PortScannerAsync ( object ) :
80
+ class PortScannerAsync :
80
81
def __init__ (self ) -> None : ...
81
82
def __del__ (self ) -> None : ...
82
83
def scan (
83
84
self ,
84
- hosts : Text = ...,
85
- ports : Text | None = ...,
86
- arguments : Text = ...,
85
+ hosts : str = ...,
86
+ ports : str | None = ...,
87
+ arguments : str = ...,
87
88
callback : _Callback | None = ...,
88
89
sudo : bool = ...,
89
90
timeout : int = ...,
0 commit comments