mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-01-06 08:08:53 +08:00
adapt data bmap to handle calls without -m.
This commit is contained in:
parent
b9dcd143d5
commit
f47fb2f74d
2 changed files with 11 additions and 8 deletions
|
@ -3,8 +3,10 @@ All notable changes to this project will be documented in this file.
|
||||||
This project uses the changelog in accordance with [keepchangelog](http://keepachangelog.com/). Please use this to write notable changes, which is not the same as git commit log...
|
This project uses the changelog in accordance with [keepchangelog](http://keepachangelog.com/). Please use this to write notable changes, which is not the same as git commit log...
|
||||||
|
|
||||||
## [unreleased][unreleased]
|
## [unreleased][unreleased]
|
||||||
|
- Changed `data bmap` - now default `-m` is 8 (@iceman1001)
|
||||||
- Added support for NTAG424 cards. (@dankar)
|
- Added support for NTAG424 cards. (@dankar)
|
||||||
- Additional fixes to configcard code for keyroll mode based on nfc-iclass output (@Antiklesys)
|
- Additional fixes to configcard code for keyroll mode based on nfc-iclass output (@Antiklesys)
|
||||||
|
- Changed lf sampling - improved the performance (@yah01)
|
||||||
- Added `bind` option for network connections to specify the outbound address and port (@wh201906)
|
- Added `bind` option for network connections to specify the outbound address and port (@wh201906)
|
||||||
- Changed `lf em 4x05 dump` - now supports the `--ns` nosave parameter (@iceman1001)
|
- Changed `lf em 4x05 dump` - now supports the `--ns` nosave parameter (@iceman1001)
|
||||||
- Fixed some wrong synchronization waits in usb_write() to increase the communication speed (@wh201906)
|
- Fixed some wrong synchronization waits in usb_write() to increase the communication speed (@wh201906)
|
||||||
|
@ -41,7 +43,6 @@ This project uses the changelog in accordance with [keepchangelog](http://keepac
|
||||||
- Modified `hf iclass configcard` to only support online mode (@Antiklesys)
|
- Modified `hf iclass configcard` to only support online mode (@Antiklesys)
|
||||||
- Modified `hf iclass configcard` command to generate config cards without a cardhelper module by porting the contents of blocks 6 & 7 from nfc-iclass (@Antiklesys)
|
- Modified `hf iclass configcard` command to generate config cards without a cardhelper module by porting the contents of blocks 6 & 7 from nfc-iclass (@Antiklesys)
|
||||||
- Fixed `hf iclass info` command showing incorrectly in offline mode (@Antiklesys)
|
- Fixed `hf iclass info` command showing incorrectly in offline mode (@Antiklesys)
|
||||||
- Changed lf sampling - improved the performance (@yah01)
|
|
||||||
|
|
||||||
## [Raccoon.4.17140][2023-09-09]
|
## [Raccoon.4.17140][2023-09-09]
|
||||||
- Changed text and adjust pm3_test case for mf_aes_brute (@doegox)
|
- Changed text and adjust pm3_test case for mf_aes_brute (@doegox)
|
||||||
|
|
|
@ -3457,6 +3457,7 @@ static int CmdBinaryMap(const char *Cmd) {
|
||||||
"Breaks down a hex value to binary according a template\n"
|
"Breaks down a hex value to binary according a template\n"
|
||||||
" data bmap -d 16 -m 4,4\n"
|
" data bmap -d 16 -m 4,4\n"
|
||||||
"This will give two rows each with four bits",
|
"This will give two rows each with four bits",
|
||||||
|
"data bmap -d 3B\n"
|
||||||
"data bmap -d 3B -m 2,5,1\n"
|
"data bmap -d 3B -m 2,5,1\n"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -3480,7 +3481,11 @@ static int CmdBinaryMap(const char *Cmd) {
|
||||||
char bits[(8 * 4) + 1] = {0};
|
char bits[(8 * 4) + 1] = {0};
|
||||||
hextobinstring_n(bits, (char *)hex, hlen);
|
hextobinstring_n(bits, (char *)hex, hlen);
|
||||||
|
|
||||||
int x = 0;
|
if (tlen == 0) {
|
||||||
|
template[0] = '8';
|
||||||
|
template[1] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
char *token = strtok((char *)template, ",");
|
char *token = strtok((char *)template, ",");
|
||||||
|
|
||||||
// header
|
// header
|
||||||
|
@ -3490,19 +3495,16 @@ static int CmdBinaryMap(const char *Cmd) {
|
||||||
|
|
||||||
uint8_t i = 0;
|
uint8_t i = 0;
|
||||||
uint8_t cnt = 1;
|
uint8_t cnt = 1;
|
||||||
|
int x = 0;
|
||||||
while (token != NULL) {
|
while (token != NULL) {
|
||||||
sscanf(token, "%d", &x);
|
sscanf(token, "%d", &x);
|
||||||
|
|
||||||
if (i) {
|
PrintAndLogEx(INFO, " %d | %*.s" NOLF, cnt, i * 3, " ");
|
||||||
PrintAndLogEx(INFO, " %d | %*.s" NOLF, cnt, i * 3, " ");
|
|
||||||
} else {
|
|
||||||
PrintAndLogEx(INFO, " %d | " NOLF, cnt);
|
|
||||||
}
|
|
||||||
|
|
||||||
// incease with previous offset
|
// incease with previous offset
|
||||||
x += i;
|
x += i;
|
||||||
|
|
||||||
for (; i < x; i++) {
|
for (; i < (uint8_t)x; i++) {
|
||||||
PrintAndLogEx(NORMAL, "%c " NOLF, bits[7 - i]);
|
PrintAndLogEx(NORMAL, "%c " NOLF, bits[7 - i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue