portune 0.1.17__tar.gz → 0.1.19__tar.gz

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.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: portune
3
- Version: 0.1.17
3
+ Version: 0.1.19
4
4
  Summary: Simple Python HTTP Exec Server
5
5
  Author: Franck Jouvanceau
6
6
  Maintainer: Franck Jouvanceau
@@ -36,6 +36,7 @@ Dynamic: license-file
36
36
  [![Licence](https://img.shields.io/badge/licence-MIT-blue.svg)](https://shields.io/)
37
37
  [![](https://pepy.tech/badge/portune)](https://pepy.tech/project/portune)
38
38
  [![Python versions](https://img.shields.io/badge/python-3.9+-blue.svg)](https://shields.io/)
39
+ [![bash](https://img.shields.io/badge/OS-Windows%20|Linux%20|%20macOS%20|%20SunOS%20|%20AIX%20|%20HP_UX%20...-blue.svg)]()
39
40
 
40
41
  # portune
41
42
 
@@ -3,6 +3,7 @@
3
3
  [![Licence](https://img.shields.io/badge/licence-MIT-blue.svg)](https://shields.io/)
4
4
  [![](https://pepy.tech/badge/portune)](https://pepy.tech/project/portune)
5
5
  [![Python versions](https://img.shields.io/badge/python-3.9+-blue.svg)](https://shields.io/)
6
+ [![bash](https://img.shields.io/badge/OS-Windows%20|Linux%20|%20macOS%20|%20SunOS%20|%20AIX%20|%20HP_UX%20...-blue.svg)]()
6
7
 
7
8
  # portune
8
9
 
@@ -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: float = 2.0) -> bool:
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: float = 2.0, noping: bool = False) -> Tuple[str, Dict[str, Union[str, bool]]]:
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: float = 2.0,
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: float = 2.0) -> Tuple[str, str, int, str, bool]:
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
@@ -1279,7 +1279,8 @@ def generate_html_report(
1279
1279
  <th>Port</th>
1280
1280
  <th>Status</th>
1281
1281
  <th>Ping</th>
1282
- {"\n".join([f"<th>{d}</th>" for d in desc_titles])}
1282
+ {"""
1283
+ """.join([f"<th>{d}</th>" for d in desc_titles])}
1283
1284
  </tr>
1284
1285
  </thead>
1285
1286
  <tbody>
@@ -1301,7 +1302,8 @@ def generate_html_report(
1301
1302
  <td style="text-align: right;">{port}</td>
1302
1303
  <td style="text-align: center;"><span class="{status_class} status">{escape(status)}</span></td>
1303
1304
  <td style="text-align: center;"><span class="{ping_class} ping">{ping_status}</span></td>
1304
- {"\n".join([f'<td class="desc">{escape(desc[i] if i < len(desc) else "")}</td>' for i in range(len(desc_titles))])}
1305
+ {"""
1306
+ """.join([f'<td class="desc">{escape(desc[i] if i < len(desc) else "")}</td>' for i in range(len(desc_titles))])}
1305
1307
  </tr>
1306
1308
  ''')
1307
1309
 
@@ -1480,7 +1482,7 @@ def format_table_output(
1480
1482
  def main():
1481
1483
  parser = argparse.ArgumentParser(description='Port accessibility report utility')
1482
1484
  parser.add_argument('-p', '--parallelism', type=int, default=50, help='Number of parallel threads (default: 50)')
1483
- parser.add_argument('-t', '--timeout', type=float, default=2.0, help='Timeout in seconds for port and ping checks (default: 2.0)')
1485
+ parser.add_argument('-t', '--timeout', type=float, default=2, help='Timeout in seconds for port and ping checks (default: 2)')
1484
1486
  parser.add_argument('-o', '--output', default=f'report_{HOSTNAME}.{time.strftime("%Y%m%d_%H%M%S")}.html', help='Output HTML report file')
1485
1487
  parser.add_argument('-n', '--noping', action="store_true", help='No ping check')
1486
1488
  parser.add_argument('-s', '--summary', action="store_true", help='Print scan summary information')
@@ -17,5 +17,5 @@ __version__: str
17
17
  __version_tuple__: VERSION_TUPLE
18
18
  version_tuple: VERSION_TUPLE
19
19
 
20
- __version__ = version = '0.1.17'
21
- __version_tuple__ = version_tuple = (0, 1, 17)
20
+ __version__ = version = '0.1.19'
21
+ __version_tuple__ = version_tuple = (0, 1, 19)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: portune
3
- Version: 0.1.17
3
+ Version: 0.1.19
4
4
  Summary: Simple Python HTTP Exec Server
5
5
  Author: Franck Jouvanceau
6
6
  Maintainer: Franck Jouvanceau
@@ -36,6 +36,7 @@ Dynamic: license-file
36
36
  [![Licence](https://img.shields.io/badge/licence-MIT-blue.svg)](https://shields.io/)
37
37
  [![](https://pepy.tech/badge/portune)](https://pepy.tech/project/portune)
38
38
  [![Python versions](https://img.shields.io/badge/python-3.9+-blue.svg)](https://shields.io/)
39
+ [![bash](https://img.shields.io/badge/OS-Windows%20|Linux%20|%20macOS%20|%20SunOS%20|%20AIX%20|%20HP_UX%20...-blue.svg)]()
39
40
 
40
41
  # portune
41
42
 
File without changes
File without changes
File without changes
File without changes
File without changes