(event)
| 152 | |
| 153 | // triggered when a WiFi deauthentication frame is detected |
| 154 | function onDeauthentication(event) { |
| 155 | if(notifyDeauth) { |
| 156 | var data = event.data; |
| 157 | |
| 158 | var message = '🚨 Detected deauthentication frame:\n\n' + |
| 159 | 'RSSI: ' + data.rssi + "\n" + |
| 160 | 'Reason: ' + data.reason + "\n\n" + |
| 161 | decorateAddress('Address1', data.address1) + "\n" + |
| 162 | decorateAddress('Address2', data.address2)+ "\n" + |
| 163 | decorateAddress('Address3', data.address3); |
| 164 | |
| 165 | if(notifyDeauthApData) { |
| 166 | message += '\nAP:\n' + JSON.stringify(data.ap, null, 2); |
| 167 | } |
| 168 | |
| 169 | // send to telegram bot |
| 170 | sendMessage(message); |
| 171 | } |
| 172 | } |
| 173 | |
| 174 | // triggered when partial or full handshakes are captured |
| 175 | function onHandshake(event){ |
nothing calls this directly
no test coverage detected