(event)
| 173 | |
| 174 | // triggered when partial or full handshakes are captured |
| 175 | function 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 |
| 198 | function onGatewayChange(event) { |
nothing calls this directly
no test coverage detected