X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=bt-remote.c;h=359648e770c47b67126966936426299741006781;hb=2d8bc0c5b94de90cdab4af759b0a41a1815d4ac5;hp=54345701cae7996f5e112d36c20325480bcacdf4;hpb=b221552d908b8ade435780e2ead30b275d089b1e;p=wardrive diff --git a/bt-remote.c b/bt-remote.c index 5434570..359648e 100644 --- a/bt-remote.c +++ b/bt-remote.c @@ -24,6 +24,7 @@ int parse_packet(unsigned char *buf, unsigned bytes, int sock) printf("Couldn't parse NETWORK packet\n"); } else { if (strcmp(bssid, "00:0D:54:A0:27:7F") == 0) { + static int last_crypted = 0; char str1[64], str2[64], str3[64], str4[64]; short len; sprintf(str1, "Crypted: %d", crypted); @@ -50,7 +51,19 @@ int parse_packet(unsigned char *buf, unsigned bytes, int sock) len = htons(strlen(str4)); write(sock, (char*)&len, 2); write(sock, str4, strlen(str4)); + + // vibrate 250ms for every 10k packets + if (crypted/10000 != last_crypted/10000) { + write(sock, "\000\016\000\002\000\372", 6); + } + // vibrate 1750ms extra for every 100k packets + if (crypted/100000 != last_crypted/100000) { + write(sock, "\000\016\000\002\006\326", 6); + } + + last_crypted = crypted; + ret = 1; } }