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

Function onGatewayChange

security_monitor/functions.js:198–209  ·  view source on GitHub ↗
(event)

Source from the content-addressed store, hash-verified

196
197// triggered when an IPv4 or IPv6 gateway change is detected
198function onGatewayChange(event) {
199 if(notifyGatewayChanges) {
200 var change = event.data;
201
202 var message = '🚨 Detected ' + change.type + ' gateway change, possible MITM attack:\n\n' +
203 'Prev: ' + change.prev.ip + ' (' + change.prev.mac + ")\n" +
204 'New: ' + change.new.ip + ' (' + change.new.mac + ")";
205
206 // send to telegram bot
207 sendMessage(message);
208 }
209}
210
211// triggered periodically, we use this to send a probe for a fake access point in order
212// to detect rogue AP attacks

Callers

nothing calls this directly

Calls 1

sendMessageFunction · 0.85

Tested by

no test coverage detected