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

Function onHandshake

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

Source from the content-addressed store, hash-verified

173
174// triggered when partial or full handshakes are captured
175function onHandshake(event){
176 if(notifyHandshakes) {
177 var data = event.data;
178 var what = 'handshake';
179
180 if(data.pmkid != null) {
181 what = "RSN PMKID";
182 } else if(data.full) {
183 what += " (full)";
184 } else if(data.half) {
185 what += " (half)";
186 }
187
188 var message = '💰 Captured ' + what + ':\n\n' +
189 decorateAddress('Station', data.station) + "\n" +
190 decorateAddress('AP', data.ap);
191
192 // send to telegram bot
193 sendMessage(message);
194 }
195}
196
197// triggered when an IPv4 or IPv6 gateway change is detected
198function onGatewayChange(event) {

Callers

nothing calls this directly

Calls 2

decorateAddressFunction · 0.85
sendMessageFunction · 0.85

Tested by

no test coverage detected