Main service = 0000fff0-0000-1000-8000-00805f9b34fb
Timer state characteristic (notify) = 0000fff5-0000-1000-8000-00805f9b34fb
Stored time characteristic (read) = 0000fff2-0000-1000-8000-00805f9b34fb
package org.apache.camel.processor; | |
import org.apache.camel.*; | |
import org.apache.camel.util.ExchangeHelper; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; | |
import org.slf4j.helpers.MessageFormatter; | |
import java.util.LinkedList; | |
import java.util.Map; |
#!/bin/bash | |
# | |
set -e | |
openssl genrsa -aes256 -passout env:PASSWORD -out certs/dev-root-CA-key.pem 4096 | |
openssl req \ | |
-new \ | |
-sha256 \ |
#!/bin/bash | |
# | |
set -e | |
[[ $# -eq 2 ]] || { | |
echo -ne "\nUsage: $(basename $0) CERT_HOST_FQDN CERT_HOST_IP\n\n" | |
exit 1 | |
} |
/** | |
* | |
* Proof-of-Concept: extract GAN smart cube MAC address using Web Bluetooth. | |
* MAC address resides at last 6 bytes in Manufacturer Specific Data field | |
* of the bluetooth advertising packet. | |
* | |
* In order for this to work it is necessary to enable following flag in Chrome: | |
* | |
* chrome://flags/#enable-web-bluetooth-new-permissions-backend | |
* |
Q: What is the cube MAC address?
A: MAC is the Bluetooth device hardware address, each device instance has it unique. It has 48 bits and typically represented as 6 bytes written in hexadecimal and separated by colons or hyphens, for example AB:12:34:5D:34:12
.
Q: Why MAC address is ever needed?
A: The GAN smart cube application-layer protocol encrypts all data using AES cypher. Encryption keys are unique for each cube instance, and generated based on cube's MAC address. So to decrypt any data sent by cube it is required for application to know cube MAC address.
Q: But I used another GAN cube with Cubeast, or different smartcubing software, and it does not ever ask me for the MAC address.
A: For some GAN smart cubes range used for MAC addresses was small enough, so Cubeast try to bruteforce address automatically. This can be done in reasonable amount of time. But this is not an option for newer cubes and MAC can't be guessed. Also some software like platform-native applications h