lanscape 1.2.5a2__py3-none-any.whl → 1.2.6a2__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.
Files changed (46) hide show
  1. lanscape/tests/__init__.py +2 -1
  2. lanscape/tests/_helpers.py +5 -1
  3. lanscape/tests/test_webview.py +3 -3
  4. {lanscape-1.2.5a2.dist-info → lanscape-1.2.6a2.dist-info}/METADATA +72 -72
  5. lanscape-1.2.6a2.dist-info/RECORD +36 -0
  6. {lanscape-1.2.5a2.dist-info → lanscape-1.2.6a2.dist-info}/WHEEL +2 -1
  7. lanscape-1.2.6a2.dist-info/top_level.txt +1 -0
  8. lanscape/resources/mac_addresses/mac-vendors-export.csv +0 -51702
  9. lanscape/resources/mac_addresses/mac_db.json +0 -51668
  10. lanscape/resources/ports/full.json +0 -65537
  11. lanscape/resources/ports/large.json +0 -6087
  12. lanscape/resources/ports/medium.json +0 -150
  13. lanscape/resources/ports/service-names-port-numbers.csv +0 -15097
  14. lanscape/resources/ports/small.json +0 -22
  15. lanscape/ui/static/css/style.css +0 -715
  16. lanscape/ui/static/img/ico/android-chrome-192x192.png +0 -0
  17. lanscape/ui/static/img/ico/android-chrome-512x512.png +0 -0
  18. lanscape/ui/static/img/ico/apple-touch-icon.png +0 -0
  19. lanscape/ui/static/img/ico/favicon-16x16.png +0 -0
  20. lanscape/ui/static/img/ico/favicon-32x32.png +0 -0
  21. lanscape/ui/static/img/ico/favicon.ico +0 -0
  22. lanscape/ui/static/img/ico/site.webmanifest +0 -1
  23. lanscape/ui/static/img/readme1.png +0 -0
  24. lanscape/ui/static/js/core.js +0 -39
  25. lanscape/ui/static/js/layout-sizing.js +0 -31
  26. lanscape/ui/static/js/main.js +0 -208
  27. lanscape/ui/static/js/quietReload.js +0 -23
  28. lanscape/ui/static/js/shutdown-server.js +0 -17
  29. lanscape/ui/static/js/subnet-info.js +0 -19
  30. lanscape/ui/static/js/subnet-selector.js +0 -9
  31. lanscape/ui/static/lanscape.webmanifest +0 -19
  32. lanscape/ui/templates/base.html +0 -47
  33. lanscape/ui/templates/core/head.html +0 -10
  34. lanscape/ui/templates/core/scripts.html +0 -5
  35. lanscape/ui/templates/error.html +0 -35
  36. lanscape/ui/templates/info.html +0 -67
  37. lanscape/ui/templates/main.html +0 -89
  38. lanscape/ui/templates/scan/export.html +0 -27
  39. lanscape/ui/templates/scan/ip-table-row.html +0 -103
  40. lanscape/ui/templates/scan/ip-table.html +0 -26
  41. lanscape/ui/templates/scan/overview.html +0 -28
  42. lanscape/ui/templates/scan/scan-error.html +0 -33
  43. lanscape/ui/templates/scan.html +0 -14
  44. lanscape/ui/templates/shutdown.html +0 -23
  45. lanscape-1.2.5a2.dist-info/RECORD +0 -72
  46. {lanscape-1.2.5a2.dist-info/licenses → lanscape-1.2.6a2.dist-info}/LICENSE +0 -0
@@ -1,4 +1,5 @@
1
1
  from .test_api import ApiTestCase
2
2
  from .test_env import EnvTestCase
3
3
  from .test_library import LibraryTestCase
4
- from .test_webview import WebViewTestCase
4
+ from .test_webview import WebViewTestCase
5
+
@@ -2,6 +2,8 @@
2
2
  from ..libraries.ip_parser import get_address_count
3
3
  import webview, time
4
4
 
5
+ import warnings
6
+
5
7
  from concurrent.futures import ThreadPoolExecutor, Future
6
8
  def right_size_subnet(subnet: str):
7
9
  """
@@ -20,7 +22,6 @@ def webview_client(title, url):
20
22
  def wrapper(*args, **kwargs):
21
23
  baseclass = args[0]
22
24
 
23
- # Create the WebView window
24
25
  window = webview.create_window(title, url)
25
26
 
26
27
  # Create a Future object to communicate results/exceptions
@@ -28,6 +29,9 @@ def webview_client(title, url):
28
29
 
29
30
  # Define the function to run in the secondary thread
30
31
  def test_function():
32
+ # disable resource warning occuring in py >=3.13
33
+ warnings.filterwarnings("ignore", category=ResourceWarning)
34
+
31
35
  try:
32
36
  # Call the decorated function
33
37
  func(baseclass, window, **kwargs)
@@ -1,16 +1,16 @@
1
1
  import webview
2
2
  from ._helpers import webview_client
3
3
  import unittest
4
- import warnings
4
+ from time import sleep
5
+
5
6
 
6
- # Suppress ResourceWarning
7
- warnings.simplefilter("ignore", ResourceWarning)
8
7
 
9
8
  class WebViewTestCase(unittest.TestCase):
10
9
 
11
10
  @webview_client('Test Window','https://google.com')
12
11
  def test_webview_launch(self, client: webview.Window):
13
12
  # This test checks that the window has been created successfully
13
+ sleep(2)
14
14
  self.assertIsNotNone(client,msg="WebView window failed to create.")
15
15
  self.assertEqual(client.title,'Test Window',msg='WebView window title did not match.')
16
16
  self.assertIn('google.com',client.real_url,msg=f'URL mismatch')
@@ -1,72 +1,72 @@
1
- Metadata-Version: 2.4
2
- Name: lanscape
3
- Version: 1.2.5a2
4
- Summary: A python based local network scanner
5
- Project-URL: Homepage, https://github.com/mdennis281/py-lanscape
6
- Project-URL: Issues, https://github.com/mdennis281/py-lanscape/issues
7
- Author-email: Michael Dennis <michael@dipduo.com>
8
- License-File: LICENSE
9
- Classifier: License :: OSI Approved :: MIT License
10
- Classifier: Operating System :: OS Independent
11
- Classifier: Programming Language :: Python :: 3
12
- Requires-Python: <3.14,>=3.8
13
- Requires-Dist: flask<5.0,>=3.0
14
- Requires-Dist: psutil<7.0,>=6.0
15
- Requires-Dist: pytest
16
- Requires-Dist: pywebview<6.0,>=4.2
17
- Requires-Dist: requests<3.0,>=2.32
18
- Requires-Dist: scapy<3.0,>=2.3.2
19
- Requires-Dist: setuptools
20
- Requires-Dist: tabulate==0.9.0
21
- Description-Content-Type: text/markdown
22
-
23
- # LANscape
24
- A python based local network scanner.
25
-
26
- ![screenshot](https://github.com/mdennis281/py-lanscape/raw/main/src/lanscape/ui/static/img/readme1.png)
27
-
28
- ## Local Run
29
- ```sh
30
- pip install lanscape
31
- python -m lanscape
32
- ```
33
-
34
- ## Flags
35
- - `--port <port number>` port of the flask app (default: 5001)
36
- - `--nogui` run in web mode (default: false)
37
- - `--reloader` essentially flask debug mode- good for local development (default: false)
38
- - `--logfile` save log output to lanscape.log
39
- - `--loglevel <level>` set the logger's log level (default: INFO)
40
- - `--headless` similar to nogui but doesnt try to open a browser (default: false)
41
-
42
-
43
- Examples:
44
- ```shell
45
- python -m lanscape --reloader
46
- python -m lanscape --nogui --port 5002
47
- python -m lanscape --logfile --loglevel DEBUG
48
- ```
49
-
50
- ## Troubleshooting
51
-
52
- ### MAC Address / Manufacturer is inaccurate/unknown
53
- The program does an ARP lookup to determine the MAC address. This lookup
54
- can sometimes require admin-level permissions to retrieve accurate results.
55
- *Try elevating your shell before execution.*
56
-
57
- ### Message "WARNING: No libpcap provider available ! pcap won't be used"
58
- This is a missing dependency related to the ARP lookup. This is handled in the code, but you would get marginally faster/better results with this installed: [npcap download](https://npcap.com/#download)
59
-
60
-
61
- ### Unable to start webview client. Try --nogui (Linux)
62
- Linux and QT (GUI package) dont seem to play well with each other very well. If you really want the gui (`python -m lanscape --nogui` is almost as good) I had success on ubuntu desktop by running these:
63
- ```sh
64
- sudo apt install libcairo2-dev libxt-dev libgirepository1.0-dev
65
- pip install pycairo PyGObject qtpy PyQt5 PyQtWebEngine
66
- ```
67
-
68
-
69
- ### Something else
70
- Feel free to submit a github issue detailing your experience.
71
-
72
-
1
+ Metadata-Version: 2.1
2
+ Name: lanscape
3
+ Version: 1.2.6a2
4
+ Summary: A python based local network scanner
5
+ Author-email: Michael Dennis <michael@dipduo.com>
6
+ Project-URL: Homepage, https://github.com/mdennis281/py-lanscape
7
+ Project-URL: Issues, https://github.com/mdennis281/py-lanscape/issues
8
+ Classifier: Programming Language :: Python :: 3
9
+ Classifier: License :: OSI Approved :: MIT License
10
+ Classifier: Operating System :: OS Independent
11
+ Requires-Python: <=3.13,>=3.8
12
+ Description-Content-Type: text/markdown
13
+ License-File: LICENSE
14
+ Requires-Dist: Flask<5.0,>=3.0
15
+ Requires-Dist: psutil<7.0,>=6.0
16
+ Requires-Dist: requests<3.0,>=2.32
17
+ Requires-Dist: setuptools
18
+ Requires-Dist: pywebview<6.0,>=4.2
19
+ Requires-Dist: scapy<3.0,>=2.3.2
20
+ Requires-Dist: tabulate==0.9.0
21
+ Requires-Dist: pytest
22
+
23
+ # LANscape
24
+ A python based local network scanner.
25
+
26
+ ![screenshot](https://github.com/mdennis281/py-lanscape/raw/main/src/lanscape/ui/static/img/readme1.png)
27
+
28
+ ## Local Run
29
+ ```sh
30
+ pip install lanscape
31
+ python -m lanscape
32
+ ```
33
+
34
+ ## Flags
35
+ - `--port <port number>` port of the flask app (default: 5001)
36
+ - `--nogui` run in web mode (default: false)
37
+ - `--reloader` essentially flask debug mode- good for local development (default: false)
38
+ - `--logfile` save log output to lanscape.log
39
+ - `--loglevel <level>` set the logger's log level (default: INFO)
40
+ - `--headless` similar to nogui but doesnt try to open a browser (default: false)
41
+
42
+
43
+ Examples:
44
+ ```shell
45
+ python -m lanscape --reloader
46
+ python -m lanscape --nogui --port 5002
47
+ python -m lanscape --logfile --loglevel DEBUG
48
+ ```
49
+
50
+ ## Troubleshooting
51
+
52
+ ### MAC Address / Manufacturer is inaccurate/unknown
53
+ The program does an ARP lookup to determine the MAC address. This lookup
54
+ can sometimes require admin-level permissions to retrieve accurate results.
55
+ *Try elevating your shell before execution.*
56
+
57
+ ### Message "WARNING: No libpcap provider available ! pcap won't be used"
58
+ This is a missing dependency related to the ARP lookup. This is handled in the code, but you would get marginally faster/better results with this installed: [npcap download](https://npcap.com/#download)
59
+
60
+
61
+ ### Unable to start webview client. Try --nogui (Linux)
62
+ Linux and QT (GUI package) dont seem to play well with each other very well. If you really want the gui (`python -m lanscape --nogui` is almost as good) I had success on ubuntu desktop by running these:
63
+ ```sh
64
+ sudo apt install libcairo2-dev libxt-dev libgirepository1.0-dev
65
+ pip install pycairo PyGObject qtpy PyQt5 PyQtWebEngine
66
+ ```
67
+
68
+
69
+ ### Something else
70
+ Feel free to submit a github issue detailing your experience.
71
+
72
+
@@ -0,0 +1,36 @@
1
+ lanscape/__init__.py,sha256=_8FoHQKR0s9B_stjs5e5CnytwbSK1JgNvE2kZBDrWbw,180
2
+ lanscape/__main__.py,sha256=Im2Qc9AIScEvjRik_X4x63n0Rie67-myQbuIEU7I-Ac,129
3
+ lanscape/libraries/app_scope.py,sha256=FiTKrnttqIfciYcXqnB0uv2mVdGaNg_PtmW1vW9facE,2102
4
+ lanscape/libraries/decorators.py,sha256=Birxor-ae-CQRlBVOyB5DggHnuMQR98IYZ1FVHdGZzE,2448
5
+ lanscape/libraries/errors.py,sha256=zvfqvJbIUsUWsEmw6XmUWXZsktbVachGIkYOdo1nR8s,447
6
+ lanscape/libraries/ip_parser.py,sha256=LIjpNkF-ovlTsBxnuTJEWYYy06VdGuuS_lEIc6_PZnQ,2239
7
+ lanscape/libraries/logger.py,sha256=hGbnj1cTGZT5elwdXUBVyLg_E2Pnocs2IfWumUkHj7M,1385
8
+ lanscape/libraries/mac_lookup.py,sha256=Bos6gIDVC-WVvBTim8pZML_Qm339_149pouJEhbbkbk,1924
9
+ lanscape/libraries/net_tools.py,sha256=FVGsId4C9Or9jF1HceVgVteNXRPge67UuxfgIaY-Gqo,8685
10
+ lanscape/libraries/port_manager.py,sha256=fNext3FNfGnGYRZK9RhTEwQ2K0e0YmmMlhK4zVAvoCw,1977
11
+ lanscape/libraries/runtime_args.py,sha256=Ksu9xb4zyVl2RRBSus_-c9UrbU5A3XFmDxHrUeTUwdw,1670
12
+ lanscape/libraries/subnet_scan.py,sha256=QvIP6wIXW_65jQjG3ZcEaDbsE4BTTcIxvhI3MritcGY,11249
13
+ lanscape/libraries/version_manager.py,sha256=MQ9hOZqiK_fe0jQR9FsbiSW52zKpryPFT6p8fQdKWTM,1505
14
+ lanscape/resources/mac_addresses/convert_csv.py,sha256=w3Heed5z2mHYDEZNBep3_hNg4dbrp_N6J54MGxnrq4s,721
15
+ lanscape/resources/ports/convert_csv.py,sha256=mWe8zucWVfnlNEx_ZzH5Vc3tJJbdi-Ih4nm2yKNrRN0,720
16
+ lanscape/tests/__init__.py,sha256=oFe5tRDmeHd8ynBSEXIaN7I1pwN0_Bvvoks_ptoLBME,158
17
+ lanscape/tests/_helpers.py,sha256=jXD9Bnoxb8Hhwne3Algqt1mAAysB1GYA7CTh24ECpqM,2028
18
+ lanscape/tests/test_api.py,sha256=fIVIA6O9ssPRjofTHLS6z7XPNTkvv2rl2jDaxVCjFGU,5669
19
+ lanscape/tests/test_env.py,sha256=ivFhCcemJ9vbe0_KtUkbqDY4r9nsDB8rVLUVjV-sNj8,673
20
+ lanscape/tests/test_library.py,sha256=ReQWWzYX7OACamuDAMS9aS5_7tkrr4wrYysCoJX_dCU,1550
21
+ lanscape/tests/test_webview.py,sha256=2KQ7pr05AJ8DbaXkpA2FngRP0-UYIpjIwIYpcddBhAE,605
22
+ lanscape/ui/app.py,sha256=dmqD6sh71lx0bftWBm1FqPhtA4GJO9DLdu6zq0mQR98,3060
23
+ lanscape/ui/main.py,sha256=3MHtnJ-nsTGVQ6qYfzLc2yULZTcMLgNxZwuTf1LWoxg,2671
24
+ lanscape/ui/webviewer.py,sha256=BuD17wwUzRdpL4LsEb4cUVSBFr0CZirqkTQ46coUVj4,482
25
+ lanscape/ui/blueprints/__init__.py,sha256=agvgPOSVbrxddaw6EY64ZZr1CQi1Qzwcs1t0lZMv5oY,206
26
+ lanscape/ui/blueprints/api/__init__.py,sha256=t0QOq3vHFWmlZm_3YFPQbQzCn1a_a5cmRchtIxwy4eY,103
27
+ lanscape/ui/blueprints/api/port.py,sha256=2UA38umzXE8pMitx1E-_wJHyL1dYYbtM6Kg5zVtfj6A,1019
28
+ lanscape/ui/blueprints/api/scan.py,sha256=qMObcXk22Eg1T5b4JhdMJMXUhz_IZts5Bl6CupXUxiM,2061
29
+ lanscape/ui/blueprints/api/tools.py,sha256=CD0NDSX8kN6_lpl0jEw-ULLsDx7pKODCMFQiaK4GCzM,1153
30
+ lanscape/ui/blueprints/web/__init__.py,sha256=-WRjENG8D99NfaiSDk9uAa8OX6XJq9Zmq1ck29ARL-w,92
31
+ lanscape/ui/blueprints/web/routes.py,sha256=9S-xDBnUR-8Wf-B0fipBNFeTz-xiHhHy0WmhW9qWqZk,2166
32
+ lanscape-1.2.6a2.dist-info/LICENSE,sha256=cCO-NbS01Ilwc6djHjZ7LIgPFRkRmWdr0fH2ysXKioA,1090
33
+ lanscape-1.2.6a2.dist-info/METADATA,sha256=NcIDFyBiOi7SJmhQbM-R0GE0u0EKveYfNJb-t1oXX9w,2629
34
+ lanscape-1.2.6a2.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
35
+ lanscape-1.2.6a2.dist-info/top_level.txt,sha256=E9D4sjPz_6H7c85Ycy_pOS2xuv1Wm-ilKhxEprln2ps,9
36
+ lanscape-1.2.6a2.dist-info/RECORD,,
@@ -1,4 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: hatchling 1.27.0
2
+ Generator: setuptools (75.6.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
+
@@ -0,0 +1 @@
1
+ lanscape