portune 0.1.18__py3-none-any.whl → 0.1.19__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of portune might be problematic. Click here for more details.
- portune/portune.py +5 -5
- portune/version.py +2 -2
- {portune-0.1.18.dist-info → portune-0.1.19.dist-info}/METADATA +1 -1
- portune-0.1.19.dist-info/RECORD +9 -0
- portune-0.1.18.dist-info/RECORD +0 -9
- {portune-0.1.18.dist-info → portune-0.1.19.dist-info}/WHEEL +0 -0
- {portune-0.1.18.dist-info → portune-0.1.19.dist-info}/entry_points.txt +0 -0
- {portune-0.1.18.dist-info → portune-0.1.19.dist-info}/licenses/LICENSE +0 -0
- {portune-0.1.18.dist-info → portune-0.1.19.dist-info}/top_level.txt +0 -0
portune/portune.py
CHANGED
|
@@ -708,7 +708,7 @@ def parse_input_file(filename: str, info_command: Optional[str] = None) -> List[
|
|
|
708
708
|
hosts.append((fqdn, sorted(ports), desc))
|
|
709
709
|
return (hosts, desc_titles)
|
|
710
710
|
|
|
711
|
-
def ping_host(ip: str, timeout:
|
|
711
|
+
def ping_host(ip: str, timeout: int = 2) -> bool:
|
|
712
712
|
"""Test if a host responds to ICMP ping.
|
|
713
713
|
|
|
714
714
|
Uses the system ping command to check host availability. The command is
|
|
@@ -729,7 +729,7 @@ def ping_host(ip: str, timeout: float = 2.0) -> bool:
|
|
|
729
729
|
except Exception:
|
|
730
730
|
return False
|
|
731
731
|
|
|
732
|
-
def resolve_and_ping_host(hostname: str, timeout:
|
|
732
|
+
def resolve_and_ping_host(hostname: str, timeout: int = 2, noping: bool = False) -> Tuple[str, Dict[str, Union[str, bool]]]:
|
|
733
733
|
"""Resolve a hostname to IP and optionally check if it responds to ping.
|
|
734
734
|
|
|
735
735
|
Performs DNS resolution and ping check in a single function. For IP addresses,
|
|
@@ -776,7 +776,7 @@ def resolve_and_ping_host(hostname: str, timeout: float = 2.0, noping: bool = Fa
|
|
|
776
776
|
return hostname, {'ip': 'N/A', 'ping': False}
|
|
777
777
|
|
|
778
778
|
def ping_hosts(hosts: List[Tuple[str, List[int], str]],
|
|
779
|
-
timeout:
|
|
779
|
+
timeout: int = 2,
|
|
780
780
|
parallelism: int = 10,
|
|
781
781
|
noping: bool = False) -> Dict[str, Dict[str, Union[str, bool]]]:
|
|
782
782
|
"""Process DNS resolution and ping checks for multiple hosts in parallel.
|
|
@@ -839,7 +839,7 @@ def check_port(hostname: str,
|
|
|
839
839
|
port: int,
|
|
840
840
|
host_info: Dict[str, Union[str, bool]],
|
|
841
841
|
desc: list,
|
|
842
|
-
timeout:
|
|
842
|
+
timeout: int = 2) -> Tuple[str, str, int, str, bool]:
|
|
843
843
|
"""Check if a specific TCP port is accessible on a host.
|
|
844
844
|
|
|
845
845
|
Attempts to establish a TCP connection to the specified port. Uses pre-resolved
|
|
@@ -1482,7 +1482,7 @@ def format_table_output(
|
|
|
1482
1482
|
def main():
|
|
1483
1483
|
parser = argparse.ArgumentParser(description='Port accessibility report utility')
|
|
1484
1484
|
parser.add_argument('-p', '--parallelism', type=int, default=50, help='Number of parallel threads (default: 50)')
|
|
1485
|
-
parser.add_argument('-t', '--timeout', type=float, default=2
|
|
1485
|
+
parser.add_argument('-t', '--timeout', type=float, default=2, help='Timeout in seconds for port and ping checks (default: 2)')
|
|
1486
1486
|
parser.add_argument('-o', '--output', default=f'report_{HOSTNAME}.{time.strftime("%Y%m%d_%H%M%S")}.html', help='Output HTML report file')
|
|
1487
1487
|
parser.add_argument('-n', '--noping', action="store_true", help='No ping check')
|
|
1488
1488
|
parser.add_argument('-s', '--summary', action="store_true", help='Print scan summary information')
|
portune/version.py
CHANGED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
portune/__init__.py,sha256=RfXuNfHBqfRt_z4IukwN1a0oeCXahuMOO8_eBt4T8NM,58
|
|
2
|
+
portune/portune.py,sha256=2gx3Xvt9sPjK_JQZgelzhbt8ax6WQfXxsOuj1OtTZRc,67693
|
|
3
|
+
portune/version.py,sha256=-W-i-_6L24OJ73VmeltYID1xpUrwRUNYxZXkfU86ff0,513
|
|
4
|
+
portune-0.1.19.dist-info/licenses/LICENSE,sha256=gRJf0JPT_wsZJsUGlWPTS8Vypfl9vQ1qjp6sNbKykuA,1064
|
|
5
|
+
portune-0.1.19.dist-info/METADATA,sha256=My1iWiWBrwLO2w7mM0Udei24zKwAaDuC_tNOoUje_B4,2372
|
|
6
|
+
portune-0.1.19.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
7
|
+
portune-0.1.19.dist-info/entry_points.txt,sha256=6j7jAf5fOZrLPbVIs3z92R1tT891WyY9YxQ6OVnPKG0,80
|
|
8
|
+
portune-0.1.19.dist-info/top_level.txt,sha256=CITDikHhRKAsSOGmNJzD-xSp6D5iBhSr9ZS1qy8-SL0,8
|
|
9
|
+
portune-0.1.19.dist-info/RECORD,,
|
portune-0.1.18.dist-info/RECORD
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
portune/__init__.py,sha256=RfXuNfHBqfRt_z4IukwN1a0oeCXahuMOO8_eBt4T8NM,58
|
|
2
|
-
portune/portune.py,sha256=XqQeHUmdnrnaY4IrEz9Itnmdieu25Wjca0O0RbyzKs0,67713
|
|
3
|
-
portune/version.py,sha256=mhAYdSWzD7l6mXhR3foHESbkj_QM4Asoa3WlsLLYkfM,513
|
|
4
|
-
portune-0.1.18.dist-info/licenses/LICENSE,sha256=gRJf0JPT_wsZJsUGlWPTS8Vypfl9vQ1qjp6sNbKykuA,1064
|
|
5
|
-
portune-0.1.18.dist-info/METADATA,sha256=ZiJbxdsqQQ69_FPRnkzvCy6_52UGoFEoyiMjazDZUCE,2372
|
|
6
|
-
portune-0.1.18.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
7
|
-
portune-0.1.18.dist-info/entry_points.txt,sha256=6j7jAf5fOZrLPbVIs3z92R1tT891WyY9YxQ6OVnPKG0,80
|
|
8
|
-
portune-0.1.18.dist-info/top_level.txt,sha256=CITDikHhRKAsSOGmNJzD-xSp6D5iBhSr9ZS1qy8-SL0,8
|
|
9
|
-
portune-0.1.18.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|