Rating: 3.0

```
from Crypto.PublicKey import RSA
from Crypto.Util.number import inverse,long_to_bytes

# I tried to use tools to visualize Bluetooth communications but there is no good ones
# so I decided to stick with Wireshark
# getting public key from protocols ATT Rcvd handle notification
# packets number 213 and 223
key = RSA.importKey(open('key.pem').read())

# logic: after getting the key, we get the cipher text
# so the next packet will be the cipher text
# packet number 233 ATT: sent write request
# removing null bytes at the end :p
c = ...
c = int(c,16)

# and the remaining is RSA :p
n = key.n
p = ... #from factordb
q = n // p
e = key.e
d = inverse(e,(p-1)*(q-1))
m = pow(c,d,n)

print(long_to_bytes(m).split(b"\x00")[1])
```

```
> Flag: CHTB{5p34k_fr13nd_4nd_3n73r}
```