MCPcopy Create free account
hub / github.com/bettercap/scripts / decorateEndpoint

Function decorateEndpoint

security_monitor/functions.js:64–78  ·  view source on GitHub ↗
(endpoint, padding)

Source from the content-addressed store, hash-verified

62
63// pretty print endpoint
64function decorateEndpoint(endpoint, padding) {
65 var msg = (endpoint.hostname.length ? (padding + "Hostname: " + endpoint.hostname + "\n") : '') +
66 (endpoint.ipv4.length ? (padding + "IPv4: " + endpoint.ipv4 + "\n") : '') +
67 (endpoint.ipv6.length ? (padding + "IPv6: " + endpoint.ipv6 + "\n") : '') +
68 padding + decorateMac("MAC", endpoint.mac, endpoint.vendor) + "\n";
69
70 if( endpoint.meta.values.length > 0 ) {
71 msg += "\n" + padding + "Info:\n";
72 for( var name in endpoint.meta.values ) {
73 msg += padding + name + ' : ' + endpoint.meta.values[name] + "\n";
74 }
75 }
76
77 return msg;
78}
79
80// pretty print access point
81function decorateAP(ap, padding) {

Callers 2

onNewEndpointFunction · 0.85
decorateAddressFunction · 0.85

Calls 1

decorateMacFunction · 0.85

Tested by

no test coverage detected