lanscape 2.0.0a2__py3-none-any.whl → 2.0.1a1__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 lanscape might be problematic. Click here for more details.

@@ -156,7 +156,7 @@ class ArpLookup():
156
156
  NOTE: This lookup method requires elevated privileges to access the ARP cache.
157
157
 
158
158
 
159
- [Arp Lookup Requirements](/support/arp-issues.md)
159
+ [Arp Lookup Requirements](/docs/arp-issues.md)
160
160
  """
161
161
 
162
162
  @classmethod
@@ -10,7 +10,6 @@ This module provides utilities for parsing various IP address formats including:
10
10
  It also includes validation to prevent processing excessively large IP ranges.
11
11
  """
12
12
  import ipaddress
13
- import re
14
13
 
15
14
  from lanscape.core.errors import SubnetTooLargeError
16
15
 
@@ -50,14 +49,10 @@ def parse_ip_input(ip_input):
50
49
  for ip in net.hosts():
51
50
  ip_ranges.append(ip)
52
51
 
53
- # Handle IP range (e.g., 10.0.0.15-10.0.0.25)
52
+ # Handle IP range (e.g., 10.0.0.15-10.0.0.25) and (e.g., 10.0.9.1-253)
54
53
  elif '-' in entry:
55
54
  ip_ranges += parse_ip_range(entry)
56
55
 
57
- # Handle shorthand IP range (e.g., 10.0.9.1-253)
58
- elif re.search(r'\d+\-\d+', entry):
59
- ip_ranges += parse_shorthand_ip_range(entry)
60
-
61
56
  # If no CIDR or range, assume a single IP
62
57
  else:
63
58
  ip_ranges.append(ipaddress.IPv4Address(entry))
@@ -106,25 +101,6 @@ def parse_ip_range(entry):
106
101
  return list(ip_range_to_list(start_ip, end_ip))
107
102
 
108
103
 
109
- def parse_shorthand_ip_range(entry):
110
- """
111
- Parse a shorthand IP range (e.g., 192.168.1.1-10).
112
-
113
- In this format, only the last octet of the end IP is specified.
114
-
115
- Args:
116
- entry (str): String containing a shorthand IP range
117
-
118
- Returns:
119
- list: List of IPv4Address objects in the range (inclusive)
120
- """
121
- start_ip, end_part = entry.split('-')
122
- start_ip = ipaddress.IPv4Address(start_ip.strip())
123
- end_ip = start_ip.exploded.rsplit('.', 1)[0] + '.' + end_part.strip()
124
-
125
- return list(ip_range_to_list(start_ip, ipaddress.IPv4Address(end_ip)))
126
-
127
-
128
104
  def ip_range_to_list(start_ip, end_ip):
129
105
  """
130
106
  Convert an IP range defined by start and end addresses to a list of addresses.
@@ -2,7 +2,6 @@
2
2
  """
3
3
 
4
4
  from typing import Optional, Union
5
- import sys
6
5
  import asyncio
7
6
  import logging
8
7
  import traceback
@@ -10,6 +9,9 @@ import traceback
10
9
  from lanscape.core.app_scope import ResourceManager
11
10
  from lanscape.core.scan_config import ServiceScanConfig, ServiceScanStrategy
12
11
 
12
+ # asyncio complains more than it needs to
13
+ logging.getLogger("asyncio").setLevel(logging.WARNING)
14
+
13
15
  log = logging.getLogger('ServiceScan')
14
16
  SERVICES = ResourceManager('services').get_jsonc('definitions.jsonc')
15
17
 
@@ -183,22 +185,3 @@ def scan_service(ip: str, port: int, cfg: ServiceScanConfig) -> str:
183
185
 
184
186
  # Use asyncio.run to execute the asynchronous logic synchronously
185
187
  return asyncio.run(_async_scan_service(ip, port, cfg=cfg))
186
-
187
-
188
- def asyncio_logger_suppression():
189
- """Suppress the noisy asyncio transport errors since they are expected in service scanning."""
190
-
191
- # Reduce noisy asyncio transport errors on Windows by switching to Selector policy
192
- if sys.platform.startswith("win"):
193
- try:
194
- asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())
195
- except Exception:
196
- pass
197
- # Also tone down asyncio logger noise from transport callbacks
198
- try:
199
- logging.getLogger("asyncio").setLevel(logging.WARNING)
200
- except Exception:
201
- pass
202
-
203
-
204
- asyncio_logger_suppression()
@@ -56,7 +56,7 @@
56
56
  data-bs-toggle="tooltip"
57
57
  data-bs-placement="top"
58
58
  title="ARP lookup is not supported on this system, click for more info"
59
- onclick="window.open('https://github.com/mdennis281/LANscape/blob/main/support/arp-issues.md', '_blank')"
59
+ onclick="window.open('https://github.com/mdennis281/LANscape/blob/main/docs/arp-issues.md', '_blank')"
60
60
  >
61
61
  help
62
62
  </span>
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: lanscape
3
- Version: 2.0.0a2
3
+ Version: 2.0.1a1
4
4
  Summary: A python based local network scanner
5
5
  Author-email: Michael Dennis <michael@dipduo.com>
6
6
  License-Expression: MIT
@@ -88,7 +88,7 @@ I use a combination of ARP, ICMP & port testing to determine if a device is onli
88
88
  Recommendations:
89
89
 
90
90
  - Adjust scan configuration
91
- - Configure ARP lookup [ARP lookup setup](./support/arp-issues.md)
91
+ - Configure ARP lookup [ARP lookup setup](./docs/arp-issues.md)
92
92
  - Create a bug
93
93
 
94
94
 
@@ -3,16 +3,16 @@ lanscape/__main__.py,sha256=PuY42yuCLAwHrOREJ6u2DgVyGX5hZKRQeoE9pajkNfM,170
3
3
  lanscape/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
4
  lanscape/core/app_scope.py,sha256=qfzX8Ed4bFdxHMGjgnLlWuLZDTCBKObermz91KbGVn0,3298
5
5
  lanscape/core/decorators.py,sha256=CZbPEfnLS1OF-uejQweetadzqf0pVo736jKko4Xs-g4,7264
6
- lanscape/core/device_alive.py,sha256=YUppwI_SwCRlOz1zVs_GiyBbFD1srIIomIpclrFETAw,6836
6
+ lanscape/core/device_alive.py,sha256=TC6c5uR-2xwT8IXcRA3NAPJ9iPhdVx9a42bGSKq9N6w,6833
7
7
  lanscape/core/errors.py,sha256=QTf42UzR9Zxj1t1mdwfLvZIp0c9a5EItELOdCR7kTmE,1322
8
- lanscape/core/ip_parser.py,sha256=yCHAe7d8YIEw0yC8GEHyLTXFTD9l4pYnMWllkNsDDi4,4196
8
+ lanscape/core/ip_parser.py,sha256=kn5H4ERitLnreRAqifWphwbxdjItGqwu50lsMCPDMcA,3474
9
9
  lanscape/core/logger.py,sha256=nzo6J8UdlMdhRkOJEDOIHKztoE3Du8PQZad7ixvNgeM,2534
10
10
  lanscape/core/mac_lookup.py,sha256=PxBSMe3wEVDtivCsh5NclSAguZz9rqdAS7QshBiuWvM,3519
11
11
  lanscape/core/net_tools.py,sha256=W-yyQ05k6BJc8VOnOi9_hpVD2G8i5HuQ_A39O8qk30Y,19676
12
12
  lanscape/core/port_manager.py,sha256=3_ROOb6JEiB0NByZVtADuGcldFkgZwn1RKtvwgs9AIk,4479
13
13
  lanscape/core/runtime_args.py,sha256=2vIqRrcWr-NHRSBlZGrxh1PdkPY0ytkPguu8KZqy2L8,2543
14
14
  lanscape/core/scan_config.py,sha256=A2ZKXqXKW9nrP6yLb7b9b3XqSY_cQB3LZ5K0LVCSebE,11114
15
- lanscape/core/service_scan.py,sha256=kkJUcAc326kOCVou0TPKCHlh32awioYw6jiaGHix31E,6948
15
+ lanscape/core/service_scan.py,sha256=wTDxOdazOsbI0hwCBR__4UCmB2RIbl2pw3F2YUW9aaE,6428
16
16
  lanscape/core/subnet_scan.py,sha256=IegcrpzevL2zMf1fuvCqegUGCBXtO3iAI49aCweXmvw,14444
17
17
  lanscape/core/version_manager.py,sha256=eGjyKgsv31QO0W26se9pPQ1TwmEN8qn37dHULtoocqc,2841
18
18
  lanscape/core/web_browser.py,sha256=23MuGIrBYdGhw6ejj6OWxwReeKIlWhtWukc1dKV_3_0,6736
@@ -62,16 +62,16 @@ lanscape/ui/templates/scan.html,sha256=00QX2_1S_1wGzk42r00LjEkJvoioCLs6JgjOibi6r
62
62
  lanscape/ui/templates/shutdown.html,sha256=iXVCq2yl5TjZfNFl4esbDJra3gJA2VQpae0jj4ipy9w,701
63
63
  lanscape/ui/templates/core/head.html,sha256=eZiebt24xYd_NALe-fFL25rb4uFjUrF4XJjxFH61MgM,779
64
64
  lanscape/ui/templates/core/scripts.html,sha256=rSRi4Ut8iejajMPhOc5bzEz-Z3EHxpj_3PxwwyyhmTQ,640
65
- lanscape/ui/templates/scan/config.html,sha256=ec7EptfdgssKhHDSp_c06xYq7Deyhdu6a5XadLHw58I,14607
65
+ lanscape/ui/templates/scan/config.html,sha256=nmk7Vn-9sXrTDJxSSR7JbCUJEVVadXSMji7LJv2tzKQ,14604
66
66
  lanscape/ui/templates/scan/device-detail.html,sha256=Yo4t4S5tkOboMQ3b0y-dHlTJIp6_Zb--9iopyQjNMSc,4825
67
67
  lanscape/ui/templates/scan/export.html,sha256=Nvs_unojzT3qhN_ZnEgYHou2C9wqWGr3dVr2UiLnYjY,749
68
68
  lanscape/ui/templates/scan/ip-table-row.html,sha256=nO5ZMhl3Gnlc8lg5nWmE05_6_5oz9ZfVCDUOgegVGpg,1267
69
69
  lanscape/ui/templates/scan/ip-table.html,sha256=AT2ZvCPYdKl-XJiAkEAawPOVuQw-w0MXumGQTr3zyKM,926
70
70
  lanscape/ui/templates/scan/overview.html,sha256=xWj9jWDPg2KcPLvS8fnSins23_UXjKCdb2NJwNG2U2Q,1176
71
71
  lanscape/ui/templates/scan/scan-error.html,sha256=wmAYQ13IJHUoO8fAGNDjMvNml7tu4rsIU3Vav71ETlA,999
72
- lanscape-2.0.0a2.dist-info/licenses/LICENSE,sha256=VLoE0IrNTIc09dFm7hMN0qzk4T3q8V0NaPcFQqMemDs,1070
73
- lanscape-2.0.0a2.dist-info/METADATA,sha256=ArqLYoFvGuLx6lx-ODdqxcxkmW83XfqvQJGGFBmpgDY,3489
74
- lanscape-2.0.0a2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
75
- lanscape-2.0.0a2.dist-info/entry_points.txt,sha256=evxSxUikFa1OEd4e0Boky9sLH87HdgM0YqB_AbB2HYc,51
76
- lanscape-2.0.0a2.dist-info/top_level.txt,sha256=E9D4sjPz_6H7c85Ycy_pOS2xuv1Wm-ilKhxEprln2ps,9
77
- lanscape-2.0.0a2.dist-info/RECORD,,
72
+ lanscape-2.0.1a1.dist-info/licenses/LICENSE,sha256=VLoE0IrNTIc09dFm7hMN0qzk4T3q8V0NaPcFQqMemDs,1070
73
+ lanscape-2.0.1a1.dist-info/METADATA,sha256=9knsdho7VVTkyArjKZitij6-qb0VBGSMGAV7_ktveI8,3486
74
+ lanscape-2.0.1a1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
75
+ lanscape-2.0.1a1.dist-info/entry_points.txt,sha256=evxSxUikFa1OEd4e0Boky9sLH87HdgM0YqB_AbB2HYc,51
76
+ lanscape-2.0.1a1.dist-info/top_level.txt,sha256=E9D4sjPz_6H7c85Ycy_pOS2xuv1Wm-ilKhxEprln2ps,9
77
+ lanscape-2.0.1a1.dist-info/RECORD,,