mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-02-13 18:57:12 +08:00
lf t55xx commands works again. Need to find a better sprinf_bin_break function
This commit is contained in:
parent
2a4685312a
commit
e598aec890
3 changed files with 16 additions and 17 deletions
|
@ -1210,7 +1210,7 @@ int CmdT55xxInfo(const char *Cmd){
|
|||
if (strlen(Cmd) > 1 || cmdp == 'h' || cmdp == 'H') return usage_t55xx_info();
|
||||
|
||||
if (strlen(Cmd)==0){
|
||||
// sanity check.
|
||||
// sanity check.
|
||||
if (!SanityOfflineCheck(false)) return 1;
|
||||
|
||||
if ( !AquireData( T55x7_PAGE0, T55x7_CONFIGURATION_BLOCK, pwdmode, password ) )
|
||||
|
@ -1223,10 +1223,10 @@ int CmdT55xxInfo(const char *Cmd){
|
|||
if ( DemodBufferLen < 32) return 1;
|
||||
|
||||
//
|
||||
PrintAndLog("Offset+32 ==%d\n DemodLen == %d", config.offset + 32,DemodBufferLen );
|
||||
//PrintAndLog("Offset+32 ==%d\n DemodLen == %d", config.offset + 32, DemodBufferLen);
|
||||
|
||||
uint8_t si = config.offset;
|
||||
uint32_t bl0 = PackBits(si, 32, DemodBuffer);
|
||||
uint32_t block0 = PackBits(si, 32, DemodBuffer);
|
||||
uint32_t safer = PackBits(si, 4, DemodBuffer); si += 4;
|
||||
uint32_t resv = PackBits(si, 7, DemodBuffer); si += 7;
|
||||
uint32_t dbr = PackBits(si, 3, DemodBuffer); si += 3;
|
||||
|
@ -1262,9 +1262,8 @@ int CmdT55xxInfo(const char *Cmd){
|
|||
PrintAndLog(" POR-Delay : %s", (por) ? "Yes":"No");
|
||||
PrintAndLog("-------------------------------------------------------------");
|
||||
PrintAndLog(" Raw Data - Page 0");
|
||||
PrintAndLog(" Block 0 : 0x%08X %s", bl0, sprint_bin(DemodBuffer+config.offset,32) );
|
||||
PrintAndLog(" Block 0 : 0x%08X %s", block0, sprint_bin(DemodBuffer + config.offset, 32) );
|
||||
PrintAndLog("-------------------------------------------------------------");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -62,15 +62,15 @@ struct receiver_arg {
|
|||
byte_t rx[sizeof(UsbCommand)];
|
||||
byte_t* prx = rx;
|
||||
|
||||
// static void showBanner(void){
|
||||
// printf("██████╗ ███╗ ███╗ ████╗ ...Iceman fork\n");
|
||||
// printf("██╔══██╗████╗ ████║ ══█║\n");
|
||||
// printf("██████╔╝██╔████╔██║ ████╔╝\n");
|
||||
// printf("██╔═══╝ ██║╚██╔╝██║ ══█║ iceman@icesql.net\n");
|
||||
// printf("██║ ██║ ╚═╝ ██║ ████╔╝ https://github.com/iceman1001/proxmark3\n");
|
||||
// printf("╚═╝ ╚═╝ ╚═╝ ╚═══╝v3.0.2n");
|
||||
// }
|
||||
|
||||
static void showBanner(void){
|
||||
printf("██████╗ ███╗ ███╗ ████╗ ...Iceman fork\n");
|
||||
printf("██╔══██╗████╗ ████║ ══█║\n");
|
||||
printf("██████╔╝██╔████╔██║ ████╔╝\n");
|
||||
printf("██╔═══╝ ██║╚██╔╝██║ ══█║ iceman@icesql.net\n");
|
||||
printf("██║ ██║ ╚═╝ ██║ ████╔╝ https://github.com/iceman1001/proxmark3\n");
|
||||
printf("╚═╝ ╚═╝ ╚═╝ ╚═══╝v3.0.0\n");
|
||||
printf("\n\n");
|
||||
}
|
||||
|
||||
static void *uart_receiver(void *targ) {
|
||||
struct receiver_arg *arg = (struct receiver_arg*)targ;
|
||||
|
@ -124,7 +124,7 @@ void main_loop(char *script_cmds_file, bool usb_present) {
|
|||
}
|
||||
|
||||
read_history(".history");
|
||||
|
||||
|
||||
while(1) {
|
||||
|
||||
// If there is a script file
|
||||
|
|
|
@ -160,10 +160,10 @@ char *sprint_bin_break(const uint8_t *data, const size_t len, const uint8_t brea
|
|||
|
||||
int rowlen = (len > MAX_BIN_BREAK_LENGTH ) ? MAX_BIN_BREAK_LENGTH : len;
|
||||
|
||||
if ( len % breaks != 0)
|
||||
if ( breaks > 0 && len % breaks != 0)
|
||||
rowlen = ( len+(len/breaks) > MAX_BIN_BREAK_LENGTH ) ? MAX_BIN_BREAK_LENGTH : len+(len/breaks);
|
||||
|
||||
// printf("(sprint_bin_break) rowlen %d\n", rowlen);
|
||||
//printf("(sprint_bin_break) rowlen %d\n", rowlen);
|
||||
|
||||
static char buf[MAX_BIN_BREAK_LENGTH]; // 3072 + end of line characters if broken at 8 bits
|
||||
//clear memory
|
||||
|
|
Loading…
Reference in a new issue