mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-24 07:05:40 -07:00
more bluetooth simple pairing options. No decoder yet.
This commit is contained in:
parent
6f29aa6d8f
commit
33d90993e3
1 changed files with 41 additions and 8 deletions
|
@ -32,12 +32,16 @@
|
||||||
|
|
||||||
#define STRBOOL(p) ((p) ? "1" : "0")
|
#define STRBOOL(p) ((p) ? "1" : "0")
|
||||||
|
|
||||||
#define NDEF_WIFIAPPL_WSC "application/vnd.wfa.wsc"
|
#define NDEF_WIFIAPPL_WSC "application/vnd.wfa.wsc"
|
||||||
#define NDEF_WIFIAPPL_P2P "application/vnd.wfa.p2p"
|
#define NDEF_WIFIAPPL_P2P "application/vnd.wfa.p2p"
|
||||||
#define NDEF_BLUEAPPL "application/vnd.bluetooth"
|
#define NDEF_JSONAPPL "application/json"
|
||||||
#define NDEF_JSONAPPL "application/json"
|
#define NDEF_VCARDTEXT "text/vcard"
|
||||||
#define NDEF_VCARDTEXT "text/vcard"
|
#define NDEF_XVCARDTEXT "text/x-vcard"
|
||||||
#define NDEF_XVCARDTEXT "text/x-vcard"
|
|
||||||
|
#define NDEF_BLUEAPPL_EP "application/vnd.bluetooth.ep.oob"
|
||||||
|
#define NDEF_BLUEAPPL_LE "application/vnd.bluetooth.le.oob"
|
||||||
|
#define NDEF_BLUEAPPL_SECURE_LE "application/vnd.bluetooth.secure.le.oob"
|
||||||
|
|
||||||
|
|
||||||
static const char *TypeNameFormat_s[] = {
|
static const char *TypeNameFormat_s[] = {
|
||||||
"Empty Record",
|
"Empty Record",
|
||||||
|
@ -854,6 +858,26 @@ static int ndefDecodeMime_json(NDEFHeader_t *ndef) {
|
||||||
return PM3_SUCCESS;
|
return PM3_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int ndefDecodeMime_bt_secure_le_oob(NDEFHeader_t *ndef) {
|
||||||
|
if (ndef->PayloadLen == 0) {
|
||||||
|
PrintAndLogEx(INFO, "no payload");
|
||||||
|
return PM3_SUCCESS;
|
||||||
|
}
|
||||||
|
PrintAndLogEx(INFO, "Type............ " _YELLOW_("%.*s"), (int)ndef->TypeLen, ndef->Type);
|
||||||
|
PrintAndLogEx(INFO, "To be implemented. Feel free to contribute!");
|
||||||
|
return PM3_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int ndefDecodeMime_bt_le_oob(NDEFHeader_t *ndef) {
|
||||||
|
if (ndef->PayloadLen == 0) {
|
||||||
|
PrintAndLogEx(INFO, "no payload");
|
||||||
|
return PM3_SUCCESS;
|
||||||
|
}
|
||||||
|
PrintAndLogEx(INFO, "Type............ " _YELLOW_("%.*s"), (int)ndef->TypeLen, ndef->Type);
|
||||||
|
PrintAndLogEx(INFO, "To be implemented. Feel free to contribute!");
|
||||||
|
return PM3_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
static int ndefDecodeMime_bt(NDEFHeader_t *ndef) {
|
static int ndefDecodeMime_bt(NDEFHeader_t *ndef) {
|
||||||
if (ndef->PayloadLen == 0) {
|
if (ndef->PayloadLen == 0) {
|
||||||
PrintAndLogEx(INFO, "no payload");
|
PrintAndLogEx(INFO, "no payload");
|
||||||
|
@ -1023,9 +1047,18 @@ static int ndefDecodePayload(NDEFHeader_t *ndef, bool verbose) {
|
||||||
if (str_startswith(begin, NDEF_VCARDTEXT) || str_startswith(begin, NDEF_XVCARDTEXT)) {
|
if (str_startswith(begin, NDEF_VCARDTEXT) || str_startswith(begin, NDEF_XVCARDTEXT)) {
|
||||||
ndefDecodeMime_vcard(ndef);
|
ndefDecodeMime_vcard(ndef);
|
||||||
}
|
}
|
||||||
if (str_startswith(begin, NDEF_BLUEAPPL)) {
|
|
||||||
ndefDecodeMime_bt(ndef);
|
|
||||||
|
if (str_startswith(begin, NDEF_BLUEAPPL_EP)) {
|
||||||
|
ndefDecodeMime_bt(ndef);
|
||||||
}
|
}
|
||||||
|
if (str_startswith(begin, NDEF_BLUEAPPL_SECURE_LE)) {
|
||||||
|
ndefDecodeMime_bt_secure_le_oob(ndef);
|
||||||
|
}
|
||||||
|
if (str_startswith(begin, NDEF_BLUEAPPL_LE)) {
|
||||||
|
ndefDecodeMime_bt_le_oob(ndef);
|
||||||
|
}
|
||||||
|
|
||||||
if (str_startswith(begin, NDEF_JSONAPPL)) {
|
if (str_startswith(begin, NDEF_JSONAPPL)) {
|
||||||
ndefDecodeMime_json(ndef);
|
ndefDecodeMime_json(ndef);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue