MCPcopy Index your code
hub / github.com/bettercap/scripts / updateEndpoint

Function updateEndpoint

security_monitor/functions.js:18–29  ·  view source on GitHub ↗
(endpoint)

Source from the content-addressed store, hash-verified

16
17// update last_seen timestamp and meta values of a known endpoint
18function updateEndpoint(endpoint) {
19 var known = db.endpoints[endpoint.mac];
20
21 known.last_seen = endpoint.last_seen;
22 for( var name in endpoint.meta.values ) {
23 if(!(name in known.meta.values)) {
24 known.meta.values[name] = endpoint.meta.values[name];
25 }
26 }
27
28 db.endpoints[endpoint.mac] = known;
29}
30
31// create a new endpoint in the database
32function createEndpoint(endpoint) {

Callers 1

onNewEndpointFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected