lanscape 1.3.6a2__py3-none-any.whl → 1.3.7__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.
@@ -6,7 +6,6 @@ import re
6
6
  import socket
7
7
  import subprocess
8
8
  import time
9
- import random
10
9
  from typing import List
11
10
  import psutil
12
11
 
@@ -218,10 +217,13 @@ class Poker():
218
217
 
219
218
  @timeout_enforcer(enforcer_timeout, raise_on_timeout=True)
220
219
  def do_poke():
221
- for _ in range(cfg.attempts):
220
+ # Use a small set of common ports likely to be filtered but still trigger ARP
221
+ common_ports = [80, 443, 22]
222
+ for i in range(cfg.attempts):
222
223
  sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
223
224
  sock.settimeout(cfg.timeout)
224
- sock.connect_ex((device.ip, random.randint(1024, 65535))) # port shouldn't matter
225
+ port = common_ports[i % len(common_ports)]
226
+ sock.connect_ex((device.ip, port))
225
227
  sock.close()
226
228
 
227
229
  do_poke()
@@ -178,9 +178,9 @@ class ScanConfig(BaseModel):
178
178
  subnet: str
179
179
  port_list: str
180
180
  t_multiplier: float = 1.0
181
- t_cnt_port_scan: int = os.cpu_count()
182
- t_cnt_port_test: int = os.cpu_count() * 4
183
- t_cnt_isalive: int = os.cpu_count() * 6
181
+ t_cnt_port_scan: int = os.cpu_count() or 4
182
+ t_cnt_port_test: int = (os.cpu_count() or 4) * 4
183
+ t_cnt_isalive: int = (os.cpu_count() or 4) * 6
184
184
 
185
185
  task_scan_ports: bool = True
186
186
  # below wont run if above false
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: lanscape
3
- Version: 1.3.6a2
3
+ Version: 1.3.7
4
4
  Summary: A python based local network scanner
5
5
  Author-email: Michael Dennis <michael@dipduo.com>
6
6
  License-Expression: MIT
@@ -30,20 +30,23 @@ A python based local network scanner.
30
30
 
31
31
  PyPi Stats:
32
32
 
33
+ ![Version](https://img.shields.io/pypi/v/lanscape)
33
34
  ![Monthly Downloads](https://img.shields.io/pypi/dm/lanscape)
34
35
 
35
36
  Latest release:
36
37
 
37
- ![Releases](https://img.shields.io/github/v/tag/mdennis281/LANscape?sort=date&filter=releases%2F*)
38
+ ![Stable](https://img.shields.io/github/v/tag/mdennis281/LANScape?filter=releases%2F*&label=Stable)
39
+ ![Beta](https://img.shields.io/github/v/tag/mdennis281/LANScape?filter=pre-releases%2F*b*&label=Beta)
40
+ ![Alpha](https://img.shields.io/github/v/tag/mdennis281/LANScape?filter=pre-releases%2F*a*&label=Alpha)
38
41
 
39
- Tests:
42
+ Health:
40
43
 
41
44
  ![pytest](https://img.shields.io/github/actions/workflow/status/mdennis281/LANscape/test.yml?branch=main&label=pytest)
42
45
  ![packaging](https://img.shields.io/github/actions/workflow/status/mdennis281/LANscape/test-package.yml?label=packaging)
43
46
  ![pylint](https://img.shields.io/github/actions/workflow/status/mdennis281/LANscape/pylint.yml?branch=main&label=pylint)
44
47
 
45
48
 
46
- ## Local Run
49
+ ## Installation
47
50
  ```sh
48
51
  pip install lanscape
49
52
  python -m lanscape
@@ -71,16 +74,14 @@ The program does an ARP lookup to determine the MAC address. This lookup
71
74
  can sometimes require admin-level permissions to retrieve accurate results.
72
75
  *Try elevating your shell before execution.*
73
76
 
74
- ### Message "WARNING: No libpcap provider available ! pcap won't be used"
75
- 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)
76
-
77
77
  ### The accuracy of the devices found is low
78
- I use a combination of ARP and Ping to determine if a device is online. This method drops in stability when used in many threads.
78
+ I use a combination of ARP, ICMP & port testing to determine if a device is online. Sometimes the scan settings can use some tuning to maximize both speed and accuracy.
79
+
79
80
  Recommendations:
80
81
 
81
- - Drop parallelism value (advanced dropdown)
82
- - Use python > 3.10 im noticing threadpool improvements after this version
83
- - Create a bug - I'm curious
82
+ - Adjust scan configuration
83
+ - Configure ARP lookup [ARP lookup setup](./support/arp-issues.md)
84
+ - Create a bug
84
85
 
85
86
 
86
87
  ### Something else
@@ -3,7 +3,7 @@ lanscape/__main__.py,sha256=PuY42yuCLAwHrOREJ6u2DgVyGX5hZKRQeoE9pajkNfM,170
3
3
  lanscape/libraries/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
4
  lanscape/libraries/app_scope.py,sha256=EqYQRQcbjOPPcIOhFkIepcz2cKHmoUHxWj2JSoRJmzk,2542
5
5
  lanscape/libraries/decorators.py,sha256=SoNqfEInPyL-rrUKY6njK5d6Mwqu7Ix6He-BZRu2VKQ,5394
6
- lanscape/libraries/device_alive.py,sha256=4K-wGQr4dv-aPqMmzACYyF82uiIAfsqLTgdf8gj4Mik,6723
6
+ lanscape/libraries/device_alive.py,sha256=mwvHJp9rWV1_zfrE57aPKOsGp06fHdzrXOuGDWiZ2T8,6851
7
7
  lanscape/libraries/errors.py,sha256=QTf42UzR9Zxj1t1mdwfLvZIp0c9a5EItELOdCR7kTmE,1322
8
8
  lanscape/libraries/ip_parser.py,sha256=RgIEvHw_oQEcjUYOrvcpbfm4KThtH8L68WyhSOJNOfE,4201
9
9
  lanscape/libraries/logger.py,sha256=nzo6J8UdlMdhRkOJEDOIHKztoE3Du8PQZad7ixvNgeM,2534
@@ -11,7 +11,7 @@ lanscape/libraries/mac_lookup.py,sha256=PxBSMe3wEVDtivCsh5NclSAguZz9rqdAS7QshBiu
11
11
  lanscape/libraries/net_tools.py,sha256=nIvOV_qYXmWIBYEd5PqWH1Mkadg3I1T0vbcHPkzlw6I,15853
12
12
  lanscape/libraries/port_manager.py,sha256=3_ROOb6JEiB0NByZVtADuGcldFkgZwn1RKtvwgs9AIk,4479
13
13
  lanscape/libraries/runtime_args.py,sha256=2vIqRrcWr-NHRSBlZGrxh1PdkPY0ytkPguu8KZqy2L8,2543
14
- lanscape/libraries/scan_config.py,sha256=KkY5tzuEbTbUeQrMgbn95IArgYBerFRuu-JIPsQd7AA,8310
14
+ lanscape/libraries/scan_config.py,sha256=IOtwAaiy_f1r1KcsyTUVurOmo3kUmWdquAxWh8Gv39A,8329
15
15
  lanscape/libraries/service_scan.py,sha256=ZF4LL2gSI0T5oYEMjc8pCVtJkV1KIk4xP-AeEAkSdLc,1944
16
16
  lanscape/libraries/subnet_scan.py,sha256=lL2LzuxoTgPyvsdkPPEcZDqQPbCAGMHAjoX2slKGUKc,14136
17
17
  lanscape/libraries/version_manager.py,sha256=fIAv6bVHb_VCOrqT8Do53trxwEgR2mnZV82v3YGxJ14,2944
@@ -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.6a2.dist-info/licenses/LICENSE,sha256=VLoE0IrNTIc09dFm7hMN0qzk4T3q8V0NaPcFQqMemDs,1070
71
- lanscape-1.3.6a2.dist-info/METADATA,sha256=zixswIL6WKv5fi90DdA5VK50EHR5aLDXC969ADHnp0Y,3139
72
- lanscape-1.3.6a2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
73
- lanscape-1.3.6a2.dist-info/top_level.txt,sha256=E9D4sjPz_6H7c85Ycy_pOS2xuv1Wm-ilKhxEprln2ps,9
74
- lanscape-1.3.6a2.dist-info/RECORD,,
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,,