lanscape 1.2.6a12__py3-none-any.whl → 1.2.7a1__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.
@@ -1,5 +1,6 @@
1
1
  import re
2
2
  import json
3
+ import logging
3
4
  import platform
4
5
  import subprocess
5
6
  from typing import Optional
@@ -8,6 +9,8 @@ from .app_scope import ResourceManager
8
9
 
9
10
  DB = json.loads(ResourceManager('mac_addresses').get('mac_db.json'))
10
11
 
12
+ log = logging.getLogger('MacLookup')
13
+
11
14
 
12
15
  def lookup_mac(mac: str) -> str:
13
16
  """
@@ -22,8 +25,11 @@ def lookup_mac(mac: str) -> str:
22
25
  def get_mac(ip: str) -> Optional[str]:
23
26
  """Try to get the MAC address using Scapy, fallback to ARP if it fails."""
24
27
  if mac := get_mac_by_scapy(ip):
28
+ log.debug(f"Used Scapy to resolve ip {ip} to mac {mac}")
25
29
  return mac
26
- return get_mac_by_arp(ip)
30
+ arp = get_mac_by_arp(ip)
31
+ log.debug(f"Used ARP to resolve ip {ip} to mac {arp}")
32
+ return arp
27
33
 
28
34
  def get_mac_by_arp(ip: str) -> Optional[str]:
29
35
  """Retrieve the last MAC address instance using the ARP command."""
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: lanscape
3
- Version: 1.2.6a12
3
+ Version: 1.2.7a1
4
4
  Summary: A python based local network scanner
5
5
  Author-email: Michael Dennis <michael@dipduo.com>
6
6
  Project-URL: Homepage, https://github.com/mdennis281/py-lanscape
@@ -5,7 +5,7 @@ lanscape/libraries/decorators.py,sha256=Birxor-ae-CQRlBVOyB5DggHnuMQR98IYZ1FVHdG
5
5
  lanscape/libraries/errors.py,sha256=zvfqvJbIUsUWsEmw6XmUWXZsktbVachGIkYOdo1nR8s,447
6
6
  lanscape/libraries/ip_parser.py,sha256=LIjpNkF-ovlTsBxnuTJEWYYy06VdGuuS_lEIc6_PZnQ,2239
7
7
  lanscape/libraries/logger.py,sha256=hGbnj1cTGZT5elwdXUBVyLg_E2Pnocs2IfWumUkHj7M,1385
8
- lanscape/libraries/mac_lookup.py,sha256=Bos6gIDVC-WVvBTim8pZML_Qm339_149pouJEhbbkbk,1924
8
+ lanscape/libraries/mac_lookup.py,sha256=JfiGYVdrFNiU5TO0YEllLgsShXeV505WjAiV7gZdm5Y,2121
9
9
  lanscape/libraries/net_tools.py,sha256=FVGsId4C9Or9jF1HceVgVteNXRPge67UuxfgIaY-Gqo,8685
10
10
  lanscape/libraries/port_manager.py,sha256=fNext3FNfGnGYRZK9RhTEwQ2K0e0YmmMlhK4zVAvoCw,1977
11
11
  lanscape/libraries/runtime_args.py,sha256=Ksu9xb4zyVl2RRBSus_-c9UrbU5A3XFmDxHrUeTUwdw,1670
@@ -64,8 +64,8 @@ lanscape/ui/templates/scan/ip-table-row.html,sha256=ptY24rxJRaA4PEEQRDncaq6Q0ql5
64
64
  lanscape/ui/templates/scan/ip-table.html,sha256=ds__UP9JiTKf5IxCmTMzw--eN_yg1Pvn3Nj1KvQxeZg,940
65
65
  lanscape/ui/templates/scan/overview.html,sha256=Q0gmkVI-xNLZ-zWA9qm4H14cv_eF_bQs1KYPyAaoHLY,1141
66
66
  lanscape/ui/templates/scan/scan-error.html,sha256=Q4eZM5ThrxnFaWOSTUpK8hA2ksHwhxOBTaVUCLALhyA,1032
67
- lanscape-1.2.6a12.dist-info/LICENSE,sha256=cCO-NbS01Ilwc6djHjZ7LIgPFRkRmWdr0fH2ysXKioA,1090
68
- lanscape-1.2.6a12.dist-info/METADATA,sha256=1YGnaSLy-S-p5zX-FCd_rJCWEmZjmYCmRPdmi8TfX4I,2630
69
- lanscape-1.2.6a12.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
70
- lanscape-1.2.6a12.dist-info/top_level.txt,sha256=E9D4sjPz_6H7c85Ycy_pOS2xuv1Wm-ilKhxEprln2ps,9
71
- lanscape-1.2.6a12.dist-info/RECORD,,
67
+ lanscape-1.2.7a1.dist-info/LICENSE,sha256=cCO-NbS01Ilwc6djHjZ7LIgPFRkRmWdr0fH2ysXKioA,1090
68
+ lanscape-1.2.7a1.dist-info/METADATA,sha256=aZmb3CaDgG6IDGpcukigaQMZ8Vp6D3MmyPe82kl8Zqg,2629
69
+ lanscape-1.2.7a1.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
70
+ lanscape-1.2.7a1.dist-info/top_level.txt,sha256=E9D4sjPz_6H7c85Ycy_pOS2xuv1Wm-ilKhxEprln2ps,9
71
+ lanscape-1.2.7a1.dist-info/RECORD,,