From b5842e8c1bcb06d496530a736eb95391b05e3a76 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Sun, 29 Oct 2017 19:28:23 +0100 Subject: [PATCH] fix: usb_cdc don't report that pm3 device is selfpowered.. (since its not by default) --- client/cmdhfmf.c | 5 ++--- common/usb_cdc.c | 5 ++++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/client/cmdhfmf.c b/client/cmdhfmf.c index a0bec2a98..55db2526a 100644 --- a/client/cmdhfmf.c +++ b/client/cmdhfmf.c @@ -1166,9 +1166,8 @@ int CmdHF14AMfNestedHard(const char *Cmd) { return 0; } -int randInRange(int min, int max) -{ - return min + (int) (rand() / (double) (RAND_MAX + 1) * (max - min + 1)); +int randInRange(int min, int max) { + return min + (int) (rand() / (double) (RAND_MAX + 1) * (max - min + 1)); } //Fisher–Yates shuffle diff --git a/common/usb_cdc.c b/common/usb_cdc.c index c284c8a4b..01e8fbd5f 100644 --- a/common/usb_cdc.c +++ b/common/usb_cdc.c @@ -159,7 +159,7 @@ static const char cfgDescriptor[] = { 2, // Number of Interfaces 1, // Index value of this Configuration (used in SetConfiguration from Host) 0, // Configuration string index - 0xC0, // Attributes 0xA0 + _DEFAULT, // Attributes 0xA0 0xFA, // Max Power consumption // IAD to associate the one CDC interface @@ -363,6 +363,9 @@ static const char StrLanguageCodes[] = { 0x09, 0x04 // supported language Code 0 = 0x0409 (English) }; +// Note: ModemManager (Linux) ignores Proxmark3 devices by matching the +// manufacturer string "proxmark.org". Don't change this. +// or use the blacklisting file. static const char StrManufacturer[] = { 26, // Length 0x03, // Type is string