lanscape 1.3.7__py3-none-any.whl → 1.3.8__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.

@@ -5,7 +5,7 @@ API endpoints for subnet testing and listing.
5
5
  import traceback
6
6
  from flask import request, jsonify
7
7
  from lanscape.ui.blueprints.api import api_bp
8
- from lanscape.libraries.net_tools import get_all_network_subnets
8
+ from lanscape.libraries.net_tools import get_all_network_subnets, is_arp_supported
9
9
  from lanscape.libraries.ip_parser import parse_ip_input
10
10
  from lanscape.libraries.errors import SubnetTooLargeError
11
11
  from lanscape.libraries.scan_config import DEFAULT_CONFIGS
@@ -46,7 +46,26 @@ def list_subnet():
46
46
  def get_default_configs():
47
47
  """
48
48
  Get default scan configurations.
49
+
50
+ When active ARP lookups are not supported on the host system, adjust any
51
+ presets that rely on ``ARP_LOOKUP`` to use the ``POKE_THEN_ARP`` fallback
52
+ instead. This keeps presets such as ``accurate`` usable without requiring
53
+ frontend overrides.
49
54
  """
50
- return jsonify(
51
- {key: config.to_dict() for key, config in DEFAULT_CONFIGS.items()}
52
- )
55
+ arp_supported = is_arp_supported()
56
+
57
+ configs = {}
58
+ for key, config in DEFAULT_CONFIGS.items():
59
+ config_dict = config.to_dict()
60
+
61
+ if not arp_supported:
62
+ lookup_types = list(config_dict.get('lookup_type') or [])
63
+ if 'ARP_LOOKUP' in lookup_types:
64
+ lookup_types = [lt for lt in lookup_types if lt != 'ARP_LOOKUP']
65
+ if 'POKE_THEN_ARP' not in lookup_types:
66
+ lookup_types.append('POKE_THEN_ARP')
67
+ config_dict['lookup_type'] = lookup_types
68
+
69
+ configs[key] = config_dict
70
+
71
+ return jsonify(configs)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: lanscape
3
- Version: 1.3.7
3
+ Version: 1.3.8
4
4
  Summary: A python based local network scanner
5
5
  Author-email: Michael Dennis <michael@dipduo.com>
6
6
  License-Expression: MIT
@@ -32,7 +32,7 @@ lanscape/ui/blueprints/__init__.py,sha256=WLnPfPE06684wArgKDDLfsW-1hKFlLe75AR7uL
32
32
  lanscape/ui/blueprints/api/__init__.py,sha256=5Z4Y7B36O-bNFenpomfuNhPuJ9dW_MC0TPUU3pCFVfA,103
33
33
  lanscape/ui/blueprints/api/port.py,sha256=8FuNcjF56wmgjoCZeaYrIakTGdshAmDjUmkjXHbaZ8I,1981
34
34
  lanscape/ui/blueprints/api/scan.py,sha256=lbwV5AciMGP-S2J_EaXcPOHeHywImzQ_bm2ZSJg-H5U,3331
35
- lanscape/ui/blueprints/api/tools.py,sha256=Dm5eAlWajr670H3O6note5hS_BZ888IGp2Rsdu2kXmY,1670
35
+ lanscape/ui/blueprints/api/tools.py,sha256=IhY_ldrnVYuZKFv6gsevr9LL5gfTnmVuR95zFc05Tlo,2452
36
36
  lanscape/ui/blueprints/web/__init__.py,sha256=NvgnjP0X4LwqVhSEyh5RUzoG45N44kHK1MEFlfvBxTg,118
37
37
  lanscape/ui/blueprints/web/routes.py,sha256=883puFTHePUEgwS4a2-Co6-gdLwr5NbOx0goUck7054,3571
38
38
  lanscape/ui/static/lanscape.webmanifest,sha256=07CqA-PQsO35KJD8R96sI3Pxix6UuBjijPDCuy9vM3s,446
@@ -67,8 +67,8 @@ lanscape/ui/templates/scan/ip-table-row.html,sha256=RANDsfW4xBATdtiLrxUlRouFSjgw
67
67
  lanscape/ui/templates/scan/ip-table.html,sha256=CP7AG8WHOgy3AyYCIN0wA2wO6n0H1X0F9IOncQtpPvE,914
68
68
  lanscape/ui/templates/scan/overview.html,sha256=xWj9jWDPg2KcPLvS8fnSins23_UXjKCdb2NJwNG2U2Q,1176
69
69
  lanscape/ui/templates/scan/scan-error.html,sha256=wmAYQ13IJHUoO8fAGNDjMvNml7tu4rsIU3Vav71ETlA,999
70
- lanscape-1.3.7.dist-info/licenses/LICENSE,sha256=VLoE0IrNTIc09dFm7hMN0qzk4T3q8V0NaPcFQqMemDs,1070
71
- lanscape-1.3.7.dist-info/METADATA,sha256=LnolOeZTje0o-IA6t0RKBiGy3ygKc4EDREKfxNkjJvQ,3121
72
- lanscape-1.3.7.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
73
- lanscape-1.3.7.dist-info/top_level.txt,sha256=E9D4sjPz_6H7c85Ycy_pOS2xuv1Wm-ilKhxEprln2ps,9
74
- lanscape-1.3.7.dist-info/RECORD,,
70
+ lanscape-1.3.8.dist-info/licenses/LICENSE,sha256=VLoE0IrNTIc09dFm7hMN0qzk4T3q8V0NaPcFQqMemDs,1070
71
+ lanscape-1.3.8.dist-info/METADATA,sha256=zHjKdQjb2qNFHzqJrv_5OpAo10AFlT_8RCHfViunpvo,3121
72
+ lanscape-1.3.8.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
73
+ lanscape-1.3.8.dist-info/top_level.txt,sha256=E9D4sjPz_6H7c85Ycy_pOS2xuv1Wm-ilKhxEprln2ps,9
74
+ lanscape-1.3.8.dist-info/RECORD,,