HTTP/1.1 502 Bad Gateway
Server: nginx/1.18.0 (Ubuntu)
Date: Mon, 07 Apr 2025 18:20:03 GMT
Content-Type: text/html
Content-Length: 568
Connection: keep-alive
SSL Certificate
Certificate:
Data:
Version: 3 (0x2)
Serial Number:
05:fd:a4:cf:69:d2:28:f9:7b:6d:09:ce:13:e0:62:e7:03:e7
Signature Algorithm: sha256WithRSAEncryption
Issuer: C=US, O=Let's Encrypt, CN=R10
Validity
Not Before: Mar 27 23:03:10 2025 GMT
Not After : Jun 25 23:03:09 2025 GMT
Subject: CN=dev.remote.besic.org
Subject Public Key Info:
Public Key Algorithm: rsaEncryption
Public-Key: (2048 bit)
Modulus:
00:83:b4:8e:75:0c:07:5a:dc:cd:0f:b0:a5:e5:b2:
18:11:74:e3:40:b8:a2:1f:9c:6f:26:71:21:61:09:
98:27:6b:86:c5:d1:15:b2:01:54:4d:46:cc:e0:6c:
46:45:d4:ee:45:34:ac:bd:26:f3:bd:d7:f1:65:6c:
3c:0c:a8:65:92:ae:e7:e2:c4:ee:f6:1b:a3:8e:45:
e7:f5:50:5f:90:97:80:ae:f6:53:6e:a5:9e:58:49:
39:1b:08:8a:3c:90:d3:18:36:5c:4b:50:85:24:57:
20:10:a5:26:0b:f7:d8:14:ce:21:06:3b:88:8d:d2:
8b:db:86:e3:5a:19:42:28:24:1b:d2:c3:41:39:1d:
11:b8:7e:33:41:76:17:ae:e0:a9:42:89:d2:bc:27:
24:8f:1c:31:54:e9:34:ba:08:ee:ee:7b:e7:5e:b4:
9d:df:8d:4b:9a:eb:3b:4a:8a:aa:81:a7:ff:7c:4d:
c9:4d:a3:98:d3:53:2d:2a:41:02:a5:74:7b:71:56:
b2:b8:9a:78:6c:cd:ad:3b:25:f0:74:74:c3:74:6b:
e6:3c:17:50:89:43:49:14:66:9e:fa:0c:55:9f:74:
82:02:ed:13:c6:3e:ac:93:87:47:b0:82:d0:ff:12:
8b:fc:c4:30:d9:82:eb:9a:21:70:14:ba:d4:ac:f2:
58:a3
Exponent: 65537 (0x10001)
X509v3 extensions:
X509v3 Key Usage: critical
Digital Signature, Key Encipherment
X509v3 Extended Key Usage:
TLS Web Server Authentication, TLS Web Client Authentication
X509v3 Basic Constraints: critical
CA:FALSE
X509v3 Subject Key Identifier:
9C:AA:F3:A0:31:87:86:D4:46:98:E2:4C:7D:35:BB:07:14:4B:89:11
X509v3 Authority Key Identifier:
BB:BC:C3:47:A5:E4:BC:A9:C6:C3:A4:72:0C:10:8D:A2:35:E1:C8:E8
Authority Information Access:
OCSP - URI:http://r10.o.lencr.org
CA Issuers - URI:http://r10.i.lencr.org/
X509v3 Subject Alternative Name:
DNS:dev.remote.besic.org
X509v3 Certificate Policies:
Policy: 2.23.140.1.2.1
X509v3 CRL Distribution Points:
Full Name:
URI:http://r10.c.lencr.org/104.crl
CT Precertificate SCTs:
Signed Certificate Timestamp:
Version : v1 (0x0)
Log ID : A2:E3:0A:E4:45:EF:BD:AD:9B:7E:38:ED:47:67:77:53:
D7:82:5B:84:94:D7:2B:5E:1B:2C:C4:B9:50:A4:47:E7
Timestamp : Mar 28 00:01:40.956 2025 GMT
Extensions: none
Signature : ecdsa-with-SHA256
30:45:02:21:00:9B:7B:0A:B4:1A:99:9F:E6:25:C9:60:
8A:00:95:66:7F:4C:42:76:13:A6:8A:EC:E8:17:F8:38:
58:C1:E2:ED:06:02:20:74:76:B9:12:8B:44:7D:53:70:
D9:19:FD:C0:E0:20:CC:08:0A:59:4C:67:94:5E:1C:46:
40:CD:4D:BD:B0:63:E6
Signed Certificate Timestamp:
Version : v1 (0x0)
Log ID : 7D:59:1E:12:E1:78:2A:7B:1C:61:67:7C:5E:FD:F8:D0:
87:5C:14:A0:4E:95:9E:B9:03:2F:D9:0E:8C:2E:79:B8
Timestamp : Mar 28 00:01:41.010 2025 GMT
Extensions: none
Signature : ecdsa-with-SHA256
30:45:02:20:08:A9:0B:F5:3F:D4:69:DD:A4:99:B1:B9:
C8:0E:E2:9C:AF:BF:50:F2:AE:61:CC:46:42:6E:A8:9A:
13:66:B6:C6:02:21:00:94:15:B3:41:7B:6C:5B:97:83:
D5:7E:83:E4:3F:E0:20:CE:72:6A:E1:96:6D:8A:BC:9A:
25:0B:DC:60:05:42:0B
Signature Algorithm: sha256WithRSAEncryption
Signature Value:
cb:1e:71:51:2e:71:80:f3:8f:e7:8f:5c:a8:c3:69:29:42:86:
f7:a3:ad:70:3c:9b:cf:e6:22:80:24:0f:1b:74:f2:54:6e:4b:
4a:c5:cc:20:35:32:46:ea:74:59:99:5e:8e:45:e0:80:2f:5b:
9d:2a:22:44:27:b1:6a:e8:2e:cd:ec:d7:60:6c:4c:7e:9c:3a:
89:2b:48:67:55:5d:13:03:09:4c:35:c6:65:06:ae:62:1a:cd:
4c:d4:fc:a1:3c:64:a1:85:a0:3d:13:b4:f9:ce:e2:86:d3:db:
6c:c6:de:4c:ab:e8:be:05:4d:0a:c9:22:4b:a8:19:3b:58:f8:
86:16:02:94:91:eb:38:86:90:37:ee:d6:2e:95:7a:42:fa:9d:
52:93:82:91:21:36:6a:ae:04:74:13:eb:58:85:19:fe:30:81:
f2:d1:26:3a:4a:b1:08:14:0d:db:58:67:b2:62:2b:a4:df:14:
4a:ad:54:1b:4e:b4:ab:2d:0a:4d:40:28:fc:4b:d6:9f:9f:37:
4e:0c:10:b8:6b:bf:6f:dd:71:f4:5b:8a:cb:96:7a:a0:ec:9a:
25:07:68:00:ec:52:90:e4:1b:41:20:e9:1a:77:49:5f:c6:09:
ee:07:49:a7:07:13:3e:ed:6e:41:7e:9d:f3:1f:54:d6:8d:c7:
0c:05:3b:a2
Vulnerabilities
HTTP/1.1 200 OK
X-Powered-By: Express
Access-Control-Allow-Origin: *
Accept-Ranges: bytes
Cache-Control: public, max-age=0
Last-Modified: Fri, 01 Oct 2021 19:10:41 GMT
ETag: W/"aa1-17c3d44079e"
Content-Type: text/html; charset=UTF-8
Content-Length: 2721
Date: Mon, 31 Mar 2025 00:59:04 GMT
Connection: keep-alive
Keep-Alive: timeout=5
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" href="data:,">
<title>BESI Remote Monitoring</title>
<style>
td {
padding:0.2rem 0.8rem;
}
tr:nth-child(even) {
background-color:lightgrey;
}
</style>
</head>
<body>
<h1>BESI Remote Monitoring</h1>
<div id="root"></div>
</body>
<script>
const durations = [
[1000,60,"seconds",],
[60*1000,60,"minutes"],
[60*60*1000,24,"hours"],
[24*60*60*1000,7,"days"],
[7*24*60*60*1000,4,"weeks"],
[4*7*24*60*60*1000,12,"months"],
[12*4*7*24*60*60*1000,1000,"years"]
]
function getAgoString(v){
v = Date.now() - v
str = ''
for(i=0; i<7; i++){
let val = durations[i]
if(Math.ceil(v/val[0])<val[1]){
str = `${Math.floor(v/val[0])} ${val[2]} ago`
break
}
}
return str
}
function stringify(deployments){
let body = ''
Object.keys(deployments).forEach((i) => {
let depbody = `<h2>NULL</h2>\n`
try{
let dep = deployments[i]
//console.log("Deployment:", dep.DeploymentID, dep.DeviceID);
depbody = `<h2>${dep.DeploymentID}</h2>\n`
depbody += `<span><b>BaseStation ID:</b> ${dep.DeviceID} | Last reported online: ${(dep.lastupdated ? getAgoString(dep.lastupdated) : 'Not reported')}</span>\n<br>\n`
if (dep.relays) {
let relays = "<h3>Relays:</h3>\n<table>\n"
relays += "<tr><th>ID</th><th>Lux</th><th>Humidity</th><th>Temp</th><th>Pressure</th><th>Last Updated</th></tr>\n"
Object.keys(dep.relays).forEach((j) => {
let r = dep.relays[j]
let relay = `<tr><td>${r.DeviceID}</td>`
relay += `<td>${r.LUX.substr(0,6)}</td>`
relay += `<td>${r.HUM.substr(0,6)}%</td>`
relay += `<td>${r.TMP.substr(0,6)}°C</td>`
relay += `<td>${r.PRS.substr(0,8)} Pa</td>`
relay += `<td>${getAgoString(r.lastupdated)}</td></tr>\n`
relays += relay
})
relays += "</table>\n<hr>"
depbody += relays
}
} catch (e) {
console.log(e)
}
body += depbody
})
return body
}
function update(){
let root = document.getElementById('root')
fetch("/status").then((res)=>{
//console.log(res)
res.json().then((r)=>{
//console.log(r)
let stuff = stringify(r.deployments)
//console.log(stuff)
// Put the thing in the DOM
root.innerHTML = stuff
console.log("Set HTML")
// Call itself on timeout
setTimeout(update, 1000);
}).catch((e)=>{
console.log("Error:",e)
// Call itself on long timeout
setTimeout(update, 60000);
})
}).catch((e)=>{
console.log("Error:",e)
// Call itself on long timeout
setTimeout(update, 60000);
})
}
update()
</script>
</html>