lanscape 1.3.1a6__py3-none-any.whl → 1.3.1a7__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.
- lanscape/libraries/version_manager.py +1 -1
- lanscape/ui/static/js/on-tab-close.js +27 -14
- lanscape/ui/templates/info.html +8 -6
- {lanscape-1.3.1a6.dist-info → lanscape-1.3.1a7.dist-info}/METADATA +1 -1
- {lanscape-1.3.1a6.dist-info → lanscape-1.3.1a7.dist-info}/RECORD +8 -8
- {lanscape-1.3.1a6.dist-info → lanscape-1.3.1a7.dist-info}/WHEEL +0 -0
- {lanscape-1.3.1a6.dist-info → lanscape-1.3.1a7.dist-info}/licenses/LICENSE +0 -0
- {lanscape-1.3.1a6.dist-info → lanscape-1.3.1a7.dist-info}/top_level.txt +0 -0
|
@@ -33,7 +33,7 @@ def lookup_latest_version(package=PACKAGE):
|
|
|
33
33
|
no_cache = f'?cachebust={randint(0,6969)}'
|
|
34
34
|
url = f"https://pypi.org/pypi/{package}/json{no_cache}"
|
|
35
35
|
try:
|
|
36
|
-
response = requests.get(url)
|
|
36
|
+
response = requests.get(url,timeout=5)
|
|
37
37
|
response.raise_for_status() # Raise an exception for HTTP errors
|
|
38
38
|
latest = response.json()['info']['version']
|
|
39
39
|
log.debug(f'Latest pypi version: {latest}')
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
//
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
// helps flask server know when the browser tab is closed
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
function sendOnUnload(event = null) {
|
|
4
5
|
const url = '/shutdown?type=browser-close';
|
|
5
|
-
const data = JSON.stringify({ });
|
|
6
|
+
const data = JSON.stringify({ event });
|
|
7
|
+
console.log('sendOnUnload called:', data);
|
|
6
8
|
// (1) Using navigator.sendBeacon
|
|
7
9
|
if (navigator.sendBeacon) {
|
|
8
10
|
const blob = new Blob([data], { type: 'application/json' });
|
|
@@ -11,19 +13,30 @@ function sendOnUnload() {
|
|
|
11
13
|
// (2) Or—you can use fetch with keepalive (supported in modern browsers)
|
|
12
14
|
else {
|
|
13
15
|
fetch(url, {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
method: 'POST',
|
|
17
|
+
body: data,
|
|
18
|
+
headers: { 'Content-Type': 'application/json' },
|
|
19
|
+
keepalive: true
|
|
18
20
|
})
|
|
19
21
|
.catch((err) => {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
+
// If it fails, there's not much you can do here.
|
|
23
|
+
console.warn('sendOnUnload fetch failed:', err);
|
|
22
24
|
});
|
|
23
25
|
}
|
|
24
26
|
}
|
|
25
27
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
let hasBeenCalled = false;
|
|
29
|
+
|
|
30
|
+
// When pagehide is called w/ persist=false we want to send our payload.
|
|
31
|
+
// Wont work on all browsers, but should work on most modern ones.
|
|
32
|
+
window.addEventListener('pagehide', (event) => {
|
|
33
|
+
if (!hasBeenCalled && !event.persisted) {
|
|
34
|
+
// persisted = false means page is being discarded, not cached
|
|
35
|
+
const clonedEvent = {
|
|
36
|
+
type: 'pagehide',
|
|
37
|
+
persisted: event.persisted
|
|
38
|
+
};
|
|
39
|
+
sendOnUnload(clonedEvent);
|
|
40
|
+
hasBeenCalled = true;
|
|
41
|
+
}
|
|
42
|
+
});
|
lanscape/ui/templates/info.html
CHANGED
|
@@ -4,9 +4,11 @@
|
|
|
4
4
|
<div id="header">
|
|
5
5
|
<!-- Header and Scan Submission Inline -->
|
|
6
6
|
<div class="d-flex justify-content-start align-items-center">
|
|
7
|
-
<
|
|
8
|
-
<
|
|
9
|
-
|
|
7
|
+
<a href="/" class="text-decoration-none">
|
|
8
|
+
<h1 class="title">
|
|
9
|
+
<span>LAN</span>scape
|
|
10
|
+
</h1>
|
|
11
|
+
</a>
|
|
10
12
|
</div>
|
|
11
13
|
</div>
|
|
12
14
|
<div class="scroll-container" id="content">
|
|
@@ -18,7 +20,7 @@
|
|
|
18
20
|
({{app_version}} -> {{latest_version}})
|
|
19
21
|
</p>
|
|
20
22
|
<input type="text" readonly class="form-control mb-3 mt-3" value="pip install --upgrade lanscape --no-cache"/>
|
|
21
|
-
<a
|
|
23
|
+
<a class="text-decoration-none" href="https://pypi.org/project/lanscape/" target="_blank">
|
|
22
24
|
<button class="btn btn-primary m-2">PyPi - Lanscape</button>
|
|
23
25
|
</a>
|
|
24
26
|
</div>
|
|
@@ -33,10 +35,10 @@
|
|
|
33
35
|
This project has been a learning journey, & I hope it helps you
|
|
34
36
|
discover more about your network as well. Enjoy!
|
|
35
37
|
</p>
|
|
36
|
-
<a href="https://github.com/mdennis281/" target="_blank">
|
|
38
|
+
<a href="https://github.com/mdennis281/" class="text-decoration-none" target="_blank">
|
|
37
39
|
<button class="btn btn-primary m-2">GitHub</button>
|
|
38
40
|
</a>
|
|
39
|
-
<a href="https://github.com/mdennis281/LANscape" target="_blank">
|
|
41
|
+
<a href="https://github.com/mdennis281/LANscape" class="text-decoration-none" target="_blank">
|
|
40
42
|
<button class="btn btn-secondary m-2">Project Repo</button>
|
|
41
43
|
</a>
|
|
42
44
|
</div>
|
|
@@ -11,7 +11,7 @@ lanscape/libraries/port_manager.py,sha256=fNext3FNfGnGYRZK9RhTEwQ2K0e0YmmMlhK4zV
|
|
|
11
11
|
lanscape/libraries/runtime_args.py,sha256=ICX_JkOmqDQdewZNfRxJb9jMggDw1XqF5CxM9zXZE_Q,1947
|
|
12
12
|
lanscape/libraries/service_scan.py,sha256=jLU84ZoJnqSQbE30Zly2lm2zHrCGutNXjla1sEvp1hE,1949
|
|
13
13
|
lanscape/libraries/subnet_scan.py,sha256=0LW_xdoL-PRp59rJr6r6pSL3LiXEO_SJnjdrgEF_pO8,13120
|
|
14
|
-
lanscape/libraries/version_manager.py,sha256=
|
|
14
|
+
lanscape/libraries/version_manager.py,sha256=3n0PV_EdW9Fgg2yxD2uzA4WYvzk6H6hMf_1gfvtZbp0,1730
|
|
15
15
|
lanscape/libraries/web_browser.py,sha256=EuKJG3bmBZUochDGm9a0qrB6JkIkOkvx4njZBe4eLIQ,5028
|
|
16
16
|
lanscape/resources/mac_addresses/convert_csv.py,sha256=w3Heed5z2mHYDEZNBep3_hNg4dbrp_N6J54MGxnrq4s,721
|
|
17
17
|
lanscape/resources/mac_addresses/mac_db.json,sha256=ygtFSwNwJzDlg6hmAujdgCyzUjxt9Di75J8SO4xYIs8,2187804
|
|
@@ -47,14 +47,14 @@ lanscape/ui/static/img/ico/site.webmanifest,sha256=ep4Hzh9zhmiZF2At3Fp1dQrYQuYF_
|
|
|
47
47
|
lanscape/ui/static/js/core.js,sha256=y-f8iQPIetllUY0lSCwnGbPCk5fTJbbU6Pxm3rw1EBU,1111
|
|
48
48
|
lanscape/ui/static/js/layout-sizing.js,sha256=23UuKdEmRChg6fyqj3DRvcsNfMoa6MRt6dkaT0k7_UY,841
|
|
49
49
|
lanscape/ui/static/js/main.js,sha256=s0ipGqmuuFHnH9KKoUVaDRJ10_YqYoJ-9r_YnbsH8Mw,7676
|
|
50
|
-
lanscape/ui/static/js/on-tab-close.js,sha256=
|
|
50
|
+
lanscape/ui/static/js/on-tab-close.js,sha256=YYzNd1KMrLWW4-rFcC8EXckTRfG-pKRLA6xpdVTDt04,1417
|
|
51
51
|
lanscape/ui/static/js/quietReload.js,sha256=_mHzpUsGL4Lm1hNsr3VYSOGVcgGA2y1-eZHacssTXGs,724
|
|
52
52
|
lanscape/ui/static/js/shutdown-server.js,sha256=WkO7_SNSHM_6kReUoCoExIdCf7Sl7IPiSiNxpbI-r0s,469
|
|
53
53
|
lanscape/ui/static/js/subnet-info.js,sha256=aytt0LkBx4FVq36TxiMEw3aM7XQLHg_ng1U2WDwZVF4,577
|
|
54
54
|
lanscape/ui/static/js/subnet-selector.js,sha256=OG01pDaSOPLq3Ial0aO0CqPcob9tPZA1MZKGmQG0W7Q,366
|
|
55
55
|
lanscape/ui/templates/base.html,sha256=P5xnMlvDXYkYSXdSZUWaRfhsszNuZPP7A56hemBrAFs,1498
|
|
56
56
|
lanscape/ui/templates/error.html,sha256=zXFO0zPIfQORWq1ZMiSZ8G7FjfhVVr-aaYC0HeBl4Rs,1068
|
|
57
|
-
lanscape/ui/templates/info.html,sha256=
|
|
57
|
+
lanscape/ui/templates/info.html,sha256=ZRx0Q92viaIsD0H8Rd1oGMdFIsZtBal7-tcKvt9WJIY,2586
|
|
58
58
|
lanscape/ui/templates/main.html,sha256=M12xJSN6Ga565vIPhdCiqcr1tYgDrqzuQTeuXtk-8yo,3759
|
|
59
59
|
lanscape/ui/templates/scan.html,sha256=Fz1Q4CzRq5qpKgszTAQLhaLVV0A6gBraT33mNDmpYRE,390
|
|
60
60
|
lanscape/ui/templates/shutdown.html,sha256=v0cGT5CJWi-V8b5sUN3l-QIDNUmHTvKGi2gDlhmRlrs,724
|
|
@@ -65,8 +65,8 @@ lanscape/ui/templates/scan/ip-table-row.html,sha256=ptY24rxJRaA4PEEQRDncaq6Q0ql5
|
|
|
65
65
|
lanscape/ui/templates/scan/ip-table.html,sha256=ds__UP9JiTKf5IxCmTMzw--eN_yg1Pvn3Nj1KvQxeZg,940
|
|
66
66
|
lanscape/ui/templates/scan/overview.html,sha256=FsX-jSFhGKwCxZGKE8AMKk328UuawN6O9RNTzYvIOts,1205
|
|
67
67
|
lanscape/ui/templates/scan/scan-error.html,sha256=Q4eZM5ThrxnFaWOSTUpK8hA2ksHwhxOBTaVUCLALhyA,1032
|
|
68
|
-
lanscape-1.3.
|
|
69
|
-
lanscape-1.3.
|
|
70
|
-
lanscape-1.3.
|
|
71
|
-
lanscape-1.3.
|
|
72
|
-
lanscape-1.3.
|
|
68
|
+
lanscape-1.3.1a7.dist-info/licenses/LICENSE,sha256=cCO-NbS01Ilwc6djHjZ7LIgPFRkRmWdr0fH2ysXKioA,1090
|
|
69
|
+
lanscape-1.3.1a7.dist-info/METADATA,sha256=c2V2KRicArHyY67oW6gSl1jLq9jsag_noE8RY-veqFE,2567
|
|
70
|
+
lanscape-1.3.1a7.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
71
|
+
lanscape-1.3.1a7.dist-info/top_level.txt,sha256=E9D4sjPz_6H7c85Ycy_pOS2xuv1Wm-ilKhxEprln2ps,9
|
|
72
|
+
lanscape-1.3.1a7.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|